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

Re: What's cooking in git.git (topics)

From
Nicolas Pitre <nico@cam.org>
Date
Jan 29, 2007, 04:41 UTC
Message-ID
<Pine.LNX.4.64.0701282321390.3021@xanadu.home>
In-Reply-To
<Pine.LNX.4.64.0701272049480.3021@xanadu.home>
On Sat, 27 Jan 2007, Nicolas Pitre wrote:
Show 10 quoted lines
> On Sat, 27 Jan 2007, Junio C Hamano wrote:
> 
> > My understanding of the situation after your patch (disregarding
> > the problem that prune and friends may happily break the logs
> > for detached HEAD), is that if you say "git show HEAD@{...}",
> > while on a branch, it looks at the log of the current branch but
> > while on a detached HEAD it shows the log from .git/logs/HEAD.
> > I have a feeling that this would be confusing.  
> 
> It would indeed.  But that's not exactly what's happening.

Well... It is a mess. That's not what's happening for git-log obviously, but what you describe is indeed the case for git-rev-parse.

There needs to be a dwim_reflog() function that looks for a matching reflog file by itself instead of using dwim_ref() and simply prefixing the resolved ref with "logs/". Unfortunately this tackling of reflog path built on top of resolve_ref() seems to be a popular assumption and chasing and fixing all those cases properly would require more time than I can spare right now.

Nicolas
Previous: Junio C Hamano
Message 7 of 7 in “What's cooking in git.git (topics)”
  1. Junio C HamanoJan 27, 2007
  2. Nicolas PitreJan 27, 2007
  3. Junio C HamanoJan 27, 2007
  4. Nicolas PitreJan 28, 2007
  5. git-log -g --pretty=oneline should display the reflog messageNicolas Pitre, Jan 28, 2007
  6. Junio C HamanoJan 28, 2007
  7. Nicolas PitreJan 29, 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.