]> git.ipfire.org Git - thirdparty/git.git/commitdiff
doc: clarify the filename encoding in git diff
authorAndrey Bienkowski <hexagonrecursion@gmail.com>
Tue, 20 Apr 2021 11:24:37 +0000 (11:24 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 20 Apr 2021 19:57:26 +0000 (12:57 -0700)
AFAICT parsing the output of `git diff --name-only master...feature`
is the intended way of programmatically getting the list of files
modified
by a feature branch. It is impossible to parse text unless you know what
encoding it is in. The output encoding of diff --name-only and

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/diff-options.txt

index aa2b5c11f20bf3c94a9a7b704ac72dfe24b5900d..69de49f977b63ea547e43175490f762c00b6835c 100644 (file)
@@ -293,11 +293,14 @@ explained for the configuration variable `core.quotePath` (see
 linkgit:git-config[1]).
 
 --name-only::
-       Show only names of changed files.
+       Show only names of changed files. The file names are often encoded in UTF-8.
+       For more information see the discussion about encoding in the linkgit:git-log[1]
+       manual page.
 
 --name-status::
        Show only names and status of changed files. See the description
        of the `--diff-filter` option on what the status letters mean.
+       Just like `--name-only` the file names are often encoded in UTF-8.
 
 --submodule[=<format>]::
        Specify how differences in submodules are shown.  When specifying