Skip to content

Commit 9364bf4

Browse files
hexagonrecursiongitster
authored andcommitted
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 <[email protected]>
1 parent 48bf2fa commit 9364bf4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Documentation/diff-options.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,11 +293,14 @@ explained for the configuration variable `core.quotePath` (see
293293
linkgit:git-config[1]).
294294

295295
--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.
297299

298300
--name-status::
299301
Show only names and status of changed files. See the description
300302
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.
301304

302305
--submodule[=<format>]::
303306
Specify how differences in submodules are shown. When specifying

0 commit comments

Comments
 (0)