Re: Fix "git log -z" behaviour
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Feb 10, 2007, 17:09 UTC
- Message-ID
- <Pine.LNX.4.64.0702100902250.8424@woody.linux-foundation.org>
- In-Reply-To
- <7vlkj6mk0q.fsf@assigned-by-dhcp.cox.net>
On Sat, 10 Feb 2007, Junio C Hamano wrote:
Show 5 quoted lines
> > ... well, it just occured to me that it might make sense not to > let this new "use NUL as inter-commit separator for grep -z" > semantics hijack existing -z option, but introduce another > option, say, -Z.
I don't think I disagree, but I do suspect it's not worth it.
Yes, we really do have two "line_termination" characters: the one between commits, and the one we use within raw diffs. However, I don't think the *combination* ever makes sense any more (*), so using the same flag doesn't seem to really be a problem.
And the -z "line_termination" already got hijacked a long time ago for inter-commit messages too, so while adding a "-Z" would perhaps avoid a certain ambiguity, it would actually potentially break stuff that just did
git-rev-list -z --pretty .. | ...
which is actually _more_ likely than the "multiple commit messages _and_ raw outpu _and_ '-z'" combination.
So I would suggest leaving it as-is, especially since I don't think anybody has actually even noticed (ie nobody probably used that combination), and the new semantics in many ways are both more useful and more logical.
Linus
(*) It may well have made sense a year and a half ago, I don't think it makes much sense any more.