Skip to content

Commit e479c5f

Browse files
peffgitster
authored andcommitted
docs: clarify that --encoding can produce invalid sequences
In the common case that the commit encoding matches the output encoding, we do not touch the buffer at all, which makes things much more efficient. But it might be unclear to a consumer that we will pass through bogus sequences. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 282616c commit e479c5f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Documentation/pretty-options.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ people using 80-column terminals.
3333
in their encoding header; this option can be used to tell the
3434
command to re-code the commit log message in the encoding
3535
preferred by the user. For non plumbing commands this
36-
defaults to UTF-8.
36+
defaults to UTF-8. Note that if an object claims to be encoded
37+
in `X` and we are outputting in `X`, we will output the object
38+
verbatim; this means that invalid sequences in the original
39+
commit may be copied to the output.
3740

3841
--notes[=<ref>]::
3942
Show the notes (see linkgit:git-notes[1]) that annotate the

0 commit comments

Comments
 (0)