From: Linus Torvalds Date: Thu, 19 May 2005 22:26:39 GMT Subject: Re: [PATCH] Detect renames in diff family. Message-ID: In-Reply-To: <7vll6ayjok.fsf@assigned-by-dhcp.cox.net> On Thu, 19 May 2005, Junio C Hamano wrote: > > We are talking about the Plumbing. Thank you for reminding me, > but sometimes people end up using the bare Plumbing. There's a pretty simple and nice way to make it both useful and easy to do to arbitrary precision. Think of the number following the -M as the mantissa. So -M9 means 0.9 aka "90% match" (or "difference", depending on which way you want to go), and in general -Mx would have the "10% increments" thing. But since it's a fraction, you just give more precision by adding more numbers, and -M99 would be "99% match", while "-M02" would be "2% match" Then it would be logical for a plain -M to be 100% match / 0% difference (ie only show renames that are exact), since a "0% match" / 100% difference is nonsensical. Alternatively, we'd have -M (without any number) just default to something, and you'd give a separate number of how closely you want to mach things, ie # These all mean the same thing: (default) 20% difference git-diff-tree -M git-diff-tree -M --match=80 git-diff-tree -M --differ=20 # show only renames that are perfect matches. git-diff-tree -M --match=100 # show _everything_ as a rename, except the # matching matrix means that we prefer better # matches over worse git-diff-tree -M --match=0 Hmm? Linus