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

Re: Including branch info in git format-patch

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 19, 2008, 20:54 UTC
Message-ID
<7vskv9rvrc.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20080619202843.GA6207@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 6 quoted lines
> 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.

Also, in git, there is no independent "branch history", so anybody who says "this patch was taken from this branch" is either speaking very loosely, or does not understand git's branching model at all, or bit of both.

If you have a history of this shape:
                    (other cruft)
                          \
                   ----o---o next
                      /
         o---o---o---o master
        /       /
    ---o---o---A

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.

Previous: Jeff KingNext: Jeff King
Message 3 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.