Re: [PATCH 2/4] log and rev-list: Fixed newline termination issues with --graph
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 8, 2008, 00:58 UTC
- Message-ID
- <7vfxtxnovw.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <5d46db230804071725r44694e76l3d6e63aabc67f372@mail.gmail.com>
"Govind Salinas" <blix@sophiasuchtig.com> writes:
> Shouldn't whatever option is used here respect line_terminator such > that it will use NULL bytes when -z is used?
Yes but it is orthogonal to what is being discussed. What the patch shows is how to allow --pretty=format: to conditionally do what --pretty=oneline already does. If the current --pretty=oneline forces "\n" under -z (I haven't checked if that is the case) that might be something we may want to change. Once you do so, you would get the same fix for --pretty=format for free ;-)
Also when you talk about line_terminator, you need to be careful to realize that it is _not_ really a "line_terminator". For example, we do not substitute 's/\n/\0/' the EOLN in multi-line log messages. Neither do we use NUL terminated lines in diff nor stat output when -p and --stat are in effect. They are more like "separator between parts of output".