summaryrefslogtreecommitdiff
path: root/merge-recursive.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-09-30 05:17:21 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-09-30 05:17:22 (GMT)
commitab9bc95d537187fc39465bca1d40438b2e2ee6b5 (patch)
treefb3b3f711b672329d2c65aadd1781a264b41ca7a /merge-recursive.c
parent131f0315c46c30d5a9e6743354808230cf4908c0 (diff)
parent040b2ac978366215bfc27be5e110a2f0170e6864 (diff)
downloadgit-ab9bc95d537187fc39465bca1d40438b2e2ee6b5.zip
git-ab9bc95d537187fc39465bca1d40438b2e2ee6b5.tar.gz
git-ab9bc95d537187fc39465bca1d40438b2e2ee6b5.tar.bz2
Merge branch 'sb/merge-recursive-copy-paste-fix'
"git merge-recursive" had a small bug that could have made it mishandle "one side deleted, the other side did not touch it" in a rare corner case, where the other side actually did touch to cause the blob object names to be different but both blobs before and after the change normalize to the same (e.g. correcting mistake to check in a blob with CRLF line endings by replacing it with another blob that records the same contents with LF line endings). * sb/merge-recursive-copy-paste-fix: merge-recursive: remove stale commented debugging code merge-recursive: fix copy-paste mistake
Diffstat (limited to 'merge-recursive.c')
-rw-r--r--merge-recursive.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index 22315c3..8ad4be8 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -1555,7 +1555,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));
error_return:
@@ -1686,10 +1686,6 @@ static int merge_content(struct merge_options *o,
static int process_entry(struct merge_options *o,
const char *path, struct stage_data *entry)
{
- /*
- printf("processing entry, clean cache: %s\n", index_only ? "yes": "no");
- print_index_entry("\tpath: ", entry);
- */
int clean_merge = 1;
int normalize = o->renormalize;
unsigned o_mode = entry->stages[1].mode;