diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2018-04-09 10:32:17 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-04-09 21:32:59 +0900 |
commit | 5221c3159f670281ff36b6adbdf568661e930b50 (patch) | |
tree | 4bedef54229b742cab44133c20c20dfea9afe150 /urlmatch.c | |
parent | config_set_store: rename some fields for consistency (diff) | |
download | tgif-5221c3159f670281ff36b6adbdf568661e930b50.tar.xz |
git_config_set: do not use a state machine
While a neat theoretical construct, state machines are hard to read. In
this instance, it does not even make a whole lot of sense because we are
more interested in flags, anyway: has the section been seen? Has the key
been seen? Does the current section match the key we are looking for?
Besides, the state `SECTION_SEEN` was named in a misleading way: it did
not indicate that we saw the section matching the key we are looking
for, but it instead indicated that we are *currently* in that section.
Let's just replace the state machine logic by clear and obvious flags.
This will also make it easier to review the upcoming patches to use the
newly-introduced `event_fn` callback of the config parser.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'urlmatch.c')
0 files changed, 0 insertions, 0 deletions