path: root/merge-recursive.c
diff options
authorStefan Beller <>2014-09-21 20:49:46 (GMT)
committerJunio C Hamano <>2014-09-23 18:29:20 (GMT)
commit422af49c2fe707c5e7bff1e4a8250232401154b0 (patch)
tree9324c7bb97de39a639193145d21ec2a6b51b1c9c /merge-recursive.c
parent331a1838b26c3032bec27b66307a9de9b3b11509 (diff)
merge-recursive: fix copy-paste mistake
The following issue was found by (ID: 1049510), and claimed to be likely a copy-paste mistake. Introduced in 331a1838b (2010-07-02, Try normalizing files to avoid delete/modify conflicts when merging), which is quite a long time ago, so I'm rather unsure if it's of any impact or just went unnoticed. The line after the changed line has a comparison of 'o.len' to 'a.len', so we should assume the lengths may be different. I'd be happy to have a test for this bug(?) attached to, but I did not manage to come up with a test in a reasonable amount of time. Signed-off-by: Stefan Beller <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'merge-recursive.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index 5ad8fc9..ceb5035 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -1094,7 +1094,7 @@ static int blob_unchanged(const unsigned char *o_sha,
* unchanged since their sha1s have already been compared.
if (renormalize_buffer(path, o.buf, o.len, &o) |
- renormalize_buffer(path, a.buf, o.len, &a))
+ renormalize_buffer(path, a.buf, a.len, &a))
ret = (o.len == a.len && !memcmp(o.buf, a.buf, o.len));