summaryrefslogtreecommitdiff
path: root/git-pull.sh
diff options
context:
space:
mode:
authorRamkumar Ramachandra <artagnon@gmail.com>2010-10-19 14:39:28 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-10-28 20:28:44 (GMT)
commit92c62a3f4f93432c0c82e3031a9e64e03ba290f7 (patch)
treea17cf82fbe26678b12ab794ab6aeddfb5948fd9b /git-pull.sh
parentca209065f3cc3462eb0ae6090f6b13f38aa2114c (diff)
downloadgit-92c62a3f4f93432c0c82e3031a9e64e03ba290f7.zip
git-92c62a3f4f93432c0c82e3031a9e64e03ba290f7.tar.gz
git-92c62a3f4f93432c0c82e3031a9e64e03ba290f7.tar.bz2
Porcelain scripts: Rewrite cryptic "needs update" error message
Although Git interally has the facility to differentiate between porcelain and plubmbing commands and appropriately print errors, several shell scripts invoke plubming commands triggering cryptic plumbing errors to be displayed on a porcelain interface. This patch replaces the "needs update" message in git-pull and git-rebase, when `git update-index` is run, with a more friendly message. Reported-by: Joshua Jensen <jjensen@workspacewhiz.com> Reported-by: Thore Husfeldt <thore.husfeldt@gmail.com> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-pull.sh')
-rwxr-xr-xgit-pull.sh5
1 files changed, 1 insertions, 4 deletions
diff --git a/git-pull.sh b/git-pull.sh
index 8eb74d4..20a3bbe 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -201,10 +201,7 @@ test true = "$rebase" && {
die "updating an unborn branch with changes added to the index"
fi
else
- git update-index --ignore-submodules --refresh &&
- git diff-files --ignore-submodules --quiet &&
- git diff-index --ignore-submodules --cached --quiet HEAD -- ||
- die "refusing to pull with rebase: your working tree is not up-to-date"
+ require_clean_work_tree "pull with rebase" "Please commit or stash them."
fi
oldremoteref= &&
. git-parse-remote &&