From: Jeff King Date: Tue, 12 Jan 2010 16:23:55 GMT Subject: Re: default behaviour for `gitmerge` (no arguments) 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: > 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