Thread (12 messages) flat view 12 messages, 4 authors, 2016-06-15

Re: [PATCH 3/4] diff: Do not warn about missing EOL at EOF for symlinks

From: Jeff King <hidden>
Date: 2016-06-15 22:48:54

On Thu, Jun 03, 2010 at 04:35:22PM +0200, Michael J Gruber wrote:
quoted hunk ↗ jump to hunk
diff --git a/diff.c b/diff.c
index 7950df6..cad7339 100644
--- a/diff.c
+++ b/diff.c
@@ -1788,6 +1788,8 @@ static void builtin_diff(const char *name_a,
 		ecbdata.color_diff = DIFF_OPT_TST(o, COLOR_DIFF);
 		ecbdata.found_changesp = &o->found_changes;
 		ecbdata.ws_rule = whitespace_rule(name_b ? name_b : name_a);
+		if (DIFF_OPT_TST(o, ALLOW_TEXTCONV) && (S_ISLNK(one->mode) || S_ISLNK(two->mode)))
+			ecbdata.ws_rule &= ~WS_NO_EOL_AT_EOF;
I see why you would use ALLOW_TEXTCONV to control this behavior, since
textconv by definition creates patches you can't apply. But it feels a
little hack-ish to me, as textconv is really something different. You
seem to want a "--allow-diff-which-cant-be-applied".

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help