aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-ls-files.txt
diff options
context:
space:
mode:
authorZheNing Hu <adlternative@gmail.com>2021-01-23 10:20:10 +0000
committerJunio C Hamano <gitster@pobox.com>2021-01-23 11:48:20 -0800
commit93a7d9835f008488080d4f61096ee4c12ae60362 (patch)
treeebc9337488c0bc33c4e0fdf254f2fc1da58b5dad /Documentation/git-ls-files.txt
parented644d1666415cbed14cc6cd17a658bb56e7f28b (diff)
downloadgit-93a7d9835f008488080d4f61096ee4c12ae60362.tar.gz
ls-files.c: add --deduplicate option
During a merge conflict, the name of a file may appear multiple times in "git ls-files" output, once for each stage. If you use both `--delete` and `--modify` at the same time, the output may mention a deleted file twice. When none of the '-t', '-u', or '-s' options is in use, these duplicate entries do not add much value to the output. Introduce a new '--deduplicate' option to suppress them. Signed-off-by: ZheNing Hu <adlternative@gmail.com> [jc: extended doc and rewritten commit log] Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-ls-files.txt')
-rw-r--r--Documentation/git-ls-files.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt
index 0a3b5265b3..6d11ab506b 100644
--- a/Documentation/git-ls-files.txt
+++ b/Documentation/git-ls-files.txt
@@ -13,6 +13,7 @@ SYNOPSIS
(--[cached|deleted|others|ignored|stage|unmerged|killed|modified])*
(-[c|d|o|i|s|u|k|m])*
[--eol]
+ [--deduplicate]
[-x <pattern>|--exclude=<pattern>]
[-X <file>|--exclude-from=<file>]
[--exclude-per-directory=<file>]
@@ -80,6 +81,13 @@ OPTIONS
\0 line termination on output and do not quote filenames.
See OUTPUT below for more information.
+--deduplicate::
+ When only filenames are shown, suppress duplicates that may
+ come from having multiple stages during a merge, or giving
+ `--deleted` and `--modified` option at the same time.
+ When any of the `-t`, `--unmerged`, or `--stage` option is
+ in use, this option has no effect.
+
-x <pattern>::
--exclude=<pattern>::
Skip untracked files matching pattern.