Re: [PATCH] pull --rebase: exit early when the working directory is dirty

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

> 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.

Good idea.

> +	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"

Perhaps the "up-to-date" should be changed to something else, following
the recent discussion about the "up-to-date" message in checkout (but
here we don't have to worry about breaking anything else). In that case,
I'd suggest:

"Refusing to pull with rebase: your working tree has uncommitted
changes"

-- 
Best regards
Jan Krüger <jk@xxxxx>
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux