From: Junio C Hamano Date: Thu, 08 Feb 2007 22:34:05 GMT Subject: Re: Fix "git log -z" behaviour Message-ID: <7v7iusz3c2.fsf@assigned-by-dhcp.cox.net> In-Reply-To: Linus Torvalds writes: > For the normal case where the termination character is '\n', this > obviously doesn't change anything at all, since we just switched two > identical characters around. So it's very safe - it doesn't change any > normal usage, but it definitely fixes "git log -z". Gaah. I have already applied this but I think this has fallout for existing users of "-z --raw". Nothing in-tree uses "git log" as the upstream of a pipe as far as I know because in-tree stuff tend to stick to plumbing when it comes to scripting, but I think your patch would affect the plumbing level as well. Scripts that read from "-z --raw" have been expecting to get a record whose first 7 bytes are "commit " to be a log, which is followed by an arbitrary number of records whose first byte is ":" (and then it needs variable number of records to complete one diff record). This patch removes the separator NUL between the log message and the first diff record.