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

Re: git-fetch will leave a ref pointing to a tag

From
Jeff King <peff@peff.net>
Date
Jul 3, 2007, 13:59 UTC
Message-ID
<20070703135918.GA18597@coredump.intra.peff.net>
In-Reply-To
<Pine.LNX.4.64.0707031257590.4071@racer.site>
On Tue, Jul 03, 2007 at 01:01:49PM +0100, Johannes Schindelin wrote:
> If it is only the test, you can do that by
> 
> 	test $(git merge-base foo bar) = $(git rev-parse foo)

I had thought that calculating the merge base was actually slightly less efficient in this case, since it will actually find all of the merge bases (but I could very well be wrong). But really, either should produce the result effectively instantaneously.

> (which tests if foo is a stricth ancestor of bar). Although in your 
> (linux@horizon.com's) place I would really look at "git log foo.." myself, 
> as peff almost suggested.

Yes. In fact, I find an even more useful operation in that case to be "gitk foo..." to see "where I'm at" with respect to my changes and upstream changes.

-Peff
Previous: Johannes Schindelin
Message 8 of 8 in “git-fetch will leave a ref pointing to a tag”
  1. linux@horizon.comJul 2, 2007
  2. Johannes SchindelinJul 2, 2007
  3. Junio C HamanoJul 2, 2007
  4. Johannes SchindelinJul 2, 2007
  5. linux@horizon.comJul 3, 2007
  6. Jeff KingJul 3, 2007
  7. Johannes SchindelinJul 3, 2007
  8. Jeff KingJul 3, 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.