X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-describe.txt;h=51a0cc044f04cd210d4ced7fb34946bf23896f81;hb=7a7d4ef69c2c79b10977508794e1bbd62ca9ed2b;hp=69e1ab750d99defc98f671317ae6ae65debd92b0;hpb=4b172de81b878cdc8b10803fd0cd79b3ca66a621;p=git.git diff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt index 69e1ab750..51a0cc044 100644 --- a/Documentation/git-describe.txt +++ b/Documentation/git-describe.txt @@ -8,7 +8,7 @@ git-describe - Show the most recent tag that is reachable from a commit SYNOPSIS -------- -'git-describe' [--all] [--tags] [--contains] [--abbrev=] ... +'git describe' [--all] [--tags] [--contains] [--abbrev=] ... DESCRIPTION ----------- @@ -70,12 +70,15 @@ OPTIONS Only consider tags matching the given pattern (can be used to avoid leaking private tags made from the repository). +--always:: + Show uniquely abbreviated commit object as fallback. + EXAMPLES -------- With something like git.git current tree, I get: - [torvalds@g5 git]$ git-describe parent + [torvalds@g5 git]$ git describe parent v1.0.4-14-g2414721 i.e. the current head of my "parent" branch is based on v1.0.4, @@ -89,9 +92,9 @@ of commits which would be displayed by "git log v1.0.4..parent". The hash suffix is "-g" + 7-char abbreviation for the tip commit of parent (which was `2414721b194453f058079d897d13c4e377f92dc6`). -Doing a "git-describe" on a tag-name will just show the tag name: +Doing a `git-describe` on a tag-name will just show the tag name: - [torvalds@g5 git]$ git-describe v1.0.4 + [torvalds@g5 git]$ git describe v1.0.4 v1.0.4 With --all, the command can use branch heads as references, so @@ -112,13 +115,13 @@ closest tagname without any suffix: SEARCH STRATEGY --------------- -For each committish supplied "git describe" will first look for +For each committish supplied, `git-describe` will first look for a tag which tags exactly that commit. Annotated tags will always be preferred over lightweight tags, and tags with newer dates will always be preferred over tags with older dates. If an exact match is found, its name will be output and searching will stop. -If an exact match was not found "git describe" will walk back +If an exact match was not found, `git-describe` will walk back through the commit history to locate an ancestor commit which has been tagged. The ancestor's tag will be output along with an abbreviation of the input committish's SHA1. @@ -126,7 +129,7 @@ abbreviation of the input committish's SHA1. If multiple tags were found during the walk then the tag which has the fewest commits different from the input committish will be selected and output. Here fewest commits different is defined as -the number of commits which would be shown by "git log tag..input" +the number of commits which would be shown by `git log tag..input` will be the smallest number of commits possible. @@ -142,4 +145,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list