diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-04-16 12:41:49 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-04-16 12:41:49 -0700 |
commit | c0599f6993413360d8e35679a6b421d4eb16a698 (patch) | |
tree | 3d24df21194b3b9ce8f9238a424415f5c9ef2cfe /read-cache.c | |
parent | a2caeb2e26d57fdbbc35314d2f6ea2b872dbf54e (diff) | |
parent | 4f7cb99ada26be5d86402a6e060f3ee16a672f16 (diff) | |
download | git-c0599f6993413360d8e35679a6b421d4eb16a698.tar.gz git-c0599f6993413360d8e35679a6b421d4eb16a698.tar.xz |
Merge branch 'jk/diff-no-rename-empty'
Forbids rename detection logic from matching two empty files as renames
during merge-recursive to prevent mismerges.
By Jeff King
* jk/diff-no-rename-empty:
merge-recursive: don't detect renames of empty files
teach diffcore-rename to optionally ignore empty content
make is_empty_blob_sha1 available everywhere
drop casts from users EMPTY_TREE_SHA1_BIN
Diffstat (limited to 'read-cache.c')
-rw-r--r-- | read-cache.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/read-cache.c b/read-cache.c index 274e54b4f..6c8f39583 100644 --- a/read-cache.c +++ b/read-cache.c @@ -157,16 +157,6 @@ static int ce_modified_check_fs(struct cache_entry *ce, struct stat *st) return 0; } -static int is_empty_blob_sha1(const unsigned char *sha1) -{ - static const unsigned char empty_blob_sha1[20] = { - 0xe6,0x9d,0xe2,0x9b,0xb2,0xd1,0xd6,0x43,0x4b,0x8b, - 0x29,0xae,0x77,0x5a,0xd8,0xc2,0xe4,0x8c,0x53,0x91 - }; - - return !hashcmp(sha1, empty_blob_sha1); -} - static int ce_match_stat_basic(struct cache_entry *ce, struct stat *st) { unsigned int changed = 0; |