pull --rebase: exit early when the working directory is dirty
When rebasing fails during "pull --rebase", you cannot just clean up the working directory and call "pull --rebase" again, since the remote branch was already fetched. Therefore, die early when the working directory is dirty. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
dee2775a29
commit
f9189cf8f2
@ -107,6 +107,11 @@ error_on_no_merge_candidates () {
|
||||
}
|
||||
|
||||
test true = "$rebase" && {
|
||||
git update-index --refresh &&
|
||||
git diff-files --quiet &&
|
||||
git diff-index --cached --quiet HEAD -- ||
|
||||
die "refusing to pull with rebase: your working tree is not up-to-date"
|
||||
|
||||
. git-parse-remote &&
|
||||
origin="$1"
|
||||
test -z "$origin" && origin=$(get_default_remote)
|
||||
|
||||
Reference in New Issue
Block a user