Skip to contentSkip to conversation

diff-files --quick

PATCH In review Junio C Hamano 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 diff-files --quick

This teaches git-diff-files backend to exit early under --quick option.

---

* 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(-)
diff-lib.c +3 -0
index f9a1a10..3ef5d76 100644
@@ -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;
 
Signature · 1 line
1.5.0.3.1036.g6baf1