path: root/Documentation/git-commit.txt
diff options
authorAlexandr Miloslavskiy <>2019-11-19 16:48:55 (GMT)
committerJunio C Hamano <>2019-11-20 04:01:53 (GMT)
commite440fc5888bd5faf1775fc61621caa3c5fab96b6 (patch)
treea5c26ec87d156361bb7b059f1123a03cf3041289 /Documentation/git-commit.txt
parent66a25a7242e4e16480eab89da6557f90a2924c12 (diff)
commit: support the --pathspec-from-file option
Decisions taken for simplicity: 1) For now, `--pathspec-from-file` is declared incompatible with `--interactive/--patch`, even when <file> is not `stdin`. Such use case it not really expected. Also, it would require changes to `interactive_add()`. 2) It is not allowed to pass pathspec in both args and file. Signed-off-by: Alexandr Miloslavskiy <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Documentation/git-commit.txt')
1 files changed, 15 insertions, 1 deletions
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index a0c4497..ced5a9b 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -13,7 +13,8 @@ SYNOPSIS
[-F <file> | -m <msg>] [--reset-author] [--allow-empty]
[--allow-empty-message] [--no-verify] [-e] [--author=<author>]
[--date=<date>] [--cleanup=<mode>] [--[no-]status]
- [-i | -o] [-S[<keyid>]] [--] [<pathspec>...]
+ [-i | -o] [--pathspec-from-file=<file> [--pathspec-file-nul]]
+ [-S[<keyid>]] [--] [<pathspec>...]
@@ -278,6 +279,19 @@ FROM UPSTREAM REBASE" section in linkgit:git-rebase[1].)
already been staged. If used together with `--allow-empty`
paths are also not required, and an empty commit will be created.
+ Pathspec is passed in `<file>` instead of commandline args. If
+ `<file>` is exactly `-` then standard input is used. Pathspec
+ elements are separated by LF or CR/LF. Pathspec elements can be
+ quoted as explained for the configuration variable `core.quotePath`
+ (see linkgit:git-config[1]). See also `--pathspec-file-nul` and
+ global `--literal-pathspecs`.
+ Only meaningful with `--pathspec-from-file`. Pathspec elements are
+ separated with NUL character and all other characters are taken
+ literally (including newlines and quotes).
Show untracked files.