Re: [PATCH 3/3] merge-recursive: don't detect renames from empty files
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Mar 22, 2012, 19:18 UTC
- Message-ID
- <20120322191851.GA23293@burratino>
- In-Reply-To
- <20120322185349.GC32727@sigill.intra.peff.net>
Jeff King wrote:
Show 6 quoted lines
> We could do the same thing for general diff rename > detection. However, the stakes are much less high there, as > we are explicitly reporting the rename to the user. It's > only the automatic nature of merge-recursive that makes the > result confusing. So there's not as much need for caution > when just showing a diff.
The stakes may be different, but doesn't the same justification apply anyway? If "git diff -M" chooses a random pairing to describe a renaming of multiple empty files, that seems just as confusing as merge-recursive making the same mistake.
If adding this check in diffcore is more complicated, doing it in merge-recursive for now seems fine and prudent, but if we are doing it at the merge-recursive level just to be conservative then that seems like the wrong layer.
Thanks for a clean and pleasant patch. Jonathan