The revision.c handles the --stdin flag given to "git rev-list", and various other commands use it to take rev-list-like arguments. The pack-objects.c builtin made use of the revevisio.c API, and did mostly the same handling of stdin, with a couple of minor differences. This series extends the revision.c API to be flexible enough to handle the pack-objects.c case, and moves pack-objects.c over to that new API. The missing piece was to allow the definition of a "handle_stdin_line" callback. This new callback allows for either partially or entirely consuming the stdin before handing it off (or not) to the revision.c logic. I'm planning on submitting another series on top of this that'll make further use of this new API, but wanted to send this part as a stand-alone series first. Ævar Arnfjörð Bjarmason (4): upload-pack: run is_repository_shallow() before setup_revisions() revision.h: unify "disable_stdin" and "read_from_stdin" pack-objects.c: do stdin parsing via revision.c's API pack-objects.c: make use of REV_INFO_STDIN_LINE_PROCESS builtin/am.c | 4 +-- builtin/blame.c | 2 +- builtin/diff-tree.c | 2 +- builtin/pack-objects.c | 64 ++++++++++++++++++++---------------------- builtin/rev-list.c | 2 +- revision.c | 35 ++++++++++++++++++++--- revision.h | 60 +++++++++++++++++++++++++++++++++++---- sequencer.c | 4 +-- 8 files changed, 123 insertions(+), 50 deletions(-) -- 2.32.0.rc3.434.gd8aed1f08a7