Re: [PATCH/RFC 04/20] rebase: remove unused rebase state 'prev_head'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano venit, vidit, dixit 29.11.2010 22:06:
> Michael J Gruber <git@xxxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxx>
>>> ---
>>
>> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]