git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <junkio@cox.net>
Date
Mar 14, 2007, 18:24 UTC
Message-ID
<7vveh38z09.fsf@assigned-by-dhcp.cox.net>
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(-)
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
Message 1 of 1 in “diff-files --quick”
  1. 2/2 diff-files --quickJunio C Hamano, Mar 14, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.