Code

rebase: factor out clean work tree check
authorMartin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Tue, 28 Dec 2010 09:30:31 +0000 (10:30 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 28 Dec 2010 23:04:51 +0000 (15:04 -0800)
Remove the check for clean work tree from git-rebase--interactive.sh and
rely on the check in git-rebase.sh.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-rebase--interactive.sh
git-rebase.sh

index c055fc4947cb6e15900eec1844d86f7484715c0a..edde1e53af7ead792e04a2adc526b5748c630f0c 100755 (executable)
@@ -753,8 +753,6 @@ esac
 git var GIT_COMMITTER_IDENT >/dev/null ||
        die "You need to set your committer info first"
 
-require_clean_work_tree "rebase" "Please commit or stash them."
-
 run_pre_rebase_hook "$upstream_arg" "$@"
 
 comment_for_reflog start
index d8c7c8d2c5b463219eb45c424d0580df1e1f4228..e1e5263afdf585057e6fc26d87b20c54351e7b69 100755 (executable)
@@ -513,10 +513,10 @@ case "$#" in
 esac
 orig_head=$branch
 
-test "$type" = interactive && run_interactive_rebase "$@"
-
 require_clean_work_tree "rebase" "Please commit or stash them."
 
+test "$type" = interactive && run_interactive_rebase "$@"
+
 # Now we are rebasing commits $upstream..$branch (or with --root,
 # everything leading up to $branch) on top of $onto