]> asedeno.scripts.mit.edu Git - git.git/blobdiff - combine-diff.c
Fix permission bits on sources checked out with an overtight umask
[git.git] / combine-diff.c
index 9f80a1c5e3a461afd11966625589684d61187911..4dfc33086755e7ae03310baabd0060149f323f4c 100644 (file)
@@ -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: