{"thread":{"id":"23725","subject":"change in behaviour of git status and/or gitk bug","startedAt":"2010-05-07T01:20:34Z","lastAt":"2010-05-07T16:47:16Z","messageCount":3,"participants":["Chris Packham","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"141106","messageId":"n2na038bef51005061820o581b2f0aq940282264b7f083f@mail.gmail.com","threadId":"23725","inReplyTo":null,"subject":"change in behaviour of git status and/or gitk bug","fromName":"Chris Packham","fromEmail":"judge.packham@gmail.com","sentAt":"2010-05-07T01:20:34Z","receivedAt":"2010-05-07T01:20:34Z","isPatch":false,"sender":{"key":"judge.packham@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155667?v=4"},"body":"Hi,\n\nThis may or may not be the same/similar as this thread [1]\n\nI noticed a while back that with gitk I kept on getting files shown as\n\"Local uncommitted changes, not checked in to index\" when I'd made\nmodifications to them then backed them out so the working tree content\nwas the same as the index. I used to (with git 1.6.x) fix / work\naround this by running git status.\n\nNow, with git 1.7.1, that workaround has stopped working. No doubt\nbecause git status was re-implemented from a wrapper of git commit to\nits own real command. Its then no surprise that running git commit\n\"fixes\" the problem even if its got nothing to commit. I think there\nis even another command to update whatever info gitk is reading but I\ncan't find it right now. If I can ever remember the aforementioned\nmagic command it shouldn't be hard to get gitk to run it when the user\nselects \"reload\" but I was wondering if this change in git status's\nbehaviour is causing other issues (like in the thread I mentioned).\n\nIts fairly easy to reproduce this\n\n$ mkdir tmp\n$ cd tmp\n$ git init\n$ echo \"foo\" > foo.txt && git add foo.txt && git commit -m \"Initial commit\"\n$ touch foo.txt\n\n$ git status\n# On branch master\nnothing to commit (working directory clean)\n\n$ gitk\n# this is where you'll see foo.txt modified but not indexed\n\n$ git commit\n# On branch master\nnothing to commit (working directory clean)\n\n$ gitk\n# now everything is clean\n\n---\n\n[1] http://article.gmane.org/gmane.comp.version-control.git/146473\n"},{"id":"141114","messageId":"20100507050054.GA25987@coredump.intra.peff.net","threadId":"23725","inReplyTo":"n2na038bef51005061820o581b2f0aq940282264b7f083f@mail.gmail.com","subject":"Re: change in behaviour of git status and/or gitk bug","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-05-07T05:00:54Z","receivedAt":"2010-05-07T05:00:54Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, May 06, 2010 at 06:20:34PM -0700, Chris Packham wrote:\n\n> I noticed a while back that with gitk I kept on getting files shown as\n> \"Local uncommitted changes, not checked in to index\" when I'd made\n> modifications to them then backed them out so the working tree content\n> was the same as the index. I used to (with git 1.6.x) fix / work\n> around this by running git status.\n> \n> Now, with git 1.7.1, that workaround has stopped working. No doubt\n\nThis was lost in v1.7.0, but should be back in v1.7.2. The actual fix is\n4bb6644 (git status: refresh the index if possible, 2010-04-02).\n\nYou can run \"git update-index --refresh\" to get the same effect. Running\n\"git diff\" also works.\n\nThere was some talk (and a patch) recently about gitk running\n\"update-index --refresh\", but I don't know if it got picked up. See:\n\n  http://article.gmane.org/gmane.comp.version-control.git/144182\n\n-Peff\n"},{"id":"141130","messageId":"i2qa038bef51005070947w489883f2n510bb824e667fd5@mail.gmail.com","threadId":"23725","inReplyTo":"20100507050054.GA25987@coredump.intra.peff.net","subject":"Re: change in behaviour of git status and/or gitk bug","fromName":"Chris Packham","fromEmail":"judge.packham@gmail.com","sentAt":"2010-05-07T16:47:16Z","receivedAt":"2010-05-07T16:47:16Z","isPatch":false,"sender":{"key":"judge.packham@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155667?v=4"},"body":"On Thu, May 6, 2010 at 10:00 PM, Jeff King <peff@peff.net> wrote:\n> On Thu, May 06, 2010 at 06:20:34PM -0700, Chris Packham wrote:\n>\n>> I noticed a while back that with gitk I kept on getting files shown as\n>> \"Local uncommitted changes, not checked in to index\" when I'd made\n>> modifications to them then backed them out so the working tree content\n>> was the same as the index. I used to (with git 1.6.x) fix / work\n>> around this by running git status.\n>>\n>> Now, with git 1.7.1, that workaround has stopped working. No doubt\n>\n> This was lost in v1.7.0, but should be back in v1.7.2. The actual fix is\n> 4bb6644 (git status: refresh the index if possible, 2010-04-02).\n>\n> You can run \"git update-index --refresh\" to get the same effect. Running\n> \"git diff\" also works.\n>\n> There was some talk (and a patch) recently about gitk running\n> \"update-index --refresh\", but I don't know if it got picked up. See:\n>\n>  http://article.gmane.org/gmane.comp.version-control.git/144182\n>\n> -Peff\n>\n\nOK good to know its not just me.\n\nI'd add my vote for gitk running \"update-index --refresh\" in response\nto a user asking it to refresh, which should satisfy the \"gitk doesn't\ntouch anything unless you ask it to\" requirement.\n"}]}