aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/rev-list-options.txt
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2023-06-15 16:39:59 +0200
committerJunio C Hamano <gitster@pobox.com>2023-06-15 12:09:31 -0700
commitc40f0b78771ecc8696014e2e0aa37e78417b4723 (patch)
tree6507c00163a5237029b13ad8d04c93f5a8c61524 /Documentation/rev-list-options.txt
parentaf37a209ad76ce760becc0d2c2fac63c2022e730 (diff)
downloadgit-c40f0b78771ecc8696014e2e0aa37e78417b4723.tar.gz
revision: handle pseudo-opts in `--stdin` mode
While both git-rev-list(1) and git-log(1) support `--stdin`, it only accepts commits and files. Most notably, it is impossible to pass any of the pseudo-opts like `--all`, `--glob=` or others via stdin. This makes it hard to use this function in certain scripted scenarios, like when one wants to support queries against specific revisions, but also against reference patterns. While this is theoretically possible by using arguments, this may run into issues once we hit platform limits with sufficiently large queries. And because `--stdin` cannot handle pseudo-opts, the only alternative would be to use a mixture of arguments and standard input, which is cumbersome. Implement support for handling pseudo-opts in both commands to support this usecase better. One notable restriction here is that `--stdin` only supports "stuck" arguments in the form of `--glob=foo`. This is because "unstuck" arguments would also require us to read the next line, which would add quite some complexity to the code. This restriction should be fine for scripted usage though. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/rev-list-options.txt')
-rw-r--r--Documentation/rev-list-options.txt9
1 files changed, 5 insertions, 4 deletions
diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
index 3000888a90..e6468bf0eb 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -236,10 +236,11 @@ ifndef::git-rev-list[]
endif::git-rev-list[]
--stdin::
- In addition to the '<commit>' listed on the command
- line, read them from the standard input. If a `--` separator is
- seen, stop reading commits and start reading paths to limit the
- result.
+ In addition to getting arguments from the command line, read
+ them for standard input as well. This accepts commits and
+ pseudo-options like `--all` and `--glob=`. When a `--` separator
+ is seen, the following input is treated as paths and used to
+ limit the result.
ifdef::git-rev-list[]
--quiet::