git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Cross-reference the manpages for git-name-rev and git-describe (was Re: Commits gone AWOL, but not reported by git-fsck --unreachable)

From
Matthieu Moy <matthieu.moy@imag.fr>
Date
May 20, 2007, 12:37 UTC
Message-ID
<vpq7ir3658t.fsf_-_@bauges.imag.fr>
In-Reply-To
<7vfy5sy91f.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> writes:
Show 27 quoted lines
> Brian Gernhardt <benji@silverinsanity.com> writes:
>
>> On May 19, 2007, at 12:55 PM, Matthieu Moy wrote:
>>
>>> Brian Gernhardt <benji@silverinsanity.com> writes:
>>>
>>>> On May 19, 2007, at 12:08 PM, Matthieu Moy wrote:
>>>>
>>>>> The commit introducing it is
>>>>> 566842f62bdf1f16c2e94fb431445d2e6c0f3f0b,
>>>>> and I'd say it's in git 1.5.1:
>>>>>
>>>>> $ git-describe --tags 566842f62bdf1f16c2e94fb431445d2e6c0f3f0b
>>>>> v1.5.1-34-g566842f
>>>>
>>>> Actually, I think that means it's 34 commits *after* v1.5.1, not
>>>> before.  It's in 1.5.2-rc0, but none of the 1.5.1.* series.
>>>
>>> You're right. Then, is there any easy way to ask git the oldest tag(s)
>>> that a commit is an ancestor of? In other words, which command should
>>> I have typed above?
>>
>> I did it the hard way with "git log v1.5.1..v.1.5.1.1", "..1.5.1.2",
>> and using grep to look for 566842.  Anybody better at constructing
>> these incantations want to chime in?
>
> Perhaps "git-name-rev --refs='refs/tags/v*' $it"?

Yes, that's the one I was looking for (I knew it, but mixed name-rev and describe).

How about this documentation patch then?
>From c280d7db974faacf388314e0396c9d50b40d55aa Mon Sep 17 00:00:00 2001
From: Matthieu Moy <Matthieu.Moy@imag.fr>
Date: Sun, 20 May 2007 14:33:44 +0200
Subject: [PATCH] Cross-reference the manpages for git-name-rev and git-describe
Both commands achieve a very similar goal.
---
 Documentation/git-describe.txt |    4 ++++
 Documentation/git-name-rev.txt |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt
index 47a583d..ff8383d 100644
--- a/Documentation/git-describe.txt
+++ b/Documentation/git-describe.txt
@@ -105,6 +105,10 @@ selected and output.  Here fewest commits different is defined as
 the number of commits which would be shown by "git log tag..input"
 will be the smallest number of commits possible.
 
+See Also
+--------
+gitlink:git-name-rev[1] (very similar to git-describe, but searches
+the succesors of the commit)
 
 Author
 ------
diff --git a/Documentation/git-name-rev.txt b/Documentation/git-name-rev.txt
index d6c8bf8..bdb0b27 100644
--- a/Documentation/git-name-rev.txt
+++ b/Documentation/git-name-rev.txt
@@ -57,6 +57,10 @@ Another nice thing you can do is:
 % git log | git name-rev --stdin
 ------------
 
+See Also
+--------
+gitlink:git-describe[1] (very similar to git-name-rev, but searches
+the ancestors of the commit)
 
 Author
 ------
-- 
1.5.2.rc3.32.ga3b1



-- 
Matthieu
Previous: Junio C HamanoNext: Shawn O. Pearce
Message 11 of 17 in “Commits gone AWOL, but not reported by git-fsck --unreachable”
  1. Robin H. JohnsonMay 19, 2007
  2. Jeff KingMay 19, 2007
  3. Robin H. JohnsonMay 19, 2007
  4. Jeff KingMay 19, 2007
  5. Anand KumriaMay 19, 2007
  6. Matthieu MoyMay 19, 2007
  7. Brian GernhardtMay 19, 2007
  8. Matthieu MoyMay 19, 2007
  9. Brian GernhardtMay 19, 2007
  10. Junio C HamanoMay 19, 2007
  11. Cross-reference the manpages for git-name-rev and git-describe (was Re: Commits gone AWOL, but not reported by git-fsck --unreachable)Matthieu Moy, May 20, 2007
  12. Shawn O. PearceMay 21, 2007
  13. Junio C HamanoMay 21, 2007
  14. Shawn O. PearceMay 21, 2007
  15. Matthieu MoyMay 21, 2007
  16. Junio C HamanoMay 22, 2007
  17. Shawn O. PearceMay 22, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.