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

Re: Cannot rewrite branch(es) with a dirty working directory

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Sep 2, 2011, 05:52 UTC
Message-ID
<vpqpqjjlcdr.fsf@bauges.imag.fr>
In-Reply-To
<20110901215306.GD16308@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 13 quoted lines
> --- a/git-filter-branch.sh
> +++ b/git-filter-branch.sh
> @@ -108,9 +108,7 @@ OPTIONS_SPEC=
>  . git-sh-setup
>  
>  if [ "$(is_bare_repository)" = false ]; then
> -	git diff-files --ignore-submodules --quiet &&
> -	git diff-index --cached --quiet HEAD -- ||
> -	die "Cannot rewrite branch(es) with a dirty working directory."
> +	require_clean_work_tree 'rewrite branches'
>  fi
>  
>  tempdir=.git-rewrite
Sounds good, yes.
-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Jeff King
Message 5 of 5 in “Cannot rewrite branch(es) with a dirty working directory”
  1. James BlackburnSep 1, 2011
  2. Matthieu MoySep 1, 2011
  3. Jeff KingSep 1, 2011
  4. Jeff KingSep 1, 2011
  5. Matthieu MoySep 2, 2011

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.