Alban Gruin <alban.gr...@gmail.com> writes:

> This rewrites complete_action() from shell to C.
>
> A new mode is added to rebase--helper (`--complete-action`), as well as
> a new flag (`--autosquash`).
>
> Finally, complete_action() is stripped from git-rebase--interactive.sh.
>
> The original complete_action() would return the code 2 when the todo
> list contained no actions.  This was a special case for rebase -i and
> -p; git-rebase.sh would then apply the autostash, delete the state
> directory, and die with the message "Nothing to do".  This cleanup is
> rewritten in C instead of returning 2.  As rebase -i no longer returns
> 2, the comment describing this behaviour in git-rebase.sh is updated to
> reflect this change.

Hmph.  It is easy enough to do the clean-up ourselves in this code,
instead of asking the caller to do so.  On the other hand, stashing
of local changes is done by the caller, so it feels a bit strange
way to divide the labor between the two parts.

Other than that design choice, the patch itself looks reasonable and
a fairly faithful reimplementation of what the scripted one did.

Reply via email to