Re: [PATCH/RFC 04/20] rebase: remove unused rebase state 'prev_head'
Junio C Hamano venit, vidit, dixit 29.11.2010 22:06:
Show 21 quoted lines
> Michael J Gruber <git@drmicha.warpmail.net> 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 <martin.von.zweigbergk@gmail.com>
>>> ---
>>
>> 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