summaryrefslogtreecommitdiff
path: root/Documentation/git-rev-parse.txt
diff options
context:
space:
mode:
authorBert Wesarg <bert.wesarg@googlemail.com>2009-04-13 11:20:26 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-04-13 16:42:55 (GMT)
commita45d34691ea624e93863e95706eeb1b1909304f3 (patch)
treeccb33f43a955be918d1771082e04a54599a23f0c /Documentation/git-rev-parse.txt
parent2bb98169be7b0ac4f70815b4490904c652edae61 (diff)
downloadgit-a45d34691ea624e93863e95706eeb1b1909304f3.zip
git-a45d34691ea624e93863e95706eeb1b1909304f3.tar.gz
git-a45d34691ea624e93863e95706eeb1b1909304f3.tar.bz2
rev-parse: --abbrev-ref option to shorten ref name
This applies the shorten_unambiguous_ref function to the object name. Default mode is controlled by core.warnAmbiguousRefs. Else it is given as optional argument to --abbrev-ref={strict|loose}. This should be faster than 'git for-each-ref --format="%(refname:short)" <ref>' for single refs. Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-rev-parse.txt')
-rw-r--r--Documentation/git-rev-parse.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt
index 5ed2bc8..fba30b1 100644
--- a/Documentation/git-rev-parse.txt
+++ b/Documentation/git-rev-parse.txt
@@ -84,6 +84,11 @@ OPTIONS
unfortunately named tag "master"), and show them as full
refnames (e.g. "refs/heads/master").
+--abbrev-ref[={strict|loose}]::
+ A non-ambiguous short name of the objects name.
+ The option core.warnAmbiguousRefs is used to select the strict
+ abbreviation mode.
+
--all::
Show all refs found in `$GIT_DIR/refs`.