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

Re: Including branch info in git format-patch

From
SRSverre Rabbelier <alturin@gmail.com>
Date
Jun 19, 2008, 21:15 UTC
Message-ID
<bd6139dc0806191415r64755ef3p90cecba7a074d9bc@mail.gmail.com>
In-Reply-To
<7vskv9rvrc.fsf@gitster.siamese.dyndns.org>
On Thu, Jun 19, 2008 at 10:54 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 15 quoted lines
> Jeff King <peff@peff.net> writes:
>
>> You could potentially add a config option to put the branch name inside
>> the '[PATCH]' text. This text is generally stripped away before
>> applying, so it would still free up the receiver to apply on whatever
>> branch they wanted. I don't think it would make sense for git
>> development, since we typically use topic branches, so keeping it
>> configurable would make sense.
>
> People would work on individual patches on topic branches that are named
> differently from the branch on the other end anyway (the branch that
> corresonds to the other end will be used for local integration testing in
> such a setup), so I do not see much point in stating which local branch
> happened to have been checked out when the patch was generated, in the
> output.

I think what Mukund is asking for is a way to specify what upstream branch the commit should be applied to. This would be a feature to help the person who is going to do the applying, so it is ok if the person formatting the patch has to do a little work for that (e.g., specify which upstream branch to format-patch as a cmdline option)

> If you have a history of this shape:
<snip>
Show 5 quoted lines
> which "branch label" would you give to the format-patch output that shows
> commit A?  It may apply to both master and next, and it is really up to
> the project's convention what to do with it.  The side branch the patch
> was developed on may be named "quick-hack", which would not have any
> relevance to the final location of where that patch wants to be in.
You would give it the label of the branch you want it applied to!
-- 
Cheers,

Sverre Rabbelier
Previous: Jeff KingNext: Mukund Sivaraman
Message 6 of 9 in “Including branch info in git format-patch”
  1. Mukund SivaramanJun 19, 2008
  2. Jeff KingJun 19, 2008
  3. Junio C HamanoJun 19, 2008
  4. Jeff KingJun 19, 2008
  5. Jeff KingJun 19, 2008
  6. Sverre RabbelierJun 19, 2008
  7. Mukund SivaramanJun 19, 2008
  8. Junio C HamanoJun 19, 2008
  9. Mukund SivaramanJun 19, 2008

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.