From: Jeff King Date: Mon, 05 Oct 2009 22:00:32 GMT Subject: Re: Confusing git pull error message Message-ID: <20091005220032.GA29113@coredump.intra.peff.net> In-Reply-To: <7vd451ab16.fsf@alter.siamese.dyndns.org> On Mon, Oct 05, 2009 at 12:36:05PM -0700, Junio C Hamano wrote: > -- >8 -- > Subject: [PATCH] git-pull: dead code removal > > Back when a74b170 (git-pull: disallow implicit merging to detached HEAD, > 2007-01-15) added this check, $? referred to the error status of reading > HEAD as a symbolic-ref; but cd67e4d (Teach 'git pull' about --rebase, > 2007-11-28) moved the command away from where the check is, and nobody > noticed the breakage. Ever since, $? has always been 0 (tr at the end of > the pipe to find merge_head never fails) and other case arms were never > reached. > > These days, error_on_no_merge_candidates function is prepared to handle a > detached HEAD case, which was what the code this patch removes used to > handle. Looks good to me. Acked-by: Jeff King -Peff