summaryrefslogtreecommitdiff
path: root/xdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2018-04-09 10:32:17 +0200
committerJunio C Hamano <gitster@pobox.com>2018-04-09 21:32:59 +0900
commit5221c3159f670281ff36b6adbdf568661e930b50 (patch)
tree4bedef54229b742cab44133c20c20dfea9afe150 /xdiff
parent668b9ade6bcafbed1577468902d27c05c17cf026 (diff)
downloadgit-5221c3159f670281ff36b6adbdf568661e930b50.tar.gz
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 'xdiff')
0 files changed, 0 insertions, 0 deletions