path: root/Documentation/git-for-each-ref.txt
diff options
authorHariom Verma <>2020-08-21 21:41:47 (GMT)
committerJunio C Hamano <>2020-08-28 20:52:50 (GMT)
commit837adb102f6bfd6e05c75afc630f20c1c720cc74 (patch)
treebb39e8156d91da5f29273febbc1c29d861c6348c /Documentation/git-for-each-ref.txt
parent87d3beb6e0eedfb83a8dd425e3c612d977b6ac8d (diff)
ref-filter: add `short` modifier to 'tree' atom
Sometimes while using 'tree' atom, user might want to see abbrev hash instead of full 40 character hash. Just like 'objectname', it might be convenient for users to have the `:short` and `:short=<length>` option for printing 'tree' hash. Let's introduce `short` option to 'tree' atom. Mentored-by: Christian Couder <> Mentored-by: Heba Waly <> Signed-off-by: Hariom Verma <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Documentation/git-for-each-ref.txt')
1 files changed, 2 insertions, 0 deletions
diff --git a/Documentation/git-for-each-ref.txt b/Documentation/git-for-each-ref.txt
index e6ce8af..40ebdfc 100644
--- a/Documentation/git-for-each-ref.txt
+++ b/Documentation/git-for-each-ref.txt
@@ -222,6 +222,8 @@ worktreepath::
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.
+Field `tree` can also be used with modifier `:short` and
+`:short=<length>` just like `objectname`.
For commit and tag objects, the special `creatordate` and `creator`
fields will correspond to the appropriate date or name-email-date tuple