]> git.ipfire.org Git - thirdparty/git.git/commit
builtin/commit-graph.c: extract 'read_one_commit()'
authorTaylor Blau <me@ttaylorr.com>
Mon, 18 May 2020 19:27:09 +0000 (13:27 -0600)
committerJunio C Hamano <gitster@pobox.com>
Mon, 18 May 2020 19:50:07 +0000 (12:50 -0700)
commitfa8953cb401d2c73c280eb6c70e7a7918dbe8bfb
treef0d94c22515e731119aa395a5e9a2c9ea5a1510d
parent630cd5194e6fcf928290a5c0f85e4094559197c8
builtin/commit-graph.c: extract 'read_one_commit()'

With either '--stdin-commits' or '--stdin-packs', the commit-graph
builtin will read line-delimited input, and interpret it either as a
series of commit OIDs, or pack names.

In a subsequent commit, we will begin handling '--stdin-commits'
differently by processing each line as it comes in, instead of in one
shot at the end. To make adequate room for this additional logic, split
the '--stdin-commits' case from '--stdin-packs' by only storing the
input when '--stdin-packs' is given.

In the case of '--stdin-commits', feed each line to a new
'read_one_commit' helper, which (for now) will merely call
'parse_oid_hex'.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/commit-graph.c