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

Re: gitweb.cgi history not shown

From
Linus Torvalds <torvalds@osdl.org>
Date
Jun 11, 2006, 16:40 UTC
Message-ID
<Pine.LNX.4.64.0606110933040.5498@g5.osdl.org>
In-Reply-To
<Pine.LNX.4.64.0606110902090.5498@g5.osdl.org>
On Sun, 11 Jun 2006, Linus Torvalds wrote:
> 
> See? No renames. The renames is not what is fundamental here. What is 
> fundamental is the _STATE_ of the tree. Remember: that's what git tracks, 
> and that is what "git log" shows you.

Btw, this is also why I suggested adding a "--no-simplify-history" flag, because in this case, that's exactly what _you_ want. The reason git is doing something unexpected - and in your case inferior - is exactly that what you want in this case is really not "explain the STATE of this file", but you want "give me ALL THE HISTORY concerning this filename".

Both are very valid things to ask for, it just happens that "git log" by default answers the _other_ question. It does NOT answer the "what is all the history" question that you're asking, it answers the "how did this state come to be" question.

Btw, the original "git whatchanged -p" answered exactly the question you had, and the semantics changed when we rewrite "git whatchanged" to act like "git log -p". But you can still get the old semantics by hand, if you really want it, by doing

	git-rev-list --all | git-diff-tree -p -- <filename>

because (and this actually makes total sense when you look at it), you now actually say "first give me all the history" and then "show the actual changes in that history as it pertains to <filename>".

See? 

I hope this explains the not-so-subtle (but still easy to overlook) difference between the two.

And I do agree that we should teach "git log" and friends to be able to answer both questions, and that's what my suggested patch (fleshed out properly, of course) should do.

Not that I ever _tested_ it, of course. Me? Testing? You make me laugh. Ho Ho Ho.

			Linus
Previous: Linus TorvaldsNext: Linus Torvalds
Message 5 of 8 in “gitweb.cgi history not shown”
  1. Marco CostalbaJun 11, 2006
  2. Linus TorvaldsJun 11, 2006
  3. Marco CostalbaJun 11, 2006
  4. Linus TorvaldsJun 11, 2006
  5. Linus TorvaldsJun 11, 2006
  6. Linus TorvaldsJun 11, 2006
  7. Jakub NarebskiJun 11, 2006
  8. Linus TorvaldsJun 11, 2006

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.