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

Re: git replace woes: dirty stat with clean workdir

From
Christian Couder <chriscool@tuxfamily.org>
Date
Nov 10, 2009, 23:33 UTC
Message-ID
<200911110033.46546.chriscool@tuxfamily.org>
In-Reply-To
<4AF992F8.8010309@drmicha.warpmail.net>
Hi,
On mardi 10 novembre 2009, Michael J Gruber wrote:
Show 7 quoted lines
> Hi there,
>
> when cooking up a "warning example" for git replace (don't draw
> premature conclusions when there are replaced objects) I came across the
> following problem: git status seems to compare the work dir with the
> tree of HEAD, not the replacing tree. Even deleting the index does not
> help.
Yeah, you are right. I must say that I never tested replacing trees before.
> [ The example also shows that we need a way to specify
> --no-replace-objects for gitk. Would easier if gitk really where git
> something. ]

Yeah, I think --no-replace-objects might not work well for shell scripts or even commands that call other commands using run_command(). Perhaps we need an environment variable GIT_NO_REPLACE_OBJECTS to be set by commands that are passed --no-replace-objects and checked by all the commands. I will have a look at that.

Thanks, Christian.

Previous: Michael J Gruber
Message 2 of 2 in “git replace woes: dirty stat with clean workdir”
  1. Michael J GruberNov 10, 2009
  2. Christian CouderNov 10, 2009

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.