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

Re: [RFC] git-format-patch options

From
Andreas Ericsson <ae@op5.se>
Date
Nov 21, 2005, 16:44 UTC
Message-ID
<4381F97A.9010105@op5.se>
In-Reply-To
<20051121162540.4722.qmail@web31812.mail.mud.yahoo.com>
Luben Tuikov wrote:
Show 24 quoted lines
> It is often the case that "since <mine> head forked from
> <his> head" (quoting the manual page of git-format-patch),
> for various projects, some patches have been accepted and
> some have not.
> 
> I was wondering about the value of
> 
>   git-format-patch <commit-ish>
> 
> to output/prepare a diff patch between the indicated commit
> and its parent.  As opposed to the current behaviour giving
> all changes between the indicated commit and HEAD.
> 
> So in effect the form above would become the trivial:
> 
>   git-format-patch <commit-ish>..HEAD
> 
> and
> 
>   git-format-patch <commit-ish>
> 
> would give the diff patch between the indicated commit and
> its parent.
> 

Please don't. git-format-patch is generally used to send in a series of patches ranging back from HEAD, so this would mean less userfriendliness in the most usual case.

Here's the "sed -n 90,100p" commentary from git-format-patch: ----%<-----%<---- # Backward compatible argument parsing hack. # # Historically, we supported: # 1. "rev1" is equivalent to "rev1..HEAD" # 2. "rev1..rev2" # 3. "rev1" "rev2 is equivalent to "rev1..rev2" # # We want to take a sequence of "rev1..rev2" in general. # Also, "rev1.." should mean "rev1..HEAD"; git-diff users are # familiar with that syntax. ----%<-----%<----

Perhaps the man-page needs to be updated with this info.
-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
Previous: Luben TuikovNext: Luben Tuikov
Message 2 of 9 in “[RFC] git-format-patch options”
  1. Luben TuikovNov 21, 2005
  2. Andreas EricssonNov 21, 2005
  3. Luben TuikovNov 21, 2005
  4. Andreas EricssonNov 21, 2005
  5. Luben TuikovNov 21, 2005
  6. Ryan AndersonNov 21, 2005
  7. Luben TuikovNov 22, 2005
  8. Junio C HamanoNov 21, 2005
  9. Luben TuikovNov 22, 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.