doc: clarify the filename encoding in git diff
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>
Andrey Bienkowski committed
Apr 20, 2021 at 11:24 UTC
9364bf465d23ff26f5e2eb4ee52434e7a69894f1
1 file changed
+4
-1
Documentation/diff-options.txt
+4
-1
@@ -293,11 +293,14 @@ explained for the configuration variable `core.quotePath` (see
293
linkgit:git-config[1]).
294
295
--name-only::
296
- Show only names of changed files.
296
+ Show only names of changed files. The file names are often encoded in UTF-8.
297
+ For more information see the discussion about encoding in the linkgit:git-log[1]
298
+ manual page.
299
300
--name-status::
301
Show only names and status of changed files. See the description
302
of the `--diff-filter` option on what the status letters mean.
303
+ Just like `--name-only` the file names are often encoded in UTF-8.
304
305
--submodule[=<format>]::
306
Specify how differences in submodules are shown. When specifying