{"thread":{"id":"7246","subject":"[PATCH 2/2] diff-files --quick","startedAt":"2007-03-14T18:24:06Z","lastAt":"2007-03-14T18:24:06Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"37098","messageId":"7vveh38z09.fsf@assigned-by-dhcp.cox.net","threadId":"7246","inReplyTo":null,"subject":"[PATCH 2/2] diff-files --quick","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-14T18:24:06Z","receivedAt":"2007-03-14T18:24:06Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"This teaches git-diff-files backend to exit early under --quick option.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n\n * And as an example, this converts diff-files.  Other backends\n   will follow, but the most interesting one would be tree-diff.\n\n diff-lib.c |    3 +++\n 1 files changed, 3 insertions(+), 0 deletions(-)\n\ndiff --git a/diff-lib.c b/diff-lib.c\nindex f9a1a10..3ef5d76 100644\n--- a/diff-lib.c\n+++ b/diff-lib.c\n@@ -324,6 +324,9 @@ int run_diff_files(struct rev_info *revs, int silent_on_removed)\n \t\tstruct cache_entry *ce = active_cache[i];\n \t\tint changed;\n \n+\t\tif (revs->diffopt.quick && diff_queued_diff.nr)\n+\t\t\tbreak;\n+\n \t\tif (!ce_path_match(ce, revs->prune_data))\n \t\t\tcontinue;\n \n-- \n1.5.0.3.1036.g6baf1\n"}]}