diff options
author | Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> | 2011-02-06 13:43:53 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-02-10 14:08:09 -0800 |
commit | 84df4560ed92a771d38081ecca2d40ca35811907 (patch) | |
tree | a7866155495fcfa738b9748722c87651c28a5bc7 /git-rebase--merge.sh | |
parent | 2959c283662c62e90d08d3795073534f278deee6 (diff) | |
download | git-84df4560ed92a771d38081ecca2d40ca35811907.tar.gz |
rebase: extract code for writing basic state
Extract the code for writing the state to rebase-apply/ or
rebase-merge/ when a rebase is initiated. This will make it easier to
later make both interactive and non-interactive rebase remember the
options used.
Note that non-interactive rebase stores the sha1 of the original head
in a file called orig-head, while interactive rebase stores it in a
file called head. Change this by writing to orig-head in both
cases. When reading, try to read from orig-head. If that fails, read
from head instead. This protects users who upgraded git while they had
an ongoing interactive rebase, while still making it possible to
remove the code that reads from head at some point in the future.
Helped-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase--merge.sh')
-rw-r--r-- | git-rebase--merge.sh | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/git-rebase--merge.sh b/git-rebase--merge.sh index c04ce8a297..eb0f7bc157 100644 --- a/git-rebase--merge.sh +++ b/git-rebase--merge.sh @@ -127,10 +127,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"` |