From: Matthieu Moy Date: Thu, 30 Jul 2015 09:25:44 GMT Subject: Re: [PATCH v6 01/10] ref-filter: introduce 'ref_formatting_state' Message-ID: In-Reply-To: Junio C Hamano writes: > 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/