Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:57:59

"brian m. carlson" [off-list ref] 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help