summaryrefslogtreecommitdiff
path: root/git-pull.sh
diff options
context:
space:
mode:
authorRamkumar Ramachandra <artagnon@gmail.com>2010-10-19 20:09:28 +0530
committerJunio C Hamano <gitster@pobox.com>2010-10-28 13:28:44 -0700
commit92c62a3f4f93432c0c82e3031a9e64e03ba290f7 (patch)
treea17cf82fbe26678b12ab794ab6aeddfb5948fd9b /git-pull.sh
parentca209065f3cc3462eb0ae6090f6b13f38aa2114c (diff)
downloadgit-92c62a3f4f93432c0c82e3031a9e64e03ba290f7.tar.gz
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 8eb74d45de..20a3bbea07 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 &&