Re: [PATCH v6 01/10] ref-filter: introduce 'ref_formatting_state'
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Jul 30, 2015, 09:25 UTC
- Message-ID
- <vpqsi86atev.fsf@anie.imag.fr>
- In-Reply-To
- <xmqqfv4691ui.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 7 quoted lines
> If the act of printing an atom uses the formatting state that says > "next one needs X", then it is responsible to clear that "next one > needs X" part of the state, as it is the one who consumed that > state. E.g. if it used to say "next one needs to be padded to the > right" before entering print_value(), then the function did that > "padded output", then the "next one needs to be padded to the > right" should be cleared inside print_value().
Good point. This would also reduce the risk of forgetting to reset, as "use" and "reset" would be next to each other in the code.
-- Matthieu Moy http://www-verimag.imag.fr/~moy/