summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kågedal <davidk@lysator.liu.se>2007-01-31 16:12:03 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-01-31 21:16:52 (GMT)
commit6e598c326dc4217c387fd797d182dc2ac0a0fc03 (patch)
tree84c401659f2ebd199995ffc479864485906d9c43
parent9ebe6cf953123ce904fe6930991694e3a3c79c17 (diff)
downloadgit-6e598c326dc4217c387fd797d182dc2ac0a0fc03.zip
git-6e598c326dc4217c387fd797d182dc2ac0a0fc03.tar.gz
git-6e598c326dc4217c387fd797d182dc2ac0a0fc03.tar.bz2
Improved error message from git-rebase
If the index wasn't clean, git-rebase would simply show the output from git-diff-index with no further comment to the user. Signed-off-by: Junio C Hamano <junkio@cox.net>
-rwxr-xr-xgit-rebase.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-rebase.sh b/git-rebase.sh
index 99cedad..9d2f71d 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -249,7 +249,8 @@ fi
git-update-index --refresh || exit
diff=$(git-diff-index --cached --name-status -r HEAD)
case "$diff" in
-?*) echo "$diff"
+?*) echo "cannot rebase: your index is not up-to-date"
+ echo "$diff"
exit 1
;;
esac