git-browser.cgi: use --stdin option when running rev-listgit-browser-1.0.1
commitaf26b989748a465598163fbf3e1ab9cf6b21eea1
authorKyle J. McKay <mackyle@gmail.com>
Tue, 1 Dec 2020 04:49:43 +0000 (30 21:49 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Tue, 1 Dec 2020 04:49:43 +0000 (30 21:49 -0700)
treea38cdf1864ce2e68cee15fe9d87e53b4c77137c6
parented6b5394590cbff7b546e1c03dc5704e109a222d
git-browser.cgi: use --stdin option when running rev-list

There can potentially be a substantial number of arguments that need
to be passed to the `git rev-list` command.  However the number of
arguments that can be passed on the command line may be limited --
severely so on some platforms.

Fortunately, git has provided for the eventuality with the `--stdin`
option to the `rev-list` command which allows the arguments to be
passed in via standard input.

Each argument must appear on an input line by itself and is either
a ref or, after seeing '--' on a line by itself, a path spec.  No
options (such as `--not`) are allowed via the `--stdin` input.

Since exclusion refs were recently converted to use the `^` prefix
instead of the `--not` option, the switchover to using `--stdin`
becomes rather simple as long as care is taken to avoid being
bitten by a SIGPIPE while writing the input arguments.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
git-browser.cgi