summaryrefslogtreecommitdiff
path: root/builtin/commit-graph.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2023-05-10 14:34:28 +0200
committerJunio C Hamano <gitster@pobox.com>2023-05-10 10:35:25 -0700
commit58afbe885c678c5cc6f6f83badca159871fc2cb3 (patch)
tree908b937ec179e354f85248c251d570f3a42353ae /builtin/commit-graph.c
parent50957937f92691215492f4c62dd0a18e39f17a2e (diff)
fetch: lift up parsing of "fetch.output" config variable
Parsing the display format happens inside of `display_state_init()`. As we only need to check for a simple config entry, this is a natural location to put this code as it means that display-state logic is neatly contained in a single location. We're about to introduce a new "porcelain" output format though that is intended to be parseable by machines, for example inside of a script. This format can be enabled by passing the `--porcelain` switch to git-fetch(1). As a consequence, we'll have to add a second callsite that influences the output format, which will become awkward to handle. Refactor the code such that callers are expected to pass the display format that is to be used into `display_state_init()`. This allows us to lift up the code into the main function, where we can then hook it into command line options parser in a follow-up commit. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit-graph.c')
0 files changed, 0 insertions, 0 deletions