Subject: Re: [PATCH v9 4/6] notes.c: introduce '--separator=<paragraph-break>' option

From: Junio C Hamano <[email-masked]>
Date: Tue, 16 May 2023 10:00:26 -0700

Teng Long <[email-masked]> writes:

> Returning to the issue of -separator = "", my thought is that I want
> --separator="" to behave the same way as
> --separator="<any-string-without-a-trailing-\n'>" when deals a string which does
> not contains a trailing newline. This will eliminate one more implicit logic and
> make behavior more consistent.

An obvious alternative would be to use the string given to the
"--separator" option literally, I guess, and you can add your own
newline if you want to.  But most of the time you would not want to
have an incomplete line, so appending the newline at the end by
default does make sense.

Special casing an empty value to "--separator" as "nothing" does
make sort-of sense.  Using a blank line as the inter-paragraph
separator is the default, and there is not much use in the
"--separator=''" that becomes "--separator=$'\012'" automatically.

> I think --no-separator maybe a better name, means that not any separator will be
> append between two paragraphs even a newline.

It would work as well.  Is it something we can safely add before
merging the topic to upcoming -rc1?

Thanks.