public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Andreas Ericsson <ae@op5•se>
To: Bill Lear <rael@zopyra•com>
Cc: Sam Vilain <sam@vilain•net>, git@vger•kernel.org
Subject: Re: Using the --track option when creating a branch
Date: Thu, 30 Oct 2008 13:25:40 +0100	[thread overview]
Message-ID: <4909A7C4.30507@op5.se> (raw)
In-Reply-To: <18697.42140.459170.891195@lisa.zopyra.com>

Bill Lear wrote:
> On Thursday, October 30, 2008 at 06:04:54 (-0600) Bill Lear writes:
>> On Wednesday, October 29, 2008 at 22:12:18 (-0700) Sam Vilain writes:
>>> On Wed, 2008-10-29 at 09:23 -0600, Bill Lear wrote:
>>>> We use git in a way that makes it desirable for us to only push/pull
>>>> to the same remote branch.  So, if I'm in branch X, I want 'git push'
>>>> to push to origin/X, and 'git pull' to fetch into origin/X and then
>>>> merge into X from origin/X.
>>>>
>>>> In other words, we want git push/pull to behave in branches other than
>>>> master the same way it does when in master.
>>>>
>>>> I have discovered the '--track' option when creating a local branch,
>>>> and this appears to me to be the thing that gives us the desired
>>>> behavior.
>>> As things currently stand this is not achievable behaviour.  The
>>> behaviour of 'git push' is to push all matching refs.  If you are lucky
>>> this is what you intended, but it also pushes any changes to *other*
>>> branches that you have made.
>>>
>>> I have tabled a change proposal to make it work as you suggest in a
>>> separate thread.
>> Ok, now I'm confused.  The ONLY thing I want to prevent is the
>> "crossing of streams" issue.  If I am on branch X and issue 'git
>> push', I want X, and ONLY X, to be pushed to the remote repository's X
>> branch --- I don't care if other branches are pushed to their
>> respective remote branches, as long as they don't get merged to X.
> 
> Oh, and also the same thing for 'git pull' --- sorry to leave that out.
> 

This particular bikeshed was painted a long time ago, with the consensus
going in favour of "git push" pushing all *matching* refspecs.

To convince people, I think you need to either come up with arguments
nullifying all the arguments *for* pushing all matching refspecs along
with patches to make the default configurable, with your preferred way
as a default, and a nifty enough shorthand for pushing/fetching all
matching refspecs. For preference, they should be at least 3 separate
patches.

-- 
Andreas Ericsson                   andreas.ericsson@op5•se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

  reply	other threads:[~2008-10-30 12:28 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-29 15:23 Using the --track option when creating a branch Bill Lear
2008-10-29 16:25 ` Santi Béjar
2008-10-29 20:33   ` Bill Lear
2008-10-30  5:12 ` Sam Vilain
2008-10-30 12:04   ` Bill Lear
2008-10-30 12:12     ` Bill Lear
2008-10-30 12:25       ` Andreas Ericsson [this message]
2008-10-30 13:52         ` Samuel Tardieu
2008-10-30 14:06           ` Andreas Ericsson
2008-10-30 14:23             ` Samuel Tardieu
2008-10-30 14:41               ` Pierre Habouzit
2008-10-30 14:56                 ` Samuel Tardieu
2008-10-30 18:00                   ` Sam Vilain
2008-10-30 14:54               ` Andreas Ericsson
2008-10-30 15:04                 ` Samuel Tardieu
2008-10-30 15:25                   ` Andreas Ericsson
2008-10-30 15:42                     ` Bill Lear
2008-10-30 19:13                       ` Marc Branchaud
2008-10-30 17:57                 ` Sam Vilain
2008-10-30 23:24               ` Jakub Narebski
2008-11-02  4:23           ` Jeff King
2008-10-30 16:44         ` Sam Vilain
2008-10-30 12:41     ` Santi Béjar

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=4909A7C4.30507@op5.se \
    --to=ae@op5$(echo .)se \
    --cc=git@vger$(echo .)kernel.org \
    --cc=rael@zopyra$(echo .)com \
    --cc=sam@vilain$(echo .)net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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