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

Re: Can't find the revelant commit with git-log

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 29, 2011, 05:47 UTC
Message-ID
<7vsjwcb6rh.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4D437CA0.1070006@lsrfire.ath.cx>
René Scharfe <rene.scharfe@lsrfire.ath.cx> writes:
> Perhaps we should check my underlying assumption first: is it reasonable
> to expect a git log command to show the same commits with and without a
> path spec that covers all changed files?

The simplest case would be "git log ." vs "git log" from the root level of the repository, right? Traditionally, the former is "please show _one_ simplest history that can explain how the current commit came to be" (i.e. with merge simplification), while the latter is "please list everything that is behind the current commit" (i.e. without), I think.

It feels unintuitive, but my understanding of the rationale behind the design is that, the expectation Linus had when he first did the pathspec limited traversal was that most of the time "git log $path" is used to get an explanation. It follows that having to say "git log --simplify $path" would have been a nuisance, so "with pathspec, we simplify" was thought to be a reasonable default.

Previous: René ScharfeNext: René Scharfe
Message 17 of 30 in “Can't find the revelant commit with git-log”
  1. Francis MoreauJan 25, 2011
  2. René ScharfeJan 25, 2011
  3. Francis MoreauJan 25, 2011
  4. Francis MoreauJan 26, 2011
  5. Johannes SixtJan 26, 2011
  6. Francis MoreauJan 26, 2011
  7. Sverre RabbelierJan 26, 2011
  8. Francis MoreauJan 26, 2011
  9. Sverre RabbelierJan 26, 2011
  10. Francis MoreauJan 26, 2011
  11. Junio C HamanoJan 26, 2011
  12. Francis MoreauJan 26, 2011
  13. René ScharfeJan 26, 2011
  14. René ScharfeJan 28, 2011
  15. Junio C HamanoJan 29, 2011
  16. René ScharfeJan 29, 2011
  17. Junio C HamanoJan 29, 2011
  18. René ScharfeJan 29, 2011
  19. Junio C HamanoFeb 1, 2011
  20. Junio C HamanoFeb 7, 2011
  21. René ScharfeFeb 10, 2011
  22. René ScharfeJan 29, 2011
  23. René ScharfeJan 28, 2011
  24. Francis MoreauJan 29, 2011
  25. René ScharfeJan 29, 2011
  26. Francis MoreauJan 29, 2011
  27. René ScharfeJan 29, 2011
  28. Francis MoreauJan 26, 2011
  29. René ScharfeJan 26, 2011
  30. Francis MoreauJan 26, 2011

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.