Code

Teach git-describe how to run name-rev
authorShawn O. Pearce <spearce@spearce.org>
Mon, 21 May 2007 07:20:25 +0000 (03:20 -0400)
committerJunio C Hamano <junkio@cox.net>
Tue, 22 May 2007 06:56:28 +0000 (23:56 -0700)
commit23615708e2abef5c293ddee9335950161a038133
treeae1e929a1ebc5342b977ad6a8dedf82376eebecb
parent302b9282c9ddfcc704ca759bdc98c1d5f75eba2f
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>
Documentation/git-describe.txt
Documentation/git-name-rev.txt
builtin-describe.c
builtin-name-rev.c