git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] add log.fulldiff config option
@ 2006-12-20  6:01 Jeff King
  2006-12-20  8:14 ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Jeff King @ 2006-12-20  6:01 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

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:
> 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);
 }
 
-- 

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-12-20 19:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-20  6:01 [PATCH] add log.fulldiff config option Jeff King
2006-12-20  8:14 ` Junio C Hamano
2006-12-20  8:41   ` [PATCH] revision: add --no-full-diff command line option Jeff King
2006-12-20 19:55     ` Junio C Hamano
2006-12-20  8:58   ` [PATCH] add log.fulldiff config option Jeff King
2006-12-20 10:01   ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).