path: root/Documentation/git-name-rev.txt
diff options
authorShawn O. Pearce <>2007-05-21 07:20:25 (GMT)
committerJunio C Hamano <>2007-05-22 06:56:28 (GMT)
commit23615708e2abef5c293ddee9335950161a038133 (patch)
treeae1e929a1ebc5342b977ad6a8dedf82376eebecb /Documentation/git-name-rev.txt
parent302b9282c9ddfcc704ca759bdc98c1d5f75eba2f (diff)
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 <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Documentation/git-name-rev.txt')
1 files changed, 7 insertions, 0 deletions
diff --git a/Documentation/git-name-rev.txt b/Documentation/git-name-rev.txt
index d6c8bf8..9a1645d 100644
--- a/Documentation/git-name-rev.txt
+++ b/Documentation/git-name-rev.txt
@@ -34,6 +34,13 @@ OPTIONS
Read from stdin, append "(<rev_name>)" to all sha1's of nameable
commits, and pass to stdout
+ Instead of printing both the SHA-1 and the name, print only
+ the name. If given with --tags the usual tag prefix of
+ "tags/" is also ommitted from the name, matching the output
+ of gitlink::git-describe[1] more closely. This option
+ cannot be combined with --stdin.