summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7c978a0)
raw | patch | inline | side by side (parent: 7c978a0)
author | Jeff King <peff@peff.net> | |
Mon, 23 May 2011 20:16:59 +0000 (16:16 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 23 May 2011 22:40:51 +0000 (15:40 -0700) |
One loop combined both the patch generation and checking
whether there was any mode change to report. Let's factor
that into two separate loops, as we may care about the mode
change even if we are not generating patches (e.g., because
we are showing a binary diff, which will come in a future
patch).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
whether there was any mode change to report. Let's factor
that into two separate loops, as we may care about the mode
change even if we are not generating patches (e.g., because
we are showing a binary diff, which will come in a future
patch).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
combine-diff.c | patch | blob | history |
diff --git a/combine-diff.c b/combine-diff.c
index 309dc6c27225b5c758b96f385a04bb6b3397f1c5..2183184eed1944c53c3940a3086a7d80d9e4f5b9 100644 (file)
--- a/combine-diff.c
+++ b/combine-diff.c
close(fd);
}
+ for (i = 0; i < num_parent; i++) {
+ if (elem->parent[i].mode != elem->mode) {
+ mode_differs = 1;
+ break;
+ }
+ }
+
for (cnt = 0, cp = result; cp < result + result_size; cp++) {
if (*cp == '\n')
cnt++;
elem->parent[i].mode,
&result_file, sline,
cnt, i, num_parent, result_deleted);
- if (elem->parent[i].mode != elem->mode)
- mode_differs = 1;
}
show_hunks = make_hunks(sline, cnt, num_parent, dense);