summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorKarthik Nayak <karthik.188@gmail.com>2017-01-10 08:49:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-01-10 20:44:31 (GMT)
commita7984101846ccfb8837526a8d79dda5b8c461d84 (patch)
tree8cdc88b4679d32aa84e673d1f236bc45e6149946 /Documentation
parentb180e6fe19ee4cf701d3a3478025dd7125fb0749 (diff)
downloadgit-a7984101846ccfb8837526a8d79dda5b8c461d84.zip
git-a7984101846ccfb8837526a8d79dda5b8c461d84.tar.gz
git-a7984101846ccfb8837526a8d79dda5b8c461d84.tar.bz2
ref-filter: introduce refname_atom_parser()
Using refname_atom_parser_internal(), introduce refname_atom_parser() which will parse the %(symref) and %(refname) atoms. Store the parsed information into the 'used_atom' structure based on the modifiers used along with the atoms. Now the '%(symref)' atom supports the ':strip' atom modifier. Update the Documentation and tests to reflect this. Helped-by: Jeff King <peff@peff.net> Signed-off-by: Karthik Nayak <Karthik.188@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-for-each-ref.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/Documentation/git-for-each-ref.txt b/Documentation/git-for-each-ref.txt
index 14240b4..5de22cf 100644
--- a/Documentation/git-for-each-ref.txt
+++ b/Documentation/git-for-each-ref.txt
@@ -170,6 +170,11 @@ if::
the value between the %(if:...) and %(then) atoms with the
given string.
+symref::
+ The ref which the given symbolic ref refers to. If not a
+ symbolic ref, nothing is printed. Respects the `:short` and
+ `:strip` options in the same way as `refname` above.
+
In addition to the above, for commit and tag objects, the header
field names (`tree`, `parent`, `object`, `type`, and `tag`) can
be used to specify the value in the header field.