Code

Improved error message from git-rebase
authorDavid Kågedal <davidk@lysator.liu.se>
Wed, 31 Jan 2007 16:12:03 +0000 (17:12 +0100)
committerJunio C Hamano <junkio@cox.net>
Wed, 31 Jan 2007 21:16:52 +0000 (13:16 -0800)
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>
git-rebase.sh

index 99cedadda1da1ba2f62c22acfbd6477b1b2b38cb..9d2f71d15c47ae69eed57a7301d47c93d5bb070a 100755 (executable)
@@ -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