{"thread":{"id":"20268","subject":"'git pull' fails with 'not uptodate' message despite 'git reset --hard'","startedAt":"2009-07-28T23:08:43Z","lastAt":"2009-07-30T15:40:40Z","messageCount":6,"participants":["Jody McIntyre","Avery Pennarun"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"118999","messageId":"20090728230842.GE22281@clouds","threadId":"20268","inReplyTo":null,"subject":"'git pull' fails with 'not uptodate' message despite 'git reset --hard'","fromName":"Jody McIntyre","fromEmail":"scjody@sun.com","sentAt":"2009-07-28T23:08:43Z","receivedAt":"2009-07-28T23:08:43Z","isPatch":false,"sender":{"key":"scjody@sun.com","avatar":null},"body":"I am attempting to update my kernel tree but getting a 'not uptodate' error:\n\n$ git fetch origin\n[...]\n$ git pull origin tags/v2.6.31-rc4\nFrom git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6\n * tag               v2.6.31-rc4 -> FETCH_HEAD\nUpdating 6847e15..4be3bd7\nerror: Entry 'CREDITS' not uptodate. Cannot merge.\n\n'git diff' shows no changes, and neither 'git reset --hard' nor\n'git checkout -f HEAD' fix the issue.  Simple 'git pull' doesn't work either:\n\n$ git diff CREDITS\n$ git reset --hard\nChecking out files: 100% (27891/27891), done.\nHEAD is now at 6847e15 Linux 2.6.31-rc3\n$ git pull origin tags/v2.6.31-rc4\nFrom git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6\n * tag               v2.6.31-rc4 -> FETCH_HEAD\nUpdating 6847e15..4be3bd7\nerror: Entry 'CREDITS' not uptodate. Cannot merge.\n$ git checkout -f HEAD\nChecking out files: 100% (29096/29096), done.\nYour branch is behind 'origin/master' by 484 commits, and can be fast-forwarded.\n$ git pull origin tags/v2.6.31-rc4\nFrom git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6\n * tag               v2.6.31-rc4 -> FETCH_HEAD\nUpdating 6847e15..4be3bd7\nerror: Entry 'CREDITS' not uptodate. Cannot merge.\n$ git pull\nUpdating 6847e15..7d3e91b\nerror: Entry 'CREDITS' not uptodate. Cannot merge.\n\nI use quilt with this tree but no quilt patches are currently applied and it\nshould be clean.  It hasn't even been built (I rsync to another machine for\nthat.)\n\nAccording to the documentation, I believe what I'm doing should work - even if\nmy tree was unclean, 'git checkout -f HEAD' or 'git reset --hard' would fix it.\nWhat am I doing wrong?\n\nThanks,\nJody\n"},{"id":"119001","messageId":"32541b130907281719y57862c25w524f5bbf1df11c40@mail.gmail.com","threadId":"20268","inReplyTo":"20090728230842.GE22281@clouds","subject":"Re: 'git pull' fails with 'not uptodate' message despite 'git reset --hard'","fromName":"Avery Pennarun","fromEmail":"apenwarr@gmail.com","sentAt":"2009-07-29T00:19:54Z","receivedAt":"2009-07-29T00:19:54Z","isPatch":false,"sender":{"key":"apenwarr@gmail.com","avatar":"https://avatars.githubusercontent.com/u/20592?v=4"},"body":"On Tue, Jul 28, 2009 at 7:08 PM, Jody McIntyre<scjody@sun.com> wrote:\n> I am attempting to update my kernel tree but getting a 'not uptodate' error:\n>\n> $ git fetch origin\n> [...]\n> $ git pull origin tags/v2.6.31-rc4\n> From git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6\n>  * tag               v2.6.31-rc4 -> FETCH_HEAD\n> Updating 6847e15..4be3bd7\n> error: Entry 'CREDITS' not uptodate. Cannot merge.\n[...]\n> I use quilt with this tree but no quilt patches are currently applied and it\n> should be clean.  It hasn't even been built (I rsync to another machine for\n> that.)\n\nI've run into this problem when I rsync a tree from one system to\nanother.  The inodes will be different, so merge will think files in\nthe work tree have changed, but then diff (of course) won't see\nanything because it looks at the actual file contents, which are\nidentical.\n\nUsually a 'git status' will fix it.  In any case, if it doesn't,\nplease send the output of 'git status' :)\n\nI believe this cache out-of-dateness issue was fixed in a recent version of git.\n\nHave fun,\n\nAvery\n"},{"id":"119095","messageId":"20090729203637.GF22281@clouds","threadId":"20268","inReplyTo":"32541b130907281719y57862c25w524f5bbf1df11c40@mail.gmail.com","subject":"Re: 'git pull' fails with 'not uptodate' message despite 'git reset --hard'","fromName":"Jody McIntyre","fromEmail":"scjody@sun.com","sentAt":"2009-07-29T20:36:37Z","receivedAt":"2009-07-29T20:36:37Z","isPatch":false,"sender":{"key":"scjody@sun.com","avatar":null},"body":"On Tue, Jul 28, 2009 at 08:19:54PM -0400, Avery Pennarun wrote:\n> I've run into this problem when I rsync a tree from one system to\n> another.  The inodes will be different, so merge will think files in\n> the work tree have changed, but then diff (of course) won't see\n> anything because it looks at the actual file contents, which are\n> identical.\n\nInteresting.  Now that I think about it, I do rsync this tree between my\ndesktop and laptop.  This would explain why I only just started seeing this\nproblem - I probably originally pulled the tree to my desktop, but this week\nI'm working on my laptop.\n\n> Usually a 'git status' will fix it.  In any case, if it doesn't,\n> please send the output of 'git status' :)\n\nThis is again a bit strange:\n\n$ git status\n# On branch master\n# Your branch is behind 'origin/master' by 484 commits, and can be fast-forwarded.\n#\nnothing to commit (working directory clean)\n$ git status CREDITS > /tmp/git_status.txt\n$ wc -l /tmp/git_status.txt\n26063 /tmp/git_status.txt\n$ head /tmp/git_status.txt \n# On branch master\n# Your branch is behind 'origin/master' by 484 commits, and can be fast-forwarded.\n#\n# Changed but not updated:\n#   (use \"git add <file>...\" to update what will be committed)\n#   (use \"git checkout -- <file>...\" to discard changes in working directory)\n#\n#       modified:   .gitignore\n#       modified:   .mailmap\n#       modified:   COPYING\n\nThere appears to be an entry for every file in my tree minus things that\nare in .gitignore.  git_status.txt is available at:\n\nhttp://www.modernduck.com/files/git_status.txt\n\n> I believe this cache out-of-dateness issue was fixed in a recent version of git.\n\nI'll try that in the next few days and report back.\n\nThanks,\nJody\n\n> \n> Have fun,\n> \n> Avery\n"},{"id":"119096","messageId":"32541b130907291344u3c2b7df8ld848a79ec38197a6@mail.gmail.com","threadId":"20268","inReplyTo":"20090729203637.GF22281@clouds","subject":"Re: 'git pull' fails with 'not uptodate' message despite 'git reset --hard'","fromName":"Avery Pennarun","fromEmail":"apenwarr@gmail.com","sentAt":"2009-07-29T20:44:32Z","receivedAt":"2009-07-29T20:44:32Z","isPatch":false,"sender":{"key":"apenwarr@gmail.com","avatar":"https://avatars.githubusercontent.com/u/20592?v=4"},"body":"On Wed, Jul 29, 2009 at 8:36 PM, Jody McIntyre<scjody@sun.com> wrote:\n> On Tue, Jul 28, 2009 at 08:19:54PM -0400, Avery Pennarun wrote:\n>> Usually a 'git status' will fix it.  In any case, if it doesn't,\n>> please send the output of 'git status' :)\n>\n> This is again a bit strange:\n>\n> $ git status\n> # On branch master\n> # Your branch is behind 'origin/master' by 484 commits, and can be fast-forwarded.\n> #\n> nothing to commit (working directory clean)\n> $ git status CREDITS > /tmp/git_status.txt\n> $ wc -l /tmp/git_status.txt\n> 26063 /tmp/git_status.txt\n\nOkay, that's extra strange: when I've had this problem, 'git status'\nhas fixed it right away; it just goes away after that.  It might be\nthat recent changes to git have added an \"optimization\" that makes\nthis not happen for some reason.\n\nYou can always try the thermonuclear option:\n\n   mv .git/index .git/index.bak\n   git reset HEAD    # note, don't use --hard here\n   git status   # should show only files you have *really* changed\n\nOf course, if this fixes it than it's *definitely* a bug somewhere.\n\nGood luck.\n\nAvery\n"},{"id":"119114","messageId":"20090729225432.GG22281@clouds","threadId":"20268","inReplyTo":"32541b130907291344u3c2b7df8ld848a79ec38197a6@mail.gmail.com","subject":"Re: 'git pull' fails with 'not uptodate' message despite 'git reset --hard'","fromName":"Jody McIntyre","fromEmail":"scjody@sun.com","sentAt":"2009-07-29T22:54:32Z","receivedAt":"2009-07-29T22:54:32Z","isPatch":false,"sender":{"key":"scjody@sun.com","avatar":null},"body":"On Wed, Jul 29, 2009 at 08:44:32PM +0000, Avery Pennarun wrote:\n\n> You can always try the thermonuclear option:\n> \n>    mv .git/index .git/index.bak\n>    git reset HEAD    # note, don't use --hard here\n>    git status   # should show only files you have *really* changed\n> \n> Of course, if this fixes it than it's *definitely* a bug somewhere.\n\nThat still doesn't fix the problem.  I guess the index is not to blame.\n\n$ mv .git/index .git/index.bak\n$ git reset HEAD\n$ git status\n# On branch master\n# Your branch is behind 'origin/master' by 484 commits, and can be fast-forwarded.\n#\nnothing to commit (working directory clean)\n$ git pull origin tags/v2.6.31-rc4\nFrom git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6\n * tag               v2.6.31-rc4 -> FETCH_HEAD\nUpdating 6847e15..4be3bd7\nerror: Entry 'CREDITS' not uptodate. Cannot merge.\n\nIncidentally:\n\n$ diff .git/index.bak .git/index\nBinary files .git/index.bak and .git/index differ\n\nI don't know what .git/index contains so I don't know if that's surprising or\nnot.\n\nCheers,\nJody\n\n> \n> Good luck.\n> \n> Avery\n"},{"id":"119173","messageId":"20090730154040.GI22281@clouds","threadId":"20268","inReplyTo":"20090729203637.GF22281@clouds","subject":"Re: 'git pull' fails with 'not uptodate' message despite 'git reset --hard'","fromName":"Jody McIntyre","fromEmail":"scjody@sun.com","sentAt":"2009-07-30T15:40:40Z","receivedAt":"2009-07-30T15:40:40Z","isPatch":false,"sender":{"key":"scjody@sun.com","avatar":null},"body":"On Wed, Jul 29, 2009 at 04:36:37PM -0400, Jody McIntyre wrote:\n> On Tue, Jul 28, 2009 at 08:19:54PM -0400, Avery Pennarun wrote:\n> > I believe this cache out-of-dateness issue was fixed in a recent version of\n> > git.\n> \n> I'll try that in the next few days and report back.\n\nGit 1.6.4 fixes the issue, whatever it was.\n\nThanks!\nJody\n"}]}