Skip to content

Commit c57a3a9

Browse files
paskyPetr Baudis
authored andcommitted
[PATCH] Correct show-diff output for deleted files
My convention is that contrary to files trimmed to zero size, deleted files always go to /dev/null. This patch turns show-diff to abide this. Signed-off-by: Petr Baudis <[email protected]>
1 parent e2e5e98 commit c57a3a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

show-diff.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ static void show_diff_empty(struct cache_entry *ce)
3131
int c = 0;
3232

3333
printf("--- %s\n", ce->name);
34-
printf("+++ %s\n", ce->name);
34+
printf("+++ /dev/null\n");
3535
p = old;
3636
end = old + size;
3737
while (p < end)

0 commit comments

Comments
 (0)