Skip to content

Commit

Permalink
rebase: factor out clean work tree check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Martin von Zweigbergk authored and Junio C Hamano committed Feb 10, 2011
1 parent 71786f5 commit caf038c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions git-rebase--interactive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions git-rebase.sh
Original file line number Diff line number Diff line change
Expand Up @@ -511,10 +511,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

Expand Down

0 comments on commit caf038c

Please sign in to comment.