threads / patch / 7246

patch, 2 partsdiff-files --quick

Subject: [PATCH 2/2] diff-files --quick

## tl;dr

One message between Mar 14, 2007 and Mar 14, 2007. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Junio C Hamano· Mar 14, 2007, 18:24 UTC · lore
This teaches git-diff-files backend to exit early under --quick option.
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
 * And as an example, this converts diff-files.  Other backends
   will follow, but the most interesting one would be tree-diff.
 diff-lib.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
Show changes to diff-lib.c +3 −0
diff --git a/diff-lib.c b/diff-lib.c
index f9a1a10..3ef5d76 100644
--- a/diff-lib.c
+++ b/diff-lib.c
@@ -324,6 +324,9 @@ int run_diff_files(struct rev_info *revs, int silent_on_removed)
 		struct cache_entry *ce = active_cache[i];
 		int changed;
 
+		if (revs->diffopt.quick && diff_queued_diff.nr)
+			break;
+
 		if (!ce_path_match(ce, revs->prune_data))
 			continue;
 
-- 
1.5.0.3.1036.g6baf1

← back to recent threads