{"thread":{"id":"15653","subject":"[BUG] git ls-files -m --with-tree does double output","startedAt":"2008-09-24T16:19:32Z","lastAt":"2008-09-26T22:50:43Z","messageCount":2,"participants":["Anders Melchiorsen","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"91486","messageId":"87od2dv7mz.fsf@cup.kalibalik.dk","threadId":"15653","inReplyTo":null,"subject":"[BUG] git ls-files -m --with-tree does double output","fromName":"Anders Melchiorsen","fromEmail":"mail@cup.kalibalik.dk","sentAt":"2008-09-24T16:19:32Z","receivedAt":"2008-09-24T16:19:32Z","isPatch":false,"sender":{"key":"mail@cup.kalibalik.dk","avatar":null},"body":"I think that this is wrong? The combination of -m and --with-tree\nshows duplicate entries. Git 1.6.0.2.\n\n\nCheers,\nAnders.\n\n\nand@dylle:~$ mkdir repo ; cd repo\nand@dylle:~/repo$ git init\nInitialized empty Git repository in /home/and/repo/.git/\nand@dylle:~/repo$ date >a ; git add a ; git commit -m'Add 1'\nCreated initial commit c027435: Add 1\n 1 files changed, 1 insertions(+), 0 deletions(-)\n create mode 100644 a\nand@dylle:~/repo$ date >a\nand@dylle:~/repo$ git ls-files -m --with-tree=HEAD\na\na\n"},{"id":"91718","messageId":"20080926225043.GC24817@coredump.intra.peff.net","threadId":"15653","inReplyTo":"87od2dv7mz.fsf@cup.kalibalik.dk","subject":"Re: [BUG] git ls-files -m --with-tree does double output","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-09-26T22:50:43Z","receivedAt":"2008-09-26T22:50:43Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Sep 24, 2008 at 06:19:32PM +0200, Anders Melchiorsen wrote:\n\n> I think that this is wrong? The combination of -m and --with-tree\n> shows duplicate entries. Git 1.6.0.2.\n\nI have confirmed this, and it looks like it has always been that way. It\nlooks like overlay_tree_on_cache just does a read_tree to pull the tree\ninto the index, and then we end up with duplicate entries.\n\nI'm not too familiar with the read_tree code, so I am cc'ing Junio (who\nis out of touch for a little while) and Linus, who are much more clueful\nin this area.\n\nIt isn't clear to me which code is _supposed_ to be pulling out such\nduplicates here. That is, is read_tree broken, or is\noverlay_tree_on_cache just calling it wrong?\n\n-Peff\n"}]}