From 92c62a3f4f93432c0c82e3031a9e64e03ba290f7 Mon Sep 17 00:00:00 2001 From: Ramkumar Ramachandra Date: Tue, 19 Oct 2010 20:09:28 +0530 Subject: 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 Reported-by: Thore Husfeldt Signed-off-by: Ramkumar Ramachandra Signed-off-by: Junio C Hamano --- git-pull.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'git-pull.sh') 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 && -- cgit v1.2.3