From: Junio C Hamano Date: Tue, 24 Feb 2015 22:42:42 GMT Subject: Re: [BUG] diffcore-rename with duplicate tree entries can segfault Message-ID: In-Reply-To: <20150224214311.GA8622@peff.net> Jeff King writes: > I ran across a real-world case where git segfaults on some trees that > have duplicate entries. Those trees are obviously broken, and I'm fine > with us producing whatever output we like on them. But probably we > shouldn't segfault. Thanks. > ... > That does fix this problem, and it doesn't break any other tests. But > frankly, I don't know what I'm doing and this feels like a giant hack. > > Given that this is tangentially related to the "-B -M" stuff you've been > looking at (and it's your code in the first place :) ), I thought you > might have some insight. Indeed. Honestly, I'd rather see us diagnose duplicate filepairs as an error and drop them on the floor upon entry to the diffcore_std(), even before we go into the rename codepath.