Derrick Stolee b73dec5530 for-each-ref: add --stdin option
When a user wishes to input a large list of patterns to 'git
for-each-ref' (likely a long list of exact refs) there are frequently
system limits on the number of command-line arguments.

Add a new --stdin option to instead read the patterns from standard
input. Add tests that check that any unrecognized arguments are
considered an error when --stdin is provided. Also, an empty pattern
list is interpreted as the complete ref set.

When reading from stdin, we populate the filter.name_patterns array
dynamically as opposed to pointing to the 'argv' array directly. This is
simple when using a strvec, as it is NULL-terminated in the same way. We
then free the memory directly from the strvec.

Helped-by: Phillip Wood <phillip.wood123@gmail.com>
Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-03-20 12:17:32 -07:00
..
2023-02-28 16:38:47 -08:00
2023-02-15 17:11:52 -08:00
2022-10-30 21:04:44 -04:00
2023-01-05 14:52:25 +09:00
2023-02-18 09:29:13 -08:00
2022-10-25 15:44:18 -07:00
2022-02-02 14:50:09 -08:00
2021-09-28 10:31:02 -07:00
2021-12-10 14:35:03 -08:00
2023-01-30 14:24:24 -08:00
2019-05-07 13:04:48 +09:00
2022-11-30 10:57:19 +09:00
2019-10-21 12:02:39 +09:00