From: Michael J Gruber Date: Tue, 30 Nov 2010 07:29:05 GMT Subject: Re: [PATCH/RFC 04/20] rebase: remove unused rebase state 'prev_head' Message-ID: <4CF4A7C1.3000202@drmicha.warpmail.net> In-Reply-To: <7v7hfv262a.fsf@alter.siamese.dyndns.org> Junio C Hamano venit, vidit, dixit 29.11.2010 22:06: > 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. Good! I just wanted to make sure that it wasn't used in some opaque way. Michael