From a45d34691ea624e93863e95706eeb1b1909304f3 Mon Sep 17 00:00:00 2001 From: Bert Wesarg Date: Mon, 13 Apr 2009 13:20:26 +0200 Subject: 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)" ' for single refs. Signed-off-by: Bert Wesarg Signed-off-by: Junio C Hamano --- Documentation/git-rev-parse.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Documentation') diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt index 5ed2bc840..fba30b12e 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`. -- cgit v1.2.1