Re: [PATCH v2] column: disallow negative padding
From: Kristoffer Haugsbakk <hidden>
Date: 2024-02-12 07:06:03
From: Kristoffer Haugsbakk <hidden>
Date: 2024-02-12 07:06:03
Hey, thanks for the review On Sun, Feb 11, 2024, at 23:47, Rubén Justo wrote:
quoted
if (argc) usage_with_options(builtin_column_usage, options); if (real_command || command) {diff --git a/column.c b/column.c index ff2f0abf399..c723428bc70 100644 --- a/column.c +++ b/column.c@@ -189,7 +189,7 @@ void print_columns(const struct string_list *list, unsigned int colopts, memset(&nopts, 0, sizeof(nopts)); nopts.indent = opts && opts->indent ? opts->indent : ""; nopts.nl = opts && opts->nl ? opts->nl : "\n"; - nopts.padding = opts ? opts->padding : 1; + nopts.padding = (opts && 0 <= opts->padding) ? opts->padding : 1;This changes what Junio proposed. Is this on purpose?
Yes https://lore.kernel.org/git/3380df68-83fb-417b-a490-71614edc342f@app.fastmail.com/T/#m63ca728414def19b7a0c83ec76a8c1f2de68ffbb (local) -- Kristoffer Haugsbakk