Thread (1 message) 1 message, 1 author, 2025-10-22

Re: Regression in `git diff --quiet HEAD` when a new file is staged

From: Junio C Hamano <hidden>
Date: 2025-10-22 14:31:47

Lidong Yan [off-list ref] writes:
quoted
+ diff_free_file(o);
+ o->file = xfopen("/dev/null", "w");
+ o->close_file = 1;
+ o->color_moved = 0;
o->dry_run = 1;
o->found_changes = 0;
diff_flush_patch(p, o);
This would make everything going to "/dev/null" after the flush_quietly() call.
I think we need to restore o->file.
Ah, true, the original location was only for NO_OUTPUT but the other
caller to the diff_flush_patch_quietly() helper does deal with other
cases as well.

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