Re: [PATCH 1/2] commit: reject invalid UTF-8 codepoints

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"brian m. carlson" <sandals@xxxxxxxxxxxxxxxxxxxx> writes:

> git format-patch --binary seems to produce the exact same output as
> without the --binary option.  Is there a different way I should be
> selecting the binary option?

These days --binary is a no-op option for format-patch (we used to
default to showing "binary files differ" in diff and required the
option to force generating binary patch), but the real issue is that
you haven't told Git that these "invalid" files are binary files and
not text X-<.

Perhaps add something like this temporarily to .git/info/attributes
when running the command?

	$ cat >>.git/info/attributes <<\EOF
        t/t3900/UTF-8-invalid.txt	binary
        EOF

Another idea is _not_ to create these invalid files inside t3900/
but create them in the set-up part of the test script to the current
directory, using "printf" to make sure the readers who read test
know what exact byte sequence is written out in the test and is
used, which might be a better option in the long run.

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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]