{"thread":{"id":"5065","subject":"git-ls-files prefix superset problem","startedAt":"2006-08-01T05:13:27Z","lastAt":"2006-08-01T05:25:57Z","messageCount":3,"participants":["David Miller","Linus Torvalds"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"24487","messageId":"20060731.221327.26966465.davem@davemloft.net","threadId":"5065","inReplyTo":null,"subject":"git-ls-files prefix superset problem","fromName":"David Miller","fromEmail":"davem@davemloft.net","sentAt":"2006-08-01T05:13:27Z","receivedAt":"2006-08-01T05:13:27Z","isPatch":false,"sender":{"key":"davem@davemloft.net","avatar":null},"body":"\nI had been previously using git-1.1.3 on my local repositories\nand I upgraded to the current git head:\n\nb63fafdfd844c2037fba53b9944431c1378b4135\n\ngit commit stopped working, specifically it dies on\ngit-ls-files:\n\ndavem@sunset:~/src/GIT/net-2.6$ ../git/git-ls-files -- net/ipv4/tcp.c\nfatal: git-ls-files: internal error - cache entry not superset of prefix\ndavem@sunset:~/src/GIT/net-2.6$ \n\nI added some debugging:\n\nTrying get_pathspec([(null)],[net/ipv4/tcp.c])\nprefixlen(0)\nprefix_path() gives [net/ipv4/tcp.c]\nERROR: pathspec(net/ipv4/tcp.c)\nverify_pathspec: len(9)\nERROR: len(9) ce_namelen(ce)(7) ce->name(COPYING)\n\nIs something wrong with my index file?\n\nI tried to rebuild it using:\n\ngit read-tree master\ngit checkout-index -f -a\ngit update-index --refresh\n\nbut I keep getting the same problem.\n\nIt happens on all of my local 2.6.x kernel GIT trees.\n\nAny ideas?\n\nThanks a lot.\n"},{"id":"24489","messageId":"Pine.LNX.4.64.0607312217420.4168@g5.osdl.org","threadId":"5065","inReplyTo":"20060731.221327.26966465.davem@davemloft.net","subject":"Re: git-ls-files prefix superset problem","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-08-01T05:18:47Z","receivedAt":"2006-08-01T05:18:47Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Mon, 31 Jul 2006, David Miller wrote:\n> \n> I had been previously using git-1.1.3 on my local repositories\n> and I upgraded to the current git head:\n> \n> b63fafdfd844c2037fba53b9944431c1378b4135\n> \n> git commit stopped working, specifically it dies on\n> git-ls-files:\n> \n> davem@sunset:~/src/GIT/net-2.6$ ../git/git-ls-files -- net/ipv4/tcp.c\n> fatal: git-ls-files: internal error - cache entry not superset of prefix\n\nIt should be fixed by the recent commit\n\n\tFix up some fallout from \"setup_git_directory()\" cleanup\n\nthat Junio already merged.\n\nSo just update your git again, and everything should be happy.\n\n\t\tLinus\n"},{"id":"24490","messageId":"20060731.222557.52166634.davem@davemloft.net","threadId":"5065","inReplyTo":"Pine.LNX.4.64.0607312217420.4168@g5.osdl.org","subject":"Re: git-ls-files prefix superset problem","fromName":"David Miller","fromEmail":"davem@davemloft.net","sentAt":"2006-08-01T05:25:57Z","receivedAt":"2006-08-01T05:25:57Z","isPatch":false,"sender":{"key":"davem@davemloft.net","avatar":null},"body":"From: Linus Torvalds <torvalds@osdl.org>\nDate: Mon, 31 Jul 2006 22:18:47 -0700 (PDT)\n\n> It should be fixed by the recent commit\n> \n> \tFix up some fallout from \"setup_git_directory()\" cleanup\n> \n> that Junio already merged.\n> \n> So just update your git again, and everything should be happy.\n\nYeah, just as you responded I noticed the there was local\nvariable shadowing of \"prefix\" which causes it to be NULL\nand thus prune_cache() doesn't get called.\n\nThanks!\n"}]}