[PATCH/RFC 14/20] rebase: factor out clean work tree check
- From
Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
- Date
- Nov 25, 2010, 19:57 UTC
- Message-ID
- <1290715083-16919-15-git-send-email-martin.von.zweigbergk@gmail.com>
- In-Reply-To
- <1290715083-16919-1-git-send-email-martin.von.zweigbergk@gmail.com>
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> --- git-rebase--interactive.sh | 2 -- git-rebase.sh | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index fe56d98..36bf259 100755 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -755,8 +755,6 @@ test -n "$strategy" && strategy="-s $strategy" 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 diff --git a/git-rebase.sh b/git-rebase.sh index 17b5042..9d398eb 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -495,10 +495,10 @@ case "$#" in esac orig_head=$branch -test -n "$interactive_rebase" && run_interactive_rebase "$@" - require_clean_work_tree "rebase" "Please commit or stash them." +test -n "$interactive_rebase" && run_interactive_rebase "$@" + # Now we are rebasing commits $upstream..$branch (or with --root, # everything leading up to $branch) on top of $onto
-- 1.7.3.2.864.gbbb96