Re: default behaviour for `gitmerge` (no arguments)
- From
Jeff King <peff@peff.net>
- Date
- Jan 12, 2010, 16:23 UTC
- Message-ID
- <20100112162355.GB25092@coredump.intra.peff.net>
- In-Reply-To
- <7v7hrojukz.fsf@alter.siamese.dyndns.org>
On Mon, Jan 11, 2010 at 11:43:40AM -0800, Junio C Hamano wrote:
Show 11 quoted lines
> The code indeed knows (as you can see "git pull" can figure it out) what > other ref the current branch is configured to merge with by default. > There is even a plumbing to do this for script writers. > > $ git for-each-ref --format='%(upstream)' $(git symbolic-ref HEAD) > > We can teach this short-hand to "git merge", perhaps: > > $ git merge --default > > But "no argument" cannot be the short-hand, because...
Hmm. If we had the oft-discussed-but-never-agreed-upon shorthand for "the upstream of" then we wouldn't need a special merge option. You could just do:
git merge %HEAD ;# (or git merge %, IIRC the proposal correctly)
-Peff