rebase: use plumbing to show dirty state
Commit 4cfbe06 introduced the use of "git diff" to show dirty state in a format more familiar to users. However, it should have used the plumbing "git diff-files" instead. Not only is it good practice in general to use plumbing in scripts, but in this case we really don't want the automatic pager to kick in for an error message. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King committed
Sep 9, 2009 at 10:59 UTC
0c3d3ac352427738e7c4393c0a959e0e698a0c7a
1 file changed
+1
-1
git-rebase.sh
+1
-1
@@ -387,7 +387,7 @@ fi
387
# The tree must be really really clean.
388
if ! git update-index --ignore-submodules --refresh > /dev/null; then
389
echo >&2 "cannot rebase: you have unstaged changes"
390
- git diff --name-status -r --ignore-submodules -- >&2
390
+ git diff-files --name-status -r --ignore-submodules -- >&2
391
exit 1
392
fi
393
diff=$(git diff-index --cached --name-status -r --ignore-submodules HEAD --)