Skip to content

Commit 32619f9

Browse files
pcloudsgitster
authored andcommitted
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>
1 parent acd9544 commit 32619f9

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

Documentation/rev-list-options.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,14 @@ explicitly.
184184
Pretend as if all objects mentioned by reflogs are listed on the
185185
command line as `<commit>`.
186186

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+
187195
--ignore-missing::
188196
Upon seeing an invalid object name in the input, pretend as if
189197
the bad input was not given.

revision.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2251,6 +2251,8 @@ static int handle_revision_pseudo_opt(const char *submodule,
22512251
return error("invalid argument to --no-walk");
22522252
} else if (!strcmp(arg, "--do-walk")) {
22532253
revs->no_walk = 0;
2254+
} else if (!strcmp(arg, "--single-worktree")) {
2255+
revs->single_worktree = 1;
22542256
} else {
22552257
return 0;
22562258
}

0 commit comments

Comments
 (0)