aboutsummaryrefslogtreecommitdiffstats
path: root/combine-diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-08-24 14:32:18 -0700
committerJunio C Hamano <gitster@pobox.com>2008-08-24 14:32:18 -0700
commitfb7092807962af168a76f6d8cbab02150daa0b5a (patch)
tree07c57aa35c65acfc9b40e2abca17d4103699fe92 /combine-diff.c
parentMerge branch 'mv/maint-merge-fix' into maint (diff)
parentRespect core.autocrlf in combined diff (diff)
downloadgit-fb7092807962af168a76f6d8cbab02150daa0b5a.tar.gz
git-fb7092807962af168a76f6d8cbab02150daa0b5a.zip
Merge branch 'ag/maint-combine-diff-fix' into maint
* ag/maint-combine-diff-fix: Respect core.autocrlf in combined diff
Diffstat (limited to 'combine-diff.c')
-rw-r--r--combine-diff.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/combine-diff.c b/combine-diff.c
index 9f80a1c5e3..4dfc330867 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -727,6 +727,18 @@ static void show_patch_diff(struct combine_diff_path *elem, int num_parent,
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: