From: Nguyen Thai Ngoc Duy Date: Sun, 25 Jul 2010 04:20:45 GMT Subject: replaced objects and working directory Message-ID: Hi, Should worktree (or the index) be aware of replaced objects? It seems a bit odd to do "git checkout HEAD^" then "git status" reports modification. Maybe "git status" and similar operations should also check worktree version against the replaced version, in addition to the original version? $ git init $ echo 1 > 1 $ git add 1 $ SHA1=`git hash-object 1` $ git ci -m 1 $ echo 2 >> 1 $ git add 1 $ git ci -m 2 $ SHA2=`git hash-object 1` $ git replace $SHA1 $SHA2 $ git st # On branch master nothing to commit (working directory clean) $ git co HEAD^ $ git st # Not currently on any branch. # Changed but not updated: # (use "git add ..." to update what will be committed) # (use "git checkout -- ..." to discard changes in working directory) # # modified: 1 # no changes added to commit (use "git add" and/or "git commit -a") $ git di diff --git a/1 b/1 index d00491f..1191247 100644 -- Duy