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

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

 



Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes:

> gitk expects raw verbose headers limited by \0. Meet these expectations.
>
> Signed-off-by: Johannes Schindelin <Johannes.Schindelin@xxxxxx>

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;
 

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