summaryrefslogtreecommitdiff
path: root/Documentation/git-describe.txt
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-05-21 07:20:25 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-05-22 06:56:28 (GMT)
commit23615708e2abef5c293ddee9335950161a038133 (patch)
treeae1e929a1ebc5342b977ad6a8dedf82376eebecb /Documentation/git-describe.txt
parent302b9282c9ddfcc704ca759bdc98c1d5f75eba2f (diff)
downloadgit-23615708e2abef5c293ddee9335950161a038133.zip
git-23615708e2abef5c293ddee9335950161a038133.tar.gz
git-23615708e2abef5c293ddee9335950161a038133.tar.bz2
Teach git-describe how to run name-rev
Often users want to know not which tagged version a commit came after, but which tagged version a commit is contained within. This latter task is the job of git-name-rev, but most users are looking to git-describe to do the job. Junio suggested we make `git describe --contains` run the correct tool, `git name-rev`, and that's exactly what we do here. The output of name-rev was adjusted slightly through the new --name-only option, allowing describe to execv into name-rev and maintain its current output format. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'Documentation/git-describe.txt')
-rw-r--r--Documentation/git-describe.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt
index 47a583d..dc47b65 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] [--abbrev=<n>] <committish>...
+'git-describe' [--all] [--tags] [--contains] [--abbrev=<n>] <committish>...
DESCRIPTION
-----------
@@ -31,6 +31,11 @@ OPTIONS
Instead of using only the annotated tags, use any tag
found in `.git/refs/tags`.
+--contains::
+ Instead of finding the tag that predates the commit, find
+ the tag that comes after the commit, and thus contains it.
+ Automatically implies --tags.
+
--abbrev=<n>::
Instead of using the default 8 hexadecimal digits as the
abbreviated object name, use <n> digits.