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

Re: Inconsistencies with git log

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Nov 9, 2007, 17:38 UTC
Message-ID
<alpine.LFD.0.999.0711090929130.15101@woody.linux-foundation.org>
In-Reply-To
<9e4733910711090920m6b0b7704x7c5a3849215f385c@mail.gmail.com>
On Fri, 9 Nov 2007, Jon Smirl wrote:
Show 5 quoted lines
> 
> The summary of this is that new users do not expect "git log" to give
> them the whole log when the command is executed in a subdirectory.
> This causes a training burden because of the unexpected behavior. They
> try 'git log' and then I have to tell them to use "git log ."
No. The summary is that *you* are confused.

The fact is, "git log" always has given the whole log, and there is no confusion at all. The only people who may be confused are people who misread the documentation on purpose, or who came from some broken other SCM, and are confused just because of *that*.

Git makes it very clear indeed at all points that it tracks whole history. It's a big deal. We *make* a big deal about it, and "git log" follows that very consistently.

In fact, even at the top-of-tree, "git log" and "git log ." are two totally different things, even if in practice the differences are often hard to see. But one gives the "full history", and the other gives the "simplified history for the pathnames given", and the two are REALLY REALLY different.

Try it. Do
	git log origin/pu > full
	git log origin/pu . > limited

in the git tree, and look at the differences (it might be useful to use gitk instead, and look at where the differences start! That visual difference is going to give you a lot more of an "Ahaa!" moment when you understand it). When you can explain and understand those differences, then you *really* understand git (and quite frankly, it's actually rather simple, but you have to really *think* about what those things things are).

Now, for normal use you never need to really to care. Git does a lot of things, and some random user will seldom need the full power of git, nor do they need to really care about why "git log ." and "git log" are actually not the same thing at all, even at the top level.

But you're blaming git for your *own* confusion, which probably comes from crap systems that don't even know what "history" is because they can't really track it right anyway.

		Linus
Previous: Jon SmirlNext: Linus Torvalds
Message 15 of 48 in “Inconsistencies with git log”
  1. Jon SmirlNov 7, 2007
  2. Johannes SchindelinNov 7, 2007
  3. Jon SmirlNov 7, 2007
  4. Johannes SchindelinNov 7, 2007
  5. Jon SmirlNov 7, 2007
  6. Johannes SchindelinNov 7, 2007
  7. Jon SmirlNov 7, 2007
  8. Jon SmirlNov 7, 2007
  9. Johannes SchindelinNov 8, 2007
  10. Jon SmirlNov 8, 2007
  11. Andreas EricssonNov 8, 2007
  12. Johannes SchindelinNov 8, 2007
  13. Linus TorvaldsNov 9, 2007
  14. Jon SmirlNov 9, 2007
  15. Linus TorvaldsNov 9, 2007
  16. Linus TorvaldsNov 9, 2007
  17. Jon SmirlNov 9, 2007
  18. Linus TorvaldsNov 9, 2007
  19. Peter BaumannNov 9, 2007
  20. Junio C HamanoNov 9, 2007
  21. Jakub NarebskiNov 9, 2007
  22. Peter BaumannNov 9, 2007
  23. Linus TorvaldsNov 9, 2007
  24. Jakub NarebskiNov 9, 2007
  25. Wincent ColaiutaNov 8, 2007
  26. Daniel BarkalowNov 8, 2007
  27. Brian GernhardtNov 7, 2007
  28. David SymondsNov 7, 2007
  29. Johannes SchindelinNov 8, 2007
  30. David SymondsNov 8, 2007
  31. Brian GernhardtNov 8, 2007
  32. 1/2 Makefile: wt-status.h is also a lib headerJohannes Schindelin, Nov 8, 2007
  33. Andreas EricssonNov 8, 2007
  34. Peter BaumannNov 8, 2007
  35. David SymondsNov 8, 2007
  36. Andreas EricssonNov 8, 2007
  37. Alex RiesenNov 8, 2007
  38. Alex RiesenNov 8, 2007
  39. 2/2 git status: show relative paths when run in a subdirectoryJohannes Schindelin, Nov 8, 2007
  40. David SymondsNov 8, 2007
  41. Johannes SchindelinNov 8, 2007
  42. Junio C HamanoNov 8, 2007
  43. 2/2 git status: show relative paths when run in a subdirectoryJohannes Schindelin, Nov 9, 2007
  44. Michel MartiNov 10, 2007
  45. Johannes SchindelinNov 10, 2007
  46. Wincent ColaiutaNov 8, 2007
  47. Miles BaderNov 10, 2007
  48. David SymondsNov 7, 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.