Re: [PATCH] rebase -i: remove CHERRY_PICK_HEAD when cherry-pick failed

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

 



On 03/19/2012 12:51 PM, Junio C Hamano wrote:
> Isn't the real solution *not* to create the CHERRY_PICK_HEAD in the
> sequencer when it is not know if it is needed, instead of the current code
> which seems to create first and then selectively try to unlink() it?
>   
I do agree that it's not pretty to create the file, then quickly delete
it. I did consider putting a condition around the code that creates
CHERRY_PICK_HEAD and REVERT_HEAD.

A possible condition would be checking the env var GIT_CHERRY_PICK_HELP,
which is only set if 'cherry-pick' is called under 'rebase -i'. I never
liked how we're passing in a help message using an env var, so I don't
feel like introducing another dependency on this env var is a good idea.

Another possible condition would be to add another flag to
"cherry-pick". But a proper implementation would not only involve adding
code to parse the flag in 'cherry-pick', but also adding code to
save/restore the option in sequencer, even though 'rebase -i' only need
it for single_pick. It's not that adding these codes are difficult, but
it seems like we're adding a lot of code just to add a behavior that
only 'rebase -i' needs.

Though if the additional flag in "cherry-pick" and additional option in
sequencer could be useful elsewhere, I could do it that way too.
--
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]