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

Re: git-format-patch-script bug?

From
Junio C Hamano <junkio@cox.net>
Date
Aug 7, 2005, 19:55 UTC
Message-ID
<7viryhv7w9.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<m1y87dwpak.fsf@ebiederm.dsl.xmission.com>
ebiederm@xmission.com (Eric W. Biederman) writes:
> What format-patch does is currently is fine.  If format-patch would
> simply notice the case and fail gracefully that would be sufficient to
> avoid giving false impressions.

Hmph. Since it uses merge-order, We should be able to change it use the tagged output format of rev-list to detect the revision list discontinuity and skip generating diff for such. Or as you suggest just run "diff-tree with the first parent".

I've been wanting to update format-patch to take the commit begin-end pair in the rev-parse format, that is:

    $ git format-patch his..mine

I am reluctant to actually do this right away, because this is an incompatible change from the current format:

    $ git format-patch his mine

The same goes for rebase (and therefore cherry). I could use an ugly heuristics for backward compatibility like "if invoked with exactly two parameters, and there is no prefix ^ nor .. in these two, then use the old interpretation, otherwise give them to rev-parse", but I think this is ugly.

So my question to the list is: do people mind this change?
Previous: Eric W. Biederman
Message 4 of 4 in “git-format-patch-script bug?”
  1. Eric W. BiedermanAug 7, 2005
  2. Junio C HamanoAug 7, 2005
  3. Eric W. BiedermanAug 7, 2005
  4. Junio C HamanoAug 7, 2005

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.