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

[PATCH] Fix "git log --diff-filter" bug

From
Arjen Laarhoven <arjen@yaph.org>
Date
Dec 25, 2007, 11:06 UTC
Message-ID
<1198580807-18802-1-git-send-email-arjen@yaph.org>

In commit b7bb760d5ed4881422673d32f869d140221d3564 an optimization was made to avoid unnecessary diff generation. This was partly fixed in 99516e35d096f41e7133cacde8fbed8ee9a3ecd0, but obviously the '--diff-filter' option also needs the diff machinery in action.

Signed-off-by: Arjen Laarhoven <arjen@yaph.org>
---
 revision.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/revision.c b/revision.c
index 7e2f4f1..6e85aaa 100644
--- a/revision.c
+++ b/revision.c
@@ -1290,8 +1290,10 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
 	if (revs->diffopt.output_format & ~DIFF_FORMAT_NO_OUTPUT)
 		revs->diff = 1;
 
-	/* Pickaxe and rename following needs diffs */
-	if (revs->diffopt.pickaxe || DIFF_OPT_TST(&revs->diffopt, FOLLOW_RENAMES))
+	/* Pickaxe, diff-filter and rename following need diffs */
+	if (revs->diffopt.pickaxe ||
+	    revs->diffopt.filter ||
+	    DIFF_OPT_TST(&revs->diffopt, FOLLOW_RENAMES))
 		revs->diff = 1;
 
 	if (revs->topo_order)
-- 
1.5.4.rc1.21.g0e545
Next: Jakub Narebski
Message 1 of 9 in “Fix "git log --diff-filter" bug”
  1. Fix "git log --diff-filter" bugArjen Laarhoven, Dec 25, 2007
  2. Jakub NarebskiDec 25, 2007
  3. Junio C HamanoDec 26, 2007
  4. Test "git log --diff-filter"Jakub Narebski, Jan 5, 2008
  5. Junio C HamanoJan 5, 2008
  6. Jakub NarebskiJan 5, 2008
  7. Junio C HamanoJan 6, 2008
  8. Jakub NarebskiJan 7, 2008
  9. Junio C HamanoJan 7, 2008

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.