From: Finn Arne Gangstad <finnag@pvv.org>
To: Paolo Bonzini <paolo.bonzini@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: push.default???
Date: Wed, 24 Jun 2009 23:59:23 +0200 [thread overview]
Message-ID: <20090624215922.GA13575@pvv.org> (raw)
In-Reply-To: <4A41E8B8.8050803@gmail.com>
On Wed, Jun 24, 2009 at 10:50:00AM +0200, Paolo Bonzini wrote:
>
> Here is what I think you are missing: in the proposed workflow, there is
> an entire group working on one big feature, so there is effectively one
> remote per feature.
I think you are making this more complicated than it is. I just claim
that the idea that "branch names must be identical in both ends" is
not necessarily the best model.
In a sufficiently large origanisation with multiple levels of
repositories (access restrictions, locality, whatever) branch names
are not globally unique, and there is no reasonable way to check if a
branch name is used elsewhere. It is much easier to treat local branch
names as strictly local, and worry about naming (only) when you push
somewhere.
So - even if someone decided to name something "issue-331318" on a
public repository, it doesn't mean you want to call it that locally,
even if you want to push to it.
If a branch already exists on a public repo, it doesn't mean a branch
with the same name but with different contents/purpose cannot exist in
a different repo. So you may have to name the branch something else
locally. Pull knows how to deal with this, but push did not (before
"--tracking").
Another example:
You have worked for a few days on an issue, but need help from someone
else with something. You have set up a public shared repo named
"public", and do:
git push public HEAD:fred-helpme
Fred wants to name it something else that makes him remember what this
branch is about, and does:
git fetch public
git checkout -b tmp-help-john public/fred-helpme
<hack hack>
git commit
git push (no more arguments, and no need to remember what it was named)
You then fetch and look at what Fred has done, and maybe you just use
it, or maybe you don't. Afterwards git push public :fred-helpme to get
rid of the temporary shared branch.
- Finn Arne
prev parent reply other threads:[~2009-06-24 21:59 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-22 10:02 push.default??? Paolo Bonzini
2009-06-22 16:31 ` push.default??? Junio C Hamano
2009-06-22 17:55 ` push.default??? Paolo Bonzini
2009-06-23 10:34 ` push.default??? Finn Arne Gangstad
2009-06-23 12:59 ` push.default??? Paolo Bonzini
2009-06-23 13:11 ` push.default??? Finn Arne Gangstad
2009-06-23 13:21 ` push.default??? Andreas Ericsson
2009-06-23 13:57 ` push.default??? Finn Arne Gangstad
2009-06-23 14:07 ` push.default??? Andreas Ericsson
2009-06-23 13:28 ` push.default??? Paolo Bonzini
2009-06-23 14:48 ` push.default??? Finn Arne Gangstad
2009-06-23 16:32 ` push.default??? Paolo Bonzini
2009-06-23 17:51 ` push.default??? Junio C Hamano
2009-06-23 17:59 ` push.default??? Junio C Hamano
2009-06-24 5:50 ` push.default??? Miles Bader
2009-06-24 6:35 ` push.default??? Junio C Hamano
2009-06-24 8:50 ` push.default??? Paolo Bonzini
2009-06-24 21:59 ` Finn Arne Gangstad [this message]
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=20090624215922.GA13575@pvv.org \
--to=finnag@pvv.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=paolo.bonzini@gmail.com \
/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).