Torsten Bögershausen <tbo...@web.de> writes:

> May be something like this, (but this is highly a personal taste question)

My observation was not a suggestion to rewrite the log message, but
primarily about describing the change in behaviour.

I didn't mean to nitpick the phrasing but let me think aloud about
it, using this as a template.  I rewrapped overlong lines from the
original.

> When running diff commands, file paths containing decomposed
> unicode code points are not converted to precomposed unicode form
> under Mac OS X.
>
> As a result, no diff is displayed.

Add ", but we normalize the paths in the index and the history to
precomposed form on that platform." at the end of the first sentence, to
make sure you mention both causes of "As a result" that follows.
Also, these are better to be a single paragraph.  I.e.

    When running diff commands, a pathspec containing decomposed
    unicode code points is not converted to precomposed unicode form
    under Mac OS X, but we normalize the paths in the index and the
    history to precomposed form on that platform.  As a result, the
    pathspec would not match and no diff is shown.

> Opposite to most builtin commands, the diff builtin is missing the
> parse_options call, which internally runs arguments through the
> precompose_argv call, which ensures all arguments are in precomposed
> unicode form.
>
> Fix the problem by adding a precompose_argv call to diff,
> diff-index, diff-files and diff-tree.

Perhaps it is just me but I found "Opposite to most" harder to grok
for some reason.

And the "backward compatibility note" is missing.  I'd write these
two paragraphs like this if I were doing this patch.

    Unlike many builtin commands, the "diff" family of commands do
    not use parse_options(), which is how other builtin commands
    indirectly call precompose_argv() to normalize argv[] into
    precomposed form on Mac OSX.  Teach these commands to call
    precompose_argv() themselves.

    Note that precomopose_argv() normalizes not just paths but all
    command line arguments, so things like "git diff -G $string"
    when $string has the decomposed form would first normalized into
    the precomposed form and would stop hitting the same string in
    the decomposed form in the diff output with this change.  It is
    not a problem per-se, as "log" family of commands already use
    parse_options() and call precompose_argv()--we can think of it
    as making the "diff" family of commands behave in a similar way
    as the commands in the "log" family.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to