Re: [PATCH] Allow pickaxe to be used via git log.

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

 



On Thu, 18 May 2006 20:05:01 -0700
Junio C Hamano <junkio@xxxxxxx> wrote:


> User's scripts.  The point is the set of arguments rev-list as
> the lowest level machinery should not be modified by an
> arbitrary policy decision that happens to suit "git log" usage.
> 

Okay, thanks.

This moves the policy up a level and into the log/show/whatchanged code
and makes the code match the commit message better.  However, it will still
"disobey" user options if the user tries to combine both pickaxe and
--always for these commands; but hopefully that's okay at this level.

Sean

diff --git a/builtin-log.c b/builtin-log.c
index d5bbc1c..d2c3df0 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -23,6 +23,11 @@ static int cmd_log_wc(int argc, const ch
 	rev->commit_format = CMIT_FMT_DEFAULT;
 	rev->verbose_header = 1;
 	argc = setup_revisions(argc, argv, rev, "HEAD");
+	if (rev->diffopt.pickaxe && rev->always_show_header) {
+		rev->always_show_header = 0;
+		if (rev->diffopt.output_format == DIFF_FORMAT_RAW)
+			rev->diffopt.output_format = DIFF_FORMAT_NO_OUTPUT;
+	}
 
 	if (argc > 1)
 		die("unrecognized argument: %s", argv[1]);



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