Demonstrate git-show is broken with ranges
[gitweb.git] / git-rebase--merge.sh
index c04ce8a2973e07c19fa39b3dd1837cd622f68442..dc599077f0e55472ae814ed4e15f5b3a1b729caf 100644 (file)
@@ -78,7 +78,7 @@ call_merge () {
                die "$resolvemsg"
                ;;
        2)
-               echo "Strategy: $rv $strategy failed, try another" 1>&2
+               echo "Strategy: $strategy failed, try another" 1>&2
                die "$resolvemsg"
                ;;
        *)
@@ -90,10 +90,13 @@ call_merge () {
 
 finish_rb_merge () {
        move_to_original_branch
-       git notes copy --for-rewrite=rebase < "$state_dir"/rewritten
-       if test -x "$GIT_DIR"/hooks/post-rewrite &&
-               test -s "$state_dir"/rewritten; then
-               "$GIT_DIR"/hooks/post-rewrite rebase < "$state_dir"/rewritten
+       if test -s "$state_dir"/rewritten
+       then
+               git notes copy --for-rewrite=rebase <"$state_dir"/rewritten
+               if test -x "$GIT_DIR"/hooks/post-rewrite
+               then
+                       "$GIT_DIR"/hooks/post-rewrite rebase <"$state_dir"/rewritten
+               fi
        fi
        rm -r "$state_dir"
        say All done.
@@ -127,10 +130,7 @@ esac
 
 mkdir -p "$state_dir"
 echo "$onto_name" > "$state_dir/onto_name"
-echo "$head_name" > "$state_dir/head-name"
-echo "$onto" > "$state_dir/onto"
-echo "$orig_head" > "$state_dir/orig-head"
-echo "$GIT_QUIET" > "$state_dir/quiet"
+write_basic_state
 
 msgnum=0
 for cmt in `git rev-list --reverse --no-merges "$revisions"`