Thread (3 messages) flat view 3 messages, 2 authors, 2016-08-11
DORMANTno replies

[PATCH] revision: add --no-full-diff command line option

From: Jeff King <hidden>
Date: 2016-08-11 20:47:24
Subsystem: the rest · Maintainer: Linus Torvalds

Possibly related (same subject, not in this thread)

Signed-off-by: Jeff King <redacted>
---
On Wed, Dec 20, 2006 at 12:14:14AM -0800, Junio C Hamano wrote:
quoted
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.
Absolutely.
I took this to mean "absolutely we need --no-full-diff." :)

I note that --full-diff sets rev->diff = 1. The log.fulldiff config
option does not, and nor does --no-full-diff unset it. However, I'm not
sure it makes sense to set it. Doing "git-log --full-diff" outputs an
extra line (separating the diff from the commit log) but since we
haven't told it any type of diff to output, the diff is blank. And if we
had told it a type, then that would have turned on rev->diff. So I don't
see a point in setting it.

 revision.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/revision.c b/revision.c
index 56819f8..ac4dbf2 100644
--- a/revision.c
+++ b/revision.c
@@ -955,6 +955,10 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
 				revs->full_diff = 1;
 				continue;
 			}
+			if (!strcmp(arg, "--no-full-diff")) {
+				revs->full_diff = 0;
+				continue;
+			}
 			if (!strcmp(arg, "--full-history")) {
 				revs->simplify_history = 0;
 				continue;
-- 
1.4.4.2.gee7ba-dirty
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help