281
282
test -d "$rewritten" &&
283
pick_one_preserving_merges "$@" && return
284
- output eval git cherry-pick $allow_rerere_autoupdate \
284
+ output eval git cherry-pick $allow_rerere_autoupdate $allow_empty_message \
285
${gpg_sign_opt:+$(git rev-parse --sq-quote "$gpg_sign_opt")} \
286
"$strategy_args" $empty_args $ff "$@"
287
406
;;
407
*)
408
output eval git cherry-pick $allow_rerere_autoupdate \
409
+ $allow_empty_message \
410
${gpg_sign_opt:+$(git rev-parse --sq-quote "$gpg_sign_opt")} \
411
"$strategy_args" "$@" ||
412
die_with_patch $sha1 "$(eval_gettext "Could not pick \$sha1")"
560
561
mark_action_done
562
do_pick $sha1 "$rest"
562
- git commit --amend --no-post-rewrite ${gpg_sign_opt:+"$gpg_sign_opt"} || {
563
+ git commit --amend --no-post-rewrite ${gpg_sign_opt:+"$gpg_sign_opt"} \
564
+ $allow_empty_message || {
565
warn "$(eval_gettext "\
566
Could not amend commit after successfully picking \$sha1... \$rest
567
This is most likely due to an empty commit message, or the pre-commit hook
609
# This is an intermediate commit; its message will only be
610
# used in case of trouble. So use the long version:
611
do_with_author output git commit --amend --no-verify -F "$squash_msg" \
610
- ${gpg_sign_opt:+"$gpg_sign_opt"} ||
612
+ ${gpg_sign_opt:+"$gpg_sign_opt"} $allow_empty_message ||
613
die_failed_squash $sha1 "$rest"
614
;;
615
*)
617
if test -f "$fixup_msg"
618
then
619
do_with_author git commit --amend --no-verify -F "$fixup_msg" \
618
- ${gpg_sign_opt:+"$gpg_sign_opt"} ||
620
+ ${gpg_sign_opt:+"$gpg_sign_opt"} $allow_empty_message ||
621
die_failed_squash $sha1 "$rest"
622
else
623
cp "$squash_msg" "$GIT_DIR"/SQUASH_MSG || exit
624
rm -f "$GIT_DIR"/MERGE_MSG
625
do_with_author git commit --amend --no-verify -F "$GIT_DIR"/SQUASH_MSG -e \
624
- ${gpg_sign_opt:+"$gpg_sign_opt"} ||
626
+ ${gpg_sign_opt:+"$gpg_sign_opt"} $allow_empty_message ||
627
die_failed_squash $sha1 "$rest"
628
fi
629
rm -f "$squash_msg" "$fixup_msg"
756
continue)
757
if test ! -d "$rewritten"
758
then
757
- exec git rebase--helper ${force_rebase:+--no-ff} --continue
759
+ exec git rebase--helper ${force_rebase:+--no-ff} $allow_empty_message \
760
+ --continue
761
fi
762
# do we have anything to commit?
763
if git diff-index --cached --quiet HEAD --
797
You have uncommitted changes in your working tree. Please commit them
798
first and then run 'git rebase --continue' again.")"
799
do_with_author git commit --amend --no-verify -F "$msg" -e \
797
- ${gpg_sign_opt:+"$gpg_sign_opt"} ||
800
+ ${gpg_sign_opt:+"$gpg_sign_opt"} $allow_empty_message ||
801
die "$(gettext "Could not commit staged changes.")"
802
else
803
do_with_author git commit --no-verify -F "$msg" -e \
801
- ${gpg_sign_opt:+"$gpg_sign_opt"} ||
804
+ ${gpg_sign_opt:+"$gpg_sign_opt"} $allow_empty_message ||
805
die "$(gettext "Could not commit staged changes.")"
806
fi
807
fi
820
821
if test ! -d "$rewritten"
822
then
820
- exec git rebase--helper ${force_rebase:+--no-ff} --continue
823
+ exec git rebase--helper ${force_rebase:+--no-ff} $allow_empty_message \
824
+ --continue
825
fi
826
do_rest
827
return 0
1020
if test -z "$rebase_root" && test ! -d "$rewritten"
1021
then
1022
require_clean_work_tree "rebase"
1019
- exec git rebase--helper ${force_rebase:+--no-ff} --continue
1023
+ exec git rebase--helper ${force_rebase:+--no-ff} $allow_empty_message \
1024
+ --continue
1025
fi
1026
do_rest
1027