Code

rebase: remember strategy and strategy options
[git.git] / git-rebase.sh
index 8a36e7a86162839b7afb9b9cd45745da6e95f8e2..f4ad7c1659c4576e15886a0cb67bfcd6b6fbf977 100755 (executable)
@@ -81,6 +81,9 @@ read_basic_state () {
        fi &&
        GIT_QUIET=$(cat "$state_dir"/quiet) &&
        test -f "$state_dir"/verbose && verbose=t
+       test -f "$state_dir"/strategy && strategy="$(cat "$state_dir"/strategy)"
+       test -f "$state_dir"/strategy_opts &&
+               strategy_opts="$(cat "$state_dir"/strategy_opts)"
 }
 
 write_basic_state () {
@@ -89,6 +92,9 @@ write_basic_state () {
        echo "$orig_head" > "$state_dir"/orig-head &&
        echo "$GIT_QUIET" > "$state_dir"/quiet &&
        test t = "$verbose" && : > "$state_dir"/verbose
+       test -n "$strategy" && echo "$strategy" > "$state_dir"/strategy
+       test -n "$strategy_opts" && echo "$strategy_opts" > \
+               "$state_dir"/strategy_opts
 }
 
 output () {