summaryrefslogtreecommitdiff
path: root/commit-graph.h
diff options
context:
space:
mode:
authorDerrick Stolee <derrickstolee@github.com>2023-03-20 11:26:47 +0000
committerJunio C Hamano <gitster@pobox.com>2023-03-20 12:17:32 -0700
commitb73dec55309d9b4f7e0db95dba729af0fcafb67f (patch)
tree596e5ab08d26016113a800020c98bbe799c72c7b /commit-graph.h
parentd15644fe0226af7ffc874572d968598564a230dd (diff)
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>
Diffstat (limited to 'commit-graph.h')
0 files changed, 0 insertions, 0 deletions