Merge branch 'ag/maint-combine-diff-fix' into maint

* ag/maint-combine-diff-fix:
  Respect core.autocrlf in combined diff
diff --git a/combine-diff.c b/combine-diff.c
index 9f80a1c..4dfc330 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -727,6 +727,18 @@
 				die("early EOF '%s'", elem->path);
 
 			result[len] = 0;
+
+			/* If not a fake symlink, apply filters, e.g. autocrlf */
+			if (is_file) {
+				struct strbuf buf;
+
+				strbuf_init(&buf, 0);
+				if (convert_to_git(elem->path, result, len, &buf, safe_crlf)) {
+					free(result);
+					result = strbuf_detach(&buf, &len);
+					result_size = len;
+				}
+			}
 		}
 		else {
 		deleted_file:
diff --git a/t/t4015-diff-whitespace.sh b/t/t4015-diff-whitespace.sh
index ec98509..b1cbd36 100755
--- a/t/t4015-diff-whitespace.sh
+++ b/t/t4015-diff-whitespace.sh
@@ -352,4 +352,20 @@
 	git diff --check
 '
 
+test_expect_success 'combined diff with autocrlf conversion' '
+
+	git reset --hard &&
+	echo >x hello &&
+	git commit -m "one side" x &&
+	git checkout HEAD^ &&
+	echo >x goodbye &&
+	git commit -m "the other side" x &&
+	git config core.autocrlf true &&
+	test_must_fail git merge master &&
+
+	git diff | sed -e "1,/^@@@/d" >actual &&
+	! grep "^-" actual
+
+'
+
 test_done