From: Junio C Hamano <gitster@pobox.com>
To: Kevin Bracey <kevin@bracey.fi>
Cc: Felipe Contreras <felipe.contreras@gmail.com>, git@vger.kernel.org
Subject: Re: [RFC] New kind of upstream branch: base branch
Date: Fri, 17 May 2013 12:51:47 -0700 [thread overview]
Message-ID: <7va9ntxu3w.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <51968311.1020107@bracey.fi> (Kevin Bracey's message of "Fri, 17 May 2013 22:20:49 +0300")
Kevin Bracey <kevin@bracey.fi> writes:
> On 15/05/2013 23:34, Felipe Contreras wrote:
>> I think I'm using 'upstream' for something it was not intended to,
>> and
>> I think the current 'upstream' behavior should be split into
>> 'upstream' and 'base'.
>>
> I found myself thinking the same thing. It's really convenient being
> able to set your topic branch's upstream to another local branch, so
What is that "another local branch"?
Is the use case "master forks from origin/master and has its own
changes on top, and then topic builds on my master but the range of
commits origin/master..topic includes both changes, that is
inconvenient to when rebuilding topic on top of my master"?
I'd assume that it is the case, and the answer to the previous
question is 'master' in the example.
> git rebase works without parameters. But then I can't use upstream to
> point to a remote version of that topic branch. I want my topic branch
> to know both that it's based on master (or origin/master), and that
> it's upstream is origin/topic.
If we do s/and that it's upstream is/and that it is pushed to/, then
I think I am in general agreement (I wrote about it earlier in a
separate message).
> So, yes, here's a vote in favour of the general concept.
Yes, you should be able to treat what you build on top (upstream)
and where you publish the result (we are still looking for a better
name in the other thread) as two distinct things in a triangular
workflow. I agree that it is an issue we need to address.
We have solved a half ("push goes to a different repository") but
not the other half ("updates a branch whose name is different from
the upstream") in the upcoming 1.8.3 release.
The latest round of design from Felipe calls it branch.$name.push,
if I am not mistaken.
I think it is somewhat an overkill, though.
It is normal for upstream's name not to match the topic's name
(i.e. your 'topic' may branch off of a generic 'master', but would
be named after a more specific purpose of the branch and is unlikely
to be named 'master'. In other words, branch.$name.merge that
points at an upstream that has a name that is totally different from
$name is not an exception. So branch.$name.merge that you have to
set for each branch is a necessity.
However, if you were to push out 'topic' directly (as opposed to
pushing out a result of integrating it and other topic branches to
your 'master') to your own publishing point, it is likely you would
push it out to the same name (i.e. 'topic' will be pushed out as
'topic', not as 'master'). And if that is your workflow, setting
push.default to "current" (and setting remote.pushdefault to your
publishing repository) should be a sufficient interim solution, and
you do not need to set branch.$name.push to each and every branch
you intend to push out, I think.
next prev parent reply other threads:[~2013-05-17 19:51 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-15 20:34 [RFC] New kind of upstream branch: base branch Felipe Contreras
2013-05-15 22:22 ` Philip Oakley
2013-05-16 3:46 ` Felipe Contreras
2013-05-16 19:35 ` Philip Oakley
2013-05-17 0:07 ` Felipe Contreras
2013-05-17 19:20 ` Kevin Bracey
2013-05-17 19:51 ` Junio C Hamano [this message]
2013-05-17 20:15 ` Felipe Contreras
2013-05-18 14:29 ` Kevin Bracey
2013-05-18 18:14 ` Ramkumar Ramachandra
2013-05-18 22:42 ` Felipe Contreras
2013-05-19 6:22 ` Junio C Hamano
2013-05-19 8:12 ` Felipe Contreras
2013-05-17 20:01 ` Felipe Contreras
-- strict thread matches above, loose matches on Subject: below --
2013-05-15 20:28 Felipe Contreras
2013-05-15 22:20 ` Junio C Hamano
2013-05-15 22:50 ` Junio C Hamano
2013-05-15 23:18 ` Felipe Contreras
2013-05-15 22:56 ` Felipe Contreras
2013-05-15 23:14 ` Junio C Hamano
2013-05-15 23:32 ` Felipe Contreras
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7va9ntxu3w.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=kevin@bracey.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).