Re: [PATCH RFC v2 05/19] rebase -i: Implement reword in terms of do_pick
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Aug 4, 2014, 15:16 UTC
- Message-ID
- <vpqzjfki8t8.fsf@anie.imag.fr>
- In-Reply-To
- <a82fd64f943d4b59a01509ae52fc2d7a05d51f4a.1404323078.git.bafain@gmail.com>
Fabian Ruch <bafain@gmail.com> writes:
Show 21 quoted lines
> --- a/git-rebase--interactive.sh
> +++ b/git-rebase--interactive.sh
> @@ -555,20 +555,7 @@ do_next () {
> comment_for_reflog reword
>
> mark_action_done
> - do_pick $sha1 "$rest"
> - # TODO: Work around the fact that git-commit lets us
> - # disable either both the pre-commit and the commit-msg
> - # hook or none. Disable the pre-commit hook because the
> - # tree is left unchanged but run the commit-msg hook
> - # from here because the log message is altered.
> - git commit --allow-empty --amend --no-post-rewrite -n ${gpg_sign_opt:+"$gpg_sign_opt"} &&
> - if test -x "$GIT_DIR"/hooks/commit-msg
> - then
> - "$GIT_DIR"/hooks/commit-msg "$GIT_DIR"/COMMIT_EDITMSG
> - fi || {
> - warn "Could not amend commit after successfully picking $sha1... $rest"
> - exit_with_patch $sha1 1
> - }
> + do_pick --edit $sha1 "$rest"I would have found this easier to review if squashed into the previous patch. My reaction reading the previous patch was "Uh, why duplicate code?", and reading this one "Ah, that's OK". A single patch doing both would have avoided the confusion.
-- Matthieu Moy http://www-verimag.imag.fr/~moy/