{"thread":{"id":"18156","subject":"bug in checkout/status ?","startedAt":"2009-03-05T20:48:01Z","lastAt":"2009-03-05T21:13:53Z","messageCount":5,"participants":["Shawn O. Pearce","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"107099","messageId":"20090305204801.GA16213@spearce.org","threadId":"18156","inReplyTo":null,"subject":"bug in checkout/status ?","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-03-05T20:48:01Z","receivedAt":"2009-03-05T20:48:01Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"WTF.  This shows up in git 1.6.0.2 through current 'next':\n\n$ git clone git://android.git.kernel.org/platform/external/elfutils std_git\n$ cd std_git/\n$ git status\n# On branch master\n\n# Changes to be committed:\n#   (use \"git reset HEAD <file>...\" to unstage)\n#\n#       modified:   libelf-po/ChangeLog\n#       modified:   libelf-po/Makefile\n#       modified:   libelf-po/Makefile.in\n#       modified:   libelf-po/Makefile.in.in\n#       modified:   libelf-po/Makevars\n#       modified:   libelf-po/POTFILES\n#       modified:   libelf-po/POTFILES.in\n#       modified:   libelf-po/Rules-quot\n#       modified:   libelf-po/boldquot.sed\n#       modified:   libelf-po/insert-header.sin\n#       modified:   libelf-po/libelf.pot\n#       modified:   libelf-po/quot.sed\n#\n\n$ git diff-index HEAD\n:000000 100644 0000000000000000000000000000000000000000 78eb2ff1b7e79d00e827c97a7d4f52ca7d129155 A      libelf-po/ChangeLog\n:000000 100644 0000000000000000000000000000000000000000 afd56475e1ae3a51ed30124a7671821581fbf833 A      libelf-po/Makefile\n:000000 100644 0000000000000000000000000000000000000000 21eb20d30794c6d9151c89a3b35c4365902221fc A      libelf-po/Makefile.in\n:000000 100644 0000000000000000000000000000000000000000 4a7a26885ff4ed63205538741a45950b10b8cf95 A      libelf-po/Makefile.in.in\n:000000 100644 0000000000000000000000000000000000000000 0accb70a14c5808668bdf7a21668767f0fa2e608 A      libelf-po/Makevars\n:000000 100644 0000000000000000000000000000000000000000 f17f924d6f5748e15c238d1006e568abb4c3240e A      libelf-po/POTFILES\n:000000 100644 0000000000000000000000000000000000000000 b25620fba0f1b74f351909d525a3e41101396260 A      libelf-po/POTFILES.in\n:000000 100644 0000000000000000000000000000000000000000 5f46d237d2593c674ab34518cf342553fe0f6aef A      libelf-po/Rules-quot\n:000000 100644 0000000000000000000000000000000000000000 4b937aa517bcff9f5adfc2a01d6d780445999297 A      libelf-po/boldquot.sed\n:000000 100644 0000000000000000000000000000000000000000 b26de01f6c88c7b15bb4815a8fcd5120d479300d A      libelf-po/insert-header.sin\n:000000 100644 0000000000000000000000000000000000000000 dfcd7704b3b16f040158b435acb9244a6d6cfa6a A      libelf-po/libelf.pot\n:000000 100644 0000000000000000000000000000000000000000 0122c46318dc8bc115167fa2c259f8456668f861 A      libelf-po/quot.sed\n:100644 000000 78eb2ff1b7e79d00e827c97a7d4f52ca7d129155 0000000000000000000000000000000000000000 D      libelf-po/ChangeLog\n:100644 000000 afd56475e1ae3a51ed30124a7671821581fbf833 0000000000000000000000000000000000000000 D      libelf-po/Makefile\n:100644 000000 21eb20d30794c6d9151c89a3b35c4365902221fc 0000000000000000000000000000000000000000 D      libelf-po/Makefile.in\n:100644 000000 4a7a26885ff4ed63205538741a45950b10b8cf95 0000000000000000000000000000000000000000 D      libelf-po/Makefile.in.in\n:100644 000000 0accb70a14c5808668bdf7a21668767f0fa2e608 0000000000000000000000000000000000000000 D      libelf-po/Makevars\n:100644 000000 f17f924d6f5748e15c238d1006e568abb4c3240e 0000000000000000000000000000000000000000 D      libelf-po/POTFILES\n:100644 000000 b25620fba0f1b74f351909d525a3e41101396260 0000000000000000000000000000000000000000 D      libelf-po/POTFILES.in\n:100644 000000 5f46d237d2593c674ab34518cf342553fe0f6aef 0000000000000000000000000000000000000000 D      libelf-po/Rules-quot\n:100644 000000 4b937aa517bcff9f5adfc2a01d6d780445999297 0000000000000000000000000000000000000000 D      libelf-po/boldquot.sed\n:100644 000000 b26de01f6c88c7b15bb4815a8fcd5120d479300d 0000000000000000000000000000000000000000 D      libelf-po/insert-header.sin\n:100644 000000 dfcd7704b3b16f040158b435acb9244a6d6cfa6a 0000000000000000000000000000000000000000 D      libelf-po/libelf.pot\n:100644 000000 0122c46318dc8bc115167fa2c259f8456668f861 0000000000000000000000000000000000000000 D      libelf-po/quot.sed\n\nWTF. Add -M and it sees modifies:\n\n$ git diff-index -M HEAD\n:100644 100644 78eb2ff1b7e79d00e827c97a7d4f52ca7d129155 78eb2ff1b7e79d00e827c97a7d4f52ca7d129155 M      libelf-po/ChangeLog\n:100644 100644 afd56475e1ae3a51ed30124a7671821581fbf833 afd56475e1ae3a51ed30124a7671821581fbf833 M      libelf-po/Makefile\n:100644 100644 21eb20d30794c6d9151c89a3b35c4365902221fc 21eb20d30794c6d9151c89a3b35c4365902221fc M      libelf-po/Makefile.in\n:100644 100644 4a7a26885ff4ed63205538741a45950b10b8cf95 4a7a26885ff4ed63205538741a45950b10b8cf95 M      libelf-po/Makefile.in.in\n:100644 100644 0accb70a14c5808668bdf7a21668767f0fa2e608 0accb70a14c5808668bdf7a21668767f0fa2e608 M      libelf-po/Makevars\n:100644 100644 f17f924d6f5748e15c238d1006e568abb4c3240e f17f924d6f5748e15c238d1006e568abb4c3240e M      libelf-po/POTFILES\n:100644 100644 b25620fba0f1b74f351909d525a3e41101396260 b25620fba0f1b74f351909d525a3e41101396260 M      libelf-po/POTFILES.in\n:100644 100644 5f46d237d2593c674ab34518cf342553fe0f6aef 5f46d237d2593c674ab34518cf342553fe0f6aef M      libelf-po/Rules-quot\n:100644 100644 4b937aa517bcff9f5adfc2a01d6d780445999297 4b937aa517bcff9f5adfc2a01d6d780445999297 M      libelf-po/boldquot.sed\n:100644 100644 b26de01f6c88c7b15bb4815a8fcd5120d479300d b26de01f6c88c7b15bb4815a8fcd5120d479300d M      libelf-po/insert-header.sin\n:100644 100644 dfcd7704b3b16f040158b435acb9244a6d6cfa6a dfcd7704b3b16f040158b435acb9244a6d6cfa6a M      libelf-po/libelf.pot\n:100644 100644 0122c46318dc8bc115167fa2c259f8456668f861 0122c46318dc8bc115167fa2c259f8456668f861 M      libelf-po/quot.sed\n\n\nI'm trying to debug it now, but I'd appreciate any help from\nthose that know more about this part of diffcore and the working\ntree code..\n\n-- \nShawn.\n"},{"id":"107100","messageId":"20090305205126.GA19800@coredump.intra.peff.net","threadId":"18156","inReplyTo":"20090305204801.GA16213@spearce.org","subject":"Re: bug in checkout/status ?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-03-05T20:51:26Z","receivedAt":"2009-03-05T20:51:26Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Mar 05, 2009 at 12:48:01PM -0800, Shawn O. Pearce wrote:\n\n> WTF.  This shows up in git 1.6.0.2 through current 'next':\n> \n> $ git clone git://android.git.kernel.org/platform/external/elfutils std_git\n> $ cd std_git/\n> $ git status\n> # On branch master\n> \n> # Changes to be committed:\n> #   (use \"git reset HEAD <file>...\" to unstage)\n> #\n> #       modified:   libelf-po/ChangeLog\n> #       modified:   libelf-po/Makefile\n> #       modified:   libelf-po/Makefile.in\n> #       modified:   libelf-po/Makefile.in.in\n> #       modified:   libelf-po/Makevars\n> #       modified:   libelf-po/POTFILES\n> #       modified:   libelf-po/POTFILES.in\n> #       modified:   libelf-po/Rules-quot\n> #       modified:   libelf-po/boldquot.sed\n> #       modified:   libelf-po/insert-header.sin\n> #       modified:   libelf-po/libelf.pot\n> #       modified:   libelf-po/quot.sed\n> #\n\nHmm. I get the same behavior here. I notice there is a \"libelf\" subtree\nbefore \"libelf-po\"; maybe it's a sorting bug? I'll try to investigate\nmore.\n\n-Peff\n"},{"id":"107101","messageId":"20090305205313.GB16213@spearce.org","threadId":"18156","inReplyTo":"20090305205126.GA19800@coredump.intra.peff.net","subject":"Re: bug in checkout/status ?","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-03-05T20:53:13Z","receivedAt":"2009-03-05T20:53:13Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Jeff King <peff@peff.net> wrote:\n> On Thu, Mar 05, 2009 at 12:48:01PM -0800, Shawn O. Pearce wrote:\n> \n> Hmm. I get the same behavior here. I notice there is a \"libelf\" subtree\n> before \"libelf-po\"; maybe it's a sorting bug? I'll try to investigate\n> more.\n\nYup, that must be it.\n\nJGit created the resulting tree during a merge.\n\nIt sorted \"libelf/\" before \"libelf-po/\".  Wrong.  Bad JGit.  Bad!\n\n-- \nShawn.\n"},{"id":"107106","messageId":"20090305210757.GA20157@coredump.intra.peff.net","threadId":"18156","inReplyTo":"20090305205313.GB16213@spearce.org","subject":"Re: bug in checkout/status ?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-03-05T21:07:57Z","receivedAt":"2009-03-05T21:07:57Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Mar 05, 2009 at 12:53:13PM -0800, Shawn O. Pearce wrote:\n\n> > Hmm. I get the same behavior here. I notice there is a \"libelf\" subtree\n> > before \"libelf-po\"; maybe it's a sorting bug? I'll try to investigate\n> > more.\n> \n> Yup, that must be it.\n> \n> JGit created the resulting tree during a merge.\n> \n> It sorted \"libelf/\" before \"libelf-po/\".  Wrong.  Bad JGit.  Bad!\n\nOK. I was just sort of guessing based on the similarity of the names and\nthe fact that sorting is confusing (as evidenced by the fact that I had\nno idea if it was wrong or not). But that is definitely it:\n\n  $ git clone git://android.git.kernel.org/platform/external/elfutils std_git\n  $ cd std_git\n  $ git ls-tree HEAD >jgit\n  $ git commit -a -m 'git tree'\n  $ git ls-tree HEAD >git\n  $ diff -u jgit git\n\nreveal(ed) the difference. But it looks like you have already re-pushed\na fixed version.\n\n-Peff\n"},{"id":"107108","messageId":"20090305211353.GC16213@spearce.org","threadId":"18156","inReplyTo":"20090305210757.GA20157@coredump.intra.peff.net","subject":"Re: bug in checkout/status ?","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-03-05T21:13:53Z","receivedAt":"2009-03-05T21:13:53Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Jeff King <peff@peff.net> wrote:\n> On Thu, Mar 05, 2009 at 12:53:13PM -0800, Shawn O. Pearce wrote:\n> \n> OK. I was just sort of guessing based on the similarity of the names and\n> the fact that sorting is confusing (as evidenced by the fact that I had\n> no idea if it was wrong or not). But that is definitely it:\n\nI never would have guessed the sorting was wrong.  But once you\nsaid something, it was immediately obvious to me that JGit f'd up\nthe tree.\n \n> reveal(ed) the difference. But it looks like you have already re-pushed\n> a fixed version.\n\nWell, I rewound the repository.  We're rebasing the change onto the\ncurrent tip and pushing a fast-forward instead of letting JGit make\na merge commit here.\n\nBut JGit still has a bug that causes it to corrupt the tree sorting\nhere.  I have yet to understand why it produced that bad sort for\nthis particular merge, let alone propose a patch for it.\n\nThanks for the help Peff.\n\n-- \nShawn.\n"}]}