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

[PATCH] add log.fulldiff config option

From
Jeff King <peff@peff.net>
Date
Dec 20, 2006, 06:01 UTC
Message-ID
<20061220060102.GA540@coredump.intra.peff.net>
This continues to default to 'off'.
Signed-off-by: Jeff King <peff@peff.net>
---
On Tue, Dec 19, 2006 at 05:17:17PM -0800, Junio C Hamano wrote:
Show 7 quoted lines
> I typically do:
> 
>   git log --full-diff -p -SCOLLISION
> 
> The --full-diff option helps because it shows the diff for other
> files (that do not have different number of substring COLLISION
> in the pre and postimage) in the same commit as well.

I use --full-diff all the time, so this should save some typing. I can't think of a time when I wouldn't want it on, but if there is, we probably need a --no-full-diff.

Also, should this instead be diff.fulldiff?

Also also, I was going to submit a patch to document --full-diff, but I had a few questions. Should it go in diff-options? That makes some sense to me, but the parsing actually happens in setup_revisions. Furthermore, it seems to do the same thing as --pickaxe-all. Should we try to combine these?

 Documentation/config.txt |    6 ++++++
 builtin-log.c            |    6 ++++++
 2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 22482d6..8be1fa6 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -248,6 +248,12 @@ i18n.commitEncoding::
 	browser (and possibly at other places in the future or in other
 	porcelains). See e.g. gitlink:git-mailinfo[1]. Defaults to 'utf-8'.
 
+log.fulldiff::
+	If true, log entries which have been selected through path-limiting
+	or pickaxe will show the diff for all files changed in that commit
+	instead of only the files matching the specified path or pickaxe
+	string.
+
 log.showroot::
 	If true, the initial commit will be shown as a big creation event.
 	This is equivalent to a diff against an empty tree.
diff --git a/builtin-log.c b/builtin-log.c
index 17014f7..57edd12 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -15,6 +15,7 @@
 #include <sys/time.h>
 
 static int default_show_root = 1;
+static int default_full_diff = 0;
 
 /* this is in builtin-diff.c */
 void add_head(struct rev_info *revs);
@@ -26,6 +27,7 @@ static void cmd_log_init(int argc, const char **argv, const char *prefix,
 	rev->commit_format = CMIT_FMT_DEFAULT;
 	rev->verbose_header = 1;
 	rev->show_root_diff = default_show_root;
+	rev->full_diff = default_full_diff;
 	argc = setup_revisions(argc, argv, rev, "HEAD");
 	if (rev->diffopt.pickaxe || rev->diffopt.filter)
 		rev->always_show_header = 0;
@@ -54,6 +56,10 @@ static int git_log_config(const char *var, const char *value)
 		default_show_root = git_config_bool(var, value);
 		return 0;
 	}
+	if (!strcmp(var, "log.fulldiff")) {
+		default_full_diff = git_config_bool(var, value);
+		return 0;
+	}
 	return git_diff_ui_config(var, value);
 }
 
Next: Junio C Hamano
Message 1 of 6 in “add log.fulldiff config option”
  1. add log.fulldiff config optionJeff King, Dec 20, 2006
  2. Junio C HamanoDec 20, 2006
  3. revision: add --no-full-diff command line optionJeff King, Dec 20, 2006
  4. Junio C HamanoDec 20, 2006
  5. Jeff KingDec 20, 2006
  6. Junio C HamanoDec 20, 2006

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.