diff mbox series

[v3,1/4] config: minor addition of whitespace

Message ID 2161355e5c9a8ca0c8c0d3e5115a8843be1f4111.1710800549.git.dsimic@manjaro.org (mailing list archive)
State Superseded
Headers show
Series Fix a bug in configuration parsing, and improve tests and documentation | expand

Commit Message

Dragan Simic March 18, 2024, 10:24 p.m. UTC
In general, binary operators should be enclosed in a pair of leading and
trailing space (SP) characters.  Thus, clean up one spotted expression that
for some reason had a "bunched up" operator.

Signed-off-by: Dragan Simic <dsimic@manjaro.org>
---

Notes:
    Changes in v3:
        - Patch description was expanded a tiny bit, to make it more accurate
        - No changes to the source code were introduced
    
    Changes in v2:
        - No changes were introduced

 config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Junio C Hamano March 20, 2024, 6:32 a.m. UTC | #1
Dragan Simic <dsimic@manjaro.org> writes:

>  		if (c == '"') {
> -			quote = 1-quote;
> +			quote = 1 - quote;
>  			continue;

Obviously correct.  Will queue.
Dragan Simic March 20, 2024, 6:36 a.m. UTC | #2
On 2024-03-20 07:32, Junio C Hamano wrote:
> Dragan Simic <dsimic@manjaro.org> writes:
> 
>>  		if (c == '"') {
>> -			quote = 1-quote;
>> +			quote = 1 - quote;
>>  			continue;
> 
> Obviously correct.  Will queue.

Thanks.
diff mbox series

Patch

diff --git a/config.c b/config.c
index 3cfeb3d8bd99..a86a20cdf5cb 100644
--- a/config.c
+++ b/config.c
@@ -869,7 +869,7 @@  static char *parse_value(struct config_source *cs)
 			continue;
 		}
 		if (c == '"') {
-			quote = 1-quote;
+			quote = 1 - quote;
 			continue;
 		}
 		strbuf_addch(&cs->value, c);