aboutsummaryrefslogtreecommitdiff
path: root/Documentation/git-for-each-ref.txt
diff options
context:
space:
mode:
authorRamkumar Ramachandra <artagnon@gmail.com>2013-11-18 23:09:11 +0530
committerJunio C Hamano <gitster@pobox.com>2013-11-19 10:14:15 -0800
commitb28061ce0d2e31d390fee5a5724b8a061d0492a7 (patch)
treeffd06a2811065c442744dee721f0646fb0592092 /Documentation/git-for-each-ref.txt
parent7a48b8321934384098a8392b3c4c814ec5058d00 (diff)
downloadgit-b28061ce0d2e31d390fee5a5724b8a061d0492a7.tar.gz
git-b28061ce0d2e31d390fee5a5724b8a061d0492a7.tar.xz
for-each-ref: introduce %(upstream:track[short])
Introduce %(upstream:track) to display "[ahead M, behind N]" and %(upstream:trackshort) to display "=", ">", "<", or "<>" appropriately (inspired by contrib/completion/git-prompt.sh). Now you can use the following format in for-each-ref: %(refname:short)%(upstream:trackshort) to display refs with terse tracking information. Note that :track and :trackshort only work with "upstream", and error out when used with anything else. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-for-each-ref.txt')
-rw-r--r--Documentation/git-for-each-ref.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/Documentation/git-for-each-ref.txt b/Documentation/git-for-each-ref.txt
index 8f87c9a1e..92e82fdb0 100644
--- a/Documentation/git-for-each-ref.txt
+++ b/Documentation/git-for-each-ref.txt
@@ -91,7 +91,11 @@ objectname::
upstream::
The name of a local ref which can be considered ``upstream''
from the displayed ref. Respects `:short` in the same way as
- `refname` above.
+ `refname` above. Additionally respects `:track` to show
+ "[ahead N, behind M]" and `:trackshort` to show the terse
+ version: ">" (ahead), "<" (behind), "<>" (ahead and behind),
+ or "=" (in sync). Has no effect if the ref does not have
+ tracking information associated with it.
HEAD::
'*' if HEAD matches current ref (the checked out branch), ' '