]> git.ipfire.org Git - thirdparty/git.git/commitdiff
rev-list: expose and document --single-worktree
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Wed, 23 Aug 2017 12:37:02 +0000 (19:37 +0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 24 Aug 2017 21:58:50 +0000 (14:58 -0700)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/rev-list-options.txt
revision.c

index a6cf9eb380fabedd0e89b84d182e6e2c4798e503..7d860bfca1442e7957c41b7a7a5cd6f82141ed7e 100644 (file)
@@ -184,6 +184,14 @@ explicitly.
        Pretend as if all objects mentioned by reflogs are listed on the
        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::
        Upon seeing an invalid object name in the input, pretend as if
        the bad input was not given.
index d100b3a3beb61ffd359c3eea997cf8c64b275740..6eba4131b49609506651a69c4dc8f7f0ff1bf07a 100644 (file)
@@ -2251,6 +2251,8 @@ static int handle_revision_pseudo_opt(const char *submodule,
                        return error("invalid argument to --no-walk");
        } else if (!strcmp(arg, "--do-walk")) {
                revs->no_walk = 0;
+       } else if (!strcmp(arg, "--single-worktree")) {
+               revs->single_worktree = 1;
        } else {
                return 0;
        }