git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Sean <seanlkml@sympatico.ca>
Date
May 19, 2006, 03:38 UTC
Message-ID
<BAYC1-PASMTP10904A6D8E8EC08830C8F3AEA70@CEZ.ICE>
In-Reply-To
<7vk68ilnoi.fsf@assigned-by-dhcp.cox.net>

On Thu, 18 May 2006 20:05:01 -0700 Junio C Hamano <junkio@cox.net> 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]);
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 10 in “Allow pickaxe to be used via git log.”
  1. Allow pickaxe to be used via git log.Sean, May 19, 2006
  2. Junio C HamanoMay 19, 2006
  3. SeanMay 19, 2006
  4. Junio C HamanoMay 19, 2006
  5. SeanMay 19, 2006
  6. Junio C HamanoMay 19, 2006
  7. Allow pickaxe and diff-filter options to be used by git log.Sean, May 19, 2006
  8. Junio C HamanoMay 19, 2006
  9. SeanMay 19, 2006
  10. Junio C HamanoMay 19, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.