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

Re: Confusion about diffing branches

From
Theodore Tso <tytso@mit.edu>
Date
Aug 27, 2007, 17:05 UTC
Message-ID
<20070827170504.GH4680@thunk.org>
In-Reply-To
<38b2ab8a0708270621l63f3da56j4667014e62a5de92@mail.gmail.com>
On Mon, Aug 27, 2007 at 03:21:32PM +0200, Francis Moreau wrote:
> This "inconsistency" had already been raised before. Please refer to:
> http://www.gelato.unsw.edu.au/archives/git/0612/35354.html

That's not a major inconsistency problem IMHO because git diff does not take a set of commits, but rather two end points --- conceptually, there's no way to make sense out of trying to feed an arbitrary set of commitments to git-diff.

The bigger inconsistency is with git-format-patch, which *does* take a set of commits, and where "git-format-patch a" does operates on a very different set of commits than what what "git-rev-list a" returns. I understand that for backwards compatibility "git-format-patch a" is equivalent to "git-format-patch a..HEAD", but what it means is that all other ways of specifying sets of commits work with git-format-patch, *except* if you want to specify all commits from the beginning of time to a particular head (i.e., "git-rev-list a") is something that you simply can not possibly do using git-format-patch. This was mentioned on a blog entry as one of those "really confusing inconsistencies" in git.

						- Ted
Previous: Mike HommeyNext: Junio C Hamano
Message 11 of 14 in “Confusion about diffing branches”
  1. Shawn BohrerAug 26, 2007
  2. Junio C HamanoAug 27, 2007
  3. Shawn BohrerAug 27, 2007
  4. Mike HommeyAug 27, 2007
  5. Junio C HamanoAug 27, 2007
  6. Mike HommeyAug 27, 2007
  7. Francis MoreauAug 27, 2007
  8. Mike HommeyAug 27, 2007
  9. Junio C HamanoAug 27, 2007
  10. Mike HommeyAug 27, 2007
  11. Theodore TsoAug 27, 2007
  12. Junio C HamanoAug 27, 2007
  13. Theodore TsoAug 27, 2007
  14. Jakub NarebskiAug 27, 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.