Re: setting up tracking on push
- From
Jeff King <peff@peff.net>
- Date
- Mar 11, 2009, 03:06 UTC
- Message-ID
- <20090311030604.GA3044@coredump.intra.peff.net>
- In-Reply-To
- <76718490903101959i61df26aagdff44bb9ab4593ab@mail.gmail.com>
On Tue, Mar 10, 2009 at 10:59:01PM -0400, Jay Soffian wrote:
> But the primary reason for the -u is to differentiate the operation, > just like -m and -d.
OK, that at least makes a bit of sense to me.
Show 6 quoted lines
> > 2. In your example, if I give only a single non-option argument, it is > > interpreted as the upstream (and presumably the branch defaults to > > HEAD). But in other branch commands, it is interpreted as the > > branch, and the upstream defaults to HEAD. > > No, look at how -m works. [<oldbranch>] <newbranch>. I modeled it after that.
Hmm. I think of that as "make <newbranch>, move from <oldbranch> or HEAD". Just as regular branch is "make <newbranch>, start from <oldbranch> or HEAD". But your proposal is "update <newbranch> or HEAD, from <oldbranch>".
If "-u" is supposed to be a general mode, then what does it mean to say:
git branch -u foo
? I would expect that to "update" foo. But if --track is given, then it means "update HEAD to track foo".
-Peff