From: Junio C Hamano Date: Mon, 29 Nov 2010 21:06:21 GMT Subject: Re: [PATCH/RFC 04/20] rebase: remove unused rebase state 'prev_head' Message-ID: <7v7hfv262a.fsf@alter.siamese.dyndns.org> In-Reply-To: <4CEF67AB.6050700@drmicha.warpmail.net> Michael J Gruber writes: > Martin von Zweigbergk venit, vidit, dixit 25.11.2010 20:57: >> The rebase state 'prev_head' is not used. Remove it. >> >> Signed-off-by: Martin von Zweigbergk >> --- > > The actual value of prev_head was never used. But the check for its > non-nullness made sure that git-rev-parse HEAD^0 succeeded when > $merge_dir was created. Have you made sure that we don't need that check? I think we are Ok. It was a bit sloppy of 9e4bc7d (rebase: cleanup rebasing with --merge, 2006-06-24) to use the output from `git-rev-parse HEAD^0`, which would give you "HEAD^0" as string when HEAD does not exist. Even though the command itself will exit with non-zero status, the exit status was never checked. After 9e4bc7d (rebase: cleanup rebasing with --merge, 2006-06-24), we didn't seem to have any reason to use $prev_head, iow, this change was probably way overdue.