aboutsummaryrefslogtreecommitdiff
path: root/git-rebase--interactive.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-11-29 17:52:32 -0800
committerJunio C Hamano <gitster@pobox.com>2010-11-29 17:52:32 -0800
commite4663556cfa0d85e7a80d731b07d4058335761ff (patch)
tree141596683079fc76435465f3de992a7ddd51abe0 /git-rebase--interactive.sh
parent4ef927a995d9b54b37e4cff8ed7cd92764d4dacd (diff)
parent92c62a3f4f93432c0c82e3031a9e64e03ba290f7 (diff)
downloadgit-e4663556cfa0d85e7a80d731b07d4058335761ff.tar.gz
git-e4663556cfa0d85e7a80d731b07d4058335761ff.tar.xz
Merge branch 'rr/needs-clean-work-tree'
* rr/needs-clean-work-tree: Porcelain scripts: Rewrite cryptic "needs update" error message
Diffstat (limited to 'git-rebase--interactive.sh')
-rwxr-xr-xgit-rebase--interactive.sh14
1 files changed, 3 insertions, 11 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index c2383bfed..5934b97fa 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -153,14 +153,6 @@ run_pre_rebase_hook () {
fi
}
-require_clean_work_tree () {
- # test if working tree is dirty
- git rev-parse --verify HEAD > /dev/null &&
- git update-index --ignore-submodules --refresh &&
- git diff-files --quiet --ignore-submodules &&
- git diff-index --cached --quiet HEAD --ignore-submodules -- ||
- die "Working tree is dirty"
-}
ORIG_REFLOG_ACTION="$GIT_REFLOG_ACTION"
@@ -557,7 +549,7 @@ do_next () {
exit "$status"
fi
# Run in subshell because require_clean_work_tree can die.
- if ! (require_clean_work_tree)
+ if ! (require_clean_work_tree "rebase")
then
warn "Commit or stash your changes, and then run"
warn
@@ -798,7 +790,7 @@ first and then run 'git rebase --continue' again."
record_in_rewritten "$(cat "$DOTEST"/stopped-sha)"
- require_clean_work_tree
+ require_clean_work_tree "rebase"
do_rest
;;
--abort)
@@ -896,7 +888,7 @@ first and then run 'git rebase --continue' again."
comment_for_reflog start
- require_clean_work_tree
+ require_clean_work_tree "rebase" "Please commit or stash them."
if test ! -z "$1"
then