Code

rebase: extract code for writing basic state
[git.git] / git-rebase--interactive.sh
index 4af0bc6c8f72ebe1f94d1ef3258069ed06ee7c59..437cc52b2441f26370fd155348134b171fadb341 100755 (executable)
@@ -707,16 +707,13 @@ orig_head=$(git rev-parse --verify HEAD) || die "No HEAD?"
 mkdir "$state_dir" || die "Could not create temporary $state_dir"
 
 : > "$state_dir"/interactive || die "Could not mark as interactive"
-echo "$head_name" > "$state_dir"/head-name
-
-echo $orig_head > "$state_dir"/head
+write_basic_state
 case "$rebase_root" in
 '')
        rm -f "$state_dir"/rebase-root ;;
 *)
        : >"$state_dir"/rebase-root ;;
 esac
-echo $onto > "$state_dir"/onto
 test -z "$strategy" || echo "$strategy" > "$state_dir"/strategy
 test t = "$verbose" && : > "$state_dir"/verbose
 if test t = "$preserve_merges"