git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jan Krüger <jk@jk.gs>
Date
May 21, 2008, 13:31 UTC
Message-ID
<20080521153110.059bc6a3@neuron>
In-Reply-To
<alpine.DEB.1.00.0805211230290.30431@racer>
Hi,
Show 5 quoted lines
> 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.
Show 5 quoted lines
> +	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@jk.gs>
Previous: Andreas EricssonNext: Geert Bosch
Message 3 of 4 in “pull --rebase: exit early when the working directory is dirty”
  1. pull --rebase: exit early when the working directory is dirtyJohannes Schindelin, May 21, 2008
  2. Andreas EricssonMay 21, 2008
  3. Jan KrügerMay 21, 2008
  4. Geert BoschMay 21, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.