Re: Strange effect merging empty file
- From
Jeff King <peff@peff.net>
- Date
- Mar 22, 2012, 18:52 UTC
- Message-ID
- <20120322185246.GA27037@sigill.intra.peff.net>
- In-Reply-To
- <20120322182533.GA20360@sigill.intra.peff.net>
On Thu, Mar 22, 2012 at 02:25:33PM -0400, Jeff King wrote:
> We can get around it by just checking for the empty-blob sha1. The patch > below should do the right thing, and passes the whole test suite.
Here it is broken up properly into commits:
[1/3]: drop casts from users EMPTY_TREE_SHA1_BIN [2/3]: make is_empty_blob_sha1 available everywhere [3/3]: merge-recursive: don't detect renames from empty files
The first one is just a cleanup I noticed while adding EMPTY_BLOB_SHA1_BIN, and is not strictly related. The second one is the refactoring bits, and the third one is the real change.
-Peff