git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: [PATCH] add log.fulldiff config option
Date: Wed, 20 Dec 2006 01:01:02 -0500	[thread overview]
Message-ID: <20061220060102.GA540@coredump.intra.peff.net> (raw)

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

             reply	other threads:[~2006-12-20  6:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-20  6:01 Jeff King [this message]
2006-12-20  8:14 ` [PATCH] add log.fulldiff config option 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061220060102.GA540@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).