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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Jeff King <peff@xxxxxxxx>
---
On Wed, Dec 20, 2006 at 12:14:14AM -0800, Junio C Hamano wrote:

> > 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

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]