summaryrefslogtreecommitdiff
path: root/git-rebase--merge.sh
diff options
context:
space:
mode:
Diffstat (limited to 'git-rebase--merge.sh')
-rw-r--r--git-rebase--merge.sh19
1 files changed, 7 insertions, 12 deletions
diff --git a/git-rebase--merge.sh b/git-rebase--merge.sh
index 9a60cef..cf4c042 100644
--- a/git-rebase--merge.sh
+++ b/git-rebase--merge.sh
@@ -27,7 +27,8 @@ continue_merge () {
cmt=$(cat "$state_dir/current")
if ! git diff-index --quiet --ignore-submodules HEAD --
then
- if ! git commit ${gpg_sign_opt:+"$gpg_sign_opt"} $signoff --no-verify -C "$cmt"
+ if ! git commit ${gpg_sign_opt:+"$gpg_sign_opt"} $signoff $allow_empty_message \
+ --no-verify -C "$cmt"
then
echo "Commit failed, please do not call \"git commit\""
echo "directly, but instead do one of the following: "
@@ -57,6 +58,7 @@ call_merge () {
echo "$msgnum" >"$state_dir/msgnum"
cmt="$(cat "$state_dir/cmt.$msgnum")"
echo "$cmt" > "$state_dir/current"
+ git update-ref REBASE_HEAD "$cmt"
hd=$(git rev-parse --verify HEAD)
cmt_name=$(git symbolic-ref HEAD 2> /dev/null || echo HEAD)
eval GITHEAD_$cmt='"${cmt_name##refs/heads/}~$(($end - $msgnum))"'
@@ -102,15 +104,6 @@ finish_rb_merge () {
say All done.
}
-# The whole contents of this file is run by dot-sourcing it from
-# inside a shell function. It used to be that "return"s we see
-# below were not inside any function, and expected to return
-# to the function that dot-sourced us.
-#
-# However, older (9.x) versions of FreeBSD /bin/sh misbehave on such a
-# construct and continue to run the statements that follow such a "return".
-# As a work-around, we introduce an extra layer of a function
-# here, and immediately call it after defining it.
git_rebase__merge () {
case "$action" in
@@ -137,11 +130,15 @@ skip)
finish_rb_merge
return
;;
+show-current-patch)
+ exec git show REBASE_HEAD --
+ ;;
esac
mkdir -p "$state_dir"
echo "$onto_name" > "$state_dir/onto_name"
write_basic_state
+rm -f "$(git rev-parse --git-path REBASE_HEAD)"
msgnum=0
for cmt in $(git rev-list --reverse --no-merges "$revisions")
@@ -165,5 +162,3 @@ done
finish_rb_merge
}
-# ... and then we call the whole thing.
-git_rebase__merge