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

Re: [PATCH] git-rev-list: fix --header

From
Junio C Hamano <junkio@cox.net>
Date
Apr 17, 2006, 19:36 UTC
Message-ID
<7vwtdom1t9.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.63.0604171443300.18017@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> gitk expects raw verbose headers limited by \0. Meet these expectations.
>
> Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Thanks.

Wouldn't this be simpler and do the same thing, I wonder? The point being that "--pretty --header" and "--header --pretty" traditionally did not make --header to override --pretty.

diff --git a/rev-list.c b/rev-list.c
index 000f27a..d3c0dd9 100644
--- a/rev-list.c
+++ b/rev-list.c
@@ -326,6 +326,9 @@ int main(int argc, const char **argv)
 		else
 			revs.header_prefix = "commit ";
 	}
+	else if (revs.verbose_header)
+		/* Only --header was specified */
+		revs.commit_format = CMIT_FMT_RAW;
 
 	list = revs.commits;
 
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 2 of 5 in “git-rev-list: fix --header”
  1. git-rev-list: fix --headerJohannes Schindelin, Apr 17, 2006
  2. Junio C HamanoApr 17, 2006
  3. Johannes SchindelinApr 17, 2006
  4. Junio C HamanoApr 17, 2006
  5. Johannes SchindelinApr 18, 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.