rev-list: expose and document --single-worktree

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Nguyễn Thái Ngọc Duy committed Aug 23, 2017 at 19:37 UTC 32619f99f94760e90c36fd2a4476f459cb11aa41
2 files changed +10
Documentation/rev-list-options.txt
+8
@@ -184,6 +184,14 @@ explicitly.
184 Pretend as if all objects mentioned by reflogs are listed on the
185 command line as `<commit>`.
186
187 +--single-worktree::
188 + By default, all working trees will be examined by the
189 + following options when there are more than one (see
190 + linkgit:git-worktree[1]): `--all`, `--reflog` and
191 + `--indexed-objects`.
192 + This option forces them to examine the current working tree
193 + only.
194 +
195 --ignore-missing::
196 Upon seeing an invalid object name in the input, pretend as if
197 the bad input was not given.
revision.c
+2
@@ -2251,6 +2251,8 @@ static int handle_revision_pseudo_opt(const char *submodule,
2251 return error("invalid argument to --no-walk");
2252 } else if (!strcmp(arg, "--do-walk")) {
2253 revs->no_walk = 0;
2254 + } else if (!strcmp(arg, "--single-worktree")) {
2255 + revs->single_worktree = 1;
2256 } else {
2257 return 0;
2258 }