"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: got diff vs file names with whitespaces
To:
Omar Polo <op@omarpolo.com>
Cc:
gameoftrees@openbsd.org
Date:
Fri, 6 Nov 2026 09:17:55 +0100

Download raw body.

Thread
On Thu, Nov 05, 2026 at 09:56:20PM +0100, Omar Polo wrote:
> @@ -252,8 +253,9 @@ output_unidiff_chunk(struct diff_output_info *outinfo,
>  	}
>  
>  	if (print_header && !(state->header_printed)) {
> -		rc = fprintf(dest, "--- %s\n",
> -		    diff_output_get_label_left(info));
> +		label = diff_output_get_label_left(info);
> +		rc = fprintf(dest, "--- %s%s\n", label,
> +		    strchr(label, ' ') != NULL ? "\t" : "");

'svn diff' always writes a tab here, no matter what the pathname contains.
I suspect we could do the same?