git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Ericsson <ae@op5.se>
To: Samuel Tardieu <sam@rfc1149.net>
Cc: Bill Lear <rael@zopyra.com>, git@vger.kernel.org
Subject: Re: Using the --track option when creating a branch
Date: Thu, 30 Oct 2008 15:06:16 +0100	[thread overview]
Message-ID: <4909BF58.9010500@op5.se> (raw)
In-Reply-To: <2008-10-30-14-52-52+trackit+sam@rfc1149.net>

Samuel Tardieu wrote:
>>>>>> "Andreas" == Andreas Ericsson <ae@op5.se> writes:
> 
> Andreas> This particular bikeshed was painted a long time ago, with
> Andreas> the consensus going in favour of "git push" pushing all
> Andreas> *matching* refspecs.
> 
> I still don't understand why this is useful, especially when git push
> already has a "--all" option.
> 

--all pushes all refs, even the non-matching ones, which is very
rarely desirable and only accidentally sometimes the same as "push all
matching refs".

> I know that I've never had the intent to push all the refs without
> thinking about it first. Most of the time, I intend to push only
> the current branch I am in.
> 

Then say so. There's a very simple command syntax for it:
"git push <remote> <current-branch>"

> The current behaviour made me remove the branches I was not actively
> on locally, because I would get errors from "git push" all the time
> saying that I was not up-to-date in those branches.
> 

That's an orthogonal issue, and one that really could be fixed without
anyone complaining. Send a patch that checks if foo is a strict subset
of <remote>/foo before trying to send it, and abort if it is so. This
means that we'll try to push "foo" if upstream rewrote their "foo", but
perhaps that's just as well.

Note though that the patch mustn't try to apply any smarts if a ref is
given explicitly.

> Note that the "git pull" issue is completely different, as it merges
> or fast forwards the current branch only.
> 

"git pull" is actually only vaguely connected with "git push". The
opposite of "push" is "fetch" in git lingo.

-- 
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 14:07 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
2008-10-30 13:52         ` Samuel Tardieu
2008-10-30 14:06           ` Andreas Ericsson [this message]
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=4909BF58.9010500@op5.se \
    --to=ae@op5.se \
    --cc=git@vger.kernel.org \
    --cc=rael@zopyra.com \
    --cc=sam@rfc1149.net \
    /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).