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

Re: Confusion about diffing branches

From
Jakub Narebski <jnareb@gmail.com>
Date
Aug 27, 2007, 22:20 UTC
Message-ID
<favin5$2sm$1@sea.gmane.org>
In-Reply-To
<20070827014056.GB7422@mediacenter.austin.rr.com>
Shawn Bohrer wrote:
Show 5 quoted lines
> I must admit that for me, a new git user, it would be much more
> intuitive if all git commands used the same syntax for specifying
> revisions.  After all every other git command that I have used so far
> uses the opposite syntax as git-diff.  This includes git-log,
> git-format-patch, gitk, git-rev-list, and git-rev-parse.

git-rev-list, git-log, gitk accepts _range_ of commits. git-diff and its variants accepts _endpoints_ to compare, with some syntactic sugar to be able to copy arguments from "git log a..b" to "git diff a..b". The arguments are just simply different type.

As to git-format-patch, there is matter of backward compatibilty and ease of use (get last commit as a patch).

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: Theodore Tso
Message 14 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.