diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-07-06 21:54:46 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-07-06 21:54:46 +0300 |
commit | 5a1d9e8f8777a60d388278af6093af8483f48811 (patch) | |
tree | 6af9bdd9f3d0b9b95c010c7e61b2ad08cc0e4aa3 /config.c | |
parent | f4c18e58be60d3f7cfec5da23f8d89526abce75a (diff) | |
parent | a53f43f9005e8a6fd4c5a6733c69b46199c7bb75 (diff) |
Merge branch 'gc/config-partial-submodule-kvi-fix'
Partially revert a sanity check that the rest of the config code
was not ready, to avoid triggering it in a corner case.
* gc/config-partial-submodule-kvi-fix:
config: don't BUG when both kvi and source are set
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 6 |
1 files changed, 0 insertions, 6 deletions
@@ -109,8 +109,6 @@ static struct config_reader the_reader; static inline void config_reader_push_source(struct config_reader *reader, struct config_source *top) { - if (reader->config_kvi) - BUG("source should not be set while iterating a config set"); top->prev = reader->source; reader->source = top; } @@ -128,16 +126,12 @@ static inline struct config_source *config_reader_pop_source(struct config_reade static inline void config_reader_set_kvi(struct config_reader *reader, struct key_value_info *kvi) { - if (kvi && (reader->source || reader->parsing_scope)) - BUG("kvi should not be set while parsing a config source"); reader->config_kvi = kvi; } static inline void config_reader_set_scope(struct config_reader *reader, enum config_scope scope) { - if (scope && reader->config_kvi) - BUG("scope should only be set when iterating through a config source"); reader->parsing_scope = scope; } |