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

Re: Inconsistencies with git log

From
Jon Smirl <jonsmirl@gmail.com>
Date
Nov 9, 2007, 17:20 UTC
Message-ID
<9e4733910711090920m6b0b7704x7c5a3849215f385c@mail.gmail.com>
In-Reply-To
<alpine.LFD.0.999.0711090747210.15101@woody.linux-foundation.org>
On 11/9/07, Linus Torvalds <torvalds@linux-foundation.org> wrote:
Show 22 quoted lines
>
>
> On Wed, 7 Nov 2007, Jon Smirl wrote:
> >
> > Then why doesn't this work?
>
> Jon, lookie here:
>
> > jonsmirl@terra:~/mpc5200b$ git log Documentation
> > all the log for Documentation....
> > jonsmirl@terra:~/mpc5200b$ cd Documentation
> > jonsmirl@terra:~/mpc5200b/Documentation$ git log Documentation
>
> Instead of the above sequence, do:
>
>         jonsmirl@terra:~/mpc5200b$ ls Documentation
>         .. all the files in Documentation ..
>         jonsmirl@terra:~/mpc5200b$ cd Documentation
>         jonsmirl@terra:~/mpc5200b/Documentation$ ls Documentation
>
> and now tell me, why doesn't that work? And can't you see how *stupid*
> your complaint is?

I never expected that to work it was just a response to the earlier misstatement that the paths were relative to the project root. It demonstrated that they were not.

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 ."

Show 20 quoted lines
>
> The rule is:
>  - git log without arguments gives the whole, unabridged, and full
>    history.
>  - git log with arguments gives the *simplified* history for those
>    arguments.
>
> But the arguments - if they exist - are always relative. You want things
> like filename completion to work. Making the pathname arguments absolute
> would be horrible. Think about it: it's just much more logical to always
> be able to say "I want the log for file xyz", and you don't want that to
> be absolute, since you shouldn't care where in the tree you are.
>
> And the fact that git log gives the whole history when you don't give any
> arguments at all IN NO WAY makes it any more sensible to give "absolute"
> pathnames. The history being "whole" has nothing to do with the pathnames
> being "absolute". The two are totally independent issues.
>
>                         Linus
>
-- 
Jon Smirl
jonsmirl@gmail.com
Previous: Linus TorvaldsNext: Linus Torvalds
Message 14 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.