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>
This commit is contained in:
Nguyễn Thái Ngọc Duy 2017-08-23 19:37:02 +07:00 committed by Junio C Hamano
parent acd9544a8f
commit 32619f99f9
2 changed files with 10 additions and 0 deletions

View File

@ -184,6 +184,14 @@ explicitly.
Pretend as if all objects mentioned by reflogs are listed on the Pretend as if all objects mentioned by reflogs are listed on the
command line as `<commit>`. command line as `<commit>`.
--single-worktree::
By default, all working trees will be examined by the
following options when there are more than one (see
linkgit:git-worktree[1]): `--all`, `--reflog` and
`--indexed-objects`.
This option forces them to examine the current working tree
only.
--ignore-missing:: --ignore-missing::
Upon seeing an invalid object name in the input, pretend as if Upon seeing an invalid object name in the input, pretend as if
the bad input was not given. the bad input was not given.

View File

@ -2251,6 +2251,8 @@ static int handle_revision_pseudo_opt(const char *submodule,
return error("invalid argument to --no-walk"); return error("invalid argument to --no-walk");
} else if (!strcmp(arg, "--do-walk")) { } else if (!strcmp(arg, "--do-walk")) {
revs->no_walk = 0; revs->no_walk = 0;
} else if (!strcmp(arg, "--single-worktree")) {
revs->single_worktree = 1;
} else { } else {
return 0; return 0;
} }