* Re: Including branch info in git format-patch
2008-06-19 20:54 ` Junio C Hamano
@ 2008-06-19 21:06 ` Jeff King
2008-06-19 21:08 ` Jeff King
2008-06-19 21:15 ` Sverre Rabbelier
2008-06-19 21:26 ` Mukund Sivaraman
2 siblings, 1 reply; 9+ messages in thread
From: Jeff King @ 2008-06-19 21:06 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Mukund Sivaraman, git
On Thu, Jun 19, 2008 at 01:54:15PM -0700, Junio C Hamano wrote:
> > 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 that is totally dependent on the workflow, which is what I was
trying to say above. It really depends on how the patch-submitter
organizes his branches.
> 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.
I suspect you would do better to look at branch.quick-hack.merge, so
that you say "this was based on upstream's X", not "this is my
quick-hack".
But there are so many ways this could go wrong, since the patches you're
formatting might not even have anything to do with the branch you're on.
-Peff
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Including branch info in git format-patch
2008-06-19 21:06 ` Jeff King
@ 2008-06-19 21:08 ` Jeff King
0 siblings, 0 replies; 9+ messages in thread
From: Jeff King @ 2008-06-19 21:08 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Mukund Sivaraman, git
On Thu, Jun 19, 2008 at 05:06:17PM -0400, Jeff King wrote:
> > 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.
>
> I suspect you would do better to look at branch.quick-hack.merge, so
> that you say "this was based on upstream's X", not "this is my
> quick-hack".
>
> But there are so many ways this could go wrong, since the patches you're
> formatting might not even have anything to do with the branch you're on.
Side note: if you have a particular workflow, it might make sense,
rather than using format-patch directly, to codify that workflow in
another script which says "ok, this is how I grab a branch and send it
upstream". And in that case, you could look up "here's where I branched
from" and feed it into the patch via format-patch's --subject-prefix
option.
-Peff
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Including branch info in git format-patch
2008-06-19 20:54 ` Junio C Hamano
2008-06-19 21:06 ` Jeff King
@ 2008-06-19 21:15 ` Sverre Rabbelier
2008-06-19 21:26 ` Mukund Sivaraman
2 siblings, 0 replies; 9+ messages in thread
From: Sverre Rabbelier @ 2008-06-19 21:15 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Jeff King, Mukund Sivaraman, git
On Thu, Jun 19, 2008 at 10:54 PM, Junio C Hamano <gitster@pobox.com> wrote:
> 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>
> 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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Including branch info in git format-patch
2008-06-19 20:54 ` Junio C Hamano
2008-06-19 21:06 ` Jeff King
2008-06-19 21:15 ` Sverre Rabbelier
@ 2008-06-19 21:26 ` Mukund Sivaraman
2008-06-19 21:41 ` Junio C Hamano
2 siblings, 1 reply; 9+ messages in thread
From: Mukund Sivaraman @ 2008-06-19 21:26 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Jeff King, git
On Thu, Jun 19, 2008 at 01:54:15PM -0700, Junio C Hamano wrote:
> 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.
I follow what you are saying. In our workflow case, pointing out the
remote (public) branch name should be sufficient (as this's the public
shared branch among us, and all patchsets shared with others are against
the public branches). Perhaps I can add it to the [PATCH] text in the
subject line as Jeff suggests.
My problem is that I can't send a patch out to the list for other
developers to try, without some annotation for them, of which branch to
try it on.
Mukund
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Including branch info in git format-patch
2008-06-19 21:26 ` Mukund Sivaraman
@ 2008-06-19 21:41 ` Junio C Hamano
2008-06-19 21:55 ` Mukund Sivaraman
0 siblings, 1 reply; 9+ messages in thread
From: Junio C Hamano @ 2008-06-19 21:41 UTC (permalink / raw)
To: Mukund Sivaraman; +Cc: Jeff King, git
Mukund Sivaraman <muks@banu.com> writes:
> My problem is that I can't send a patch out to the list for other
> developers to try, without some annotation for them, of which branch to
> try it on.
So what's wrong telling that when you send out the patch, between the time
you run format-patch and send-email?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Including branch info in git format-patch
2008-06-19 21:41 ` Junio C Hamano
@ 2008-06-19 21:55 ` Mukund Sivaraman
0 siblings, 0 replies; 9+ messages in thread
From: Mukund Sivaraman @ 2008-06-19 21:55 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Jeff King, git
On Thu, Jun 19, 2008 at 02:41:54PM -0700, Junio C Hamano wrote:
> > My problem is that I can't send a patch out to the list for other
> > developers to try, without some annotation for them, of which branch to
> > try it on.
>
> So what's wrong telling that when you send out the patch, between the time
> you run format-patch and send-email?
>
I had asked if there was some way the remote branch name could
automatically be inserted by git format-patch, instead of manually adding
it in the patch message or in a cover letter. What Jeff suggested seems
good to me (of using --subject-prefix) as that is removed automatically
when the patch is applied by git am.
Mukund
^ permalink raw reply [flat|nested] 9+ messages in thread