On Thu, 14 Jul 2005, Junio C Hamano wrote:
> That said, I have been hating that diff options parsing for
> quite a while, and I've been thinking about cleaning it up along
> the lines I'll outline here, but have not done anything about
> it.  Care to help me out?

I didn't do what you suggested, but I _did_ split the "format" up into 
"format + line_termination", which in my opinion cleaned up part of it a 

So now "-z" only sets "line_termination" to NUL. "format" starts out as 
"DIFF_FORMAT_RAW" (which is the old HUMAN/MACHINE format - the difference 
between those two are now the line termination) but can be "PATCH" and 

Now, DIFF_FORMAT_PATCH + -z wouldn't seem to make any sense at all, but
you can actually do so, and it actually makes some amount of sense for the 
case of

        git-diff-tree -v -p -z HEAD

where the "-z" means that the commit _message_ will be terminated by a NUL 
character, while the "-v" obviously means that the commit message will be 
printed at all, and the "-p" means that the diff gets printed as a patch.

But the diff obviously gets printed with newlines (as does any newlines
_within_ the commit message), not with lines terminated by NUL's.

So "--name-only-z" no longer exists. It's "-z --name-only" (in any order,
quite naturally).

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to