Re: [PATCH v10 4/6] notes.c: introduce '[--[no-]separator|--separator=<paragraph-break>]' option
- From
Kristoffer Haugsbakk <code@khaugsbakk.name>
- Date
- May 20, 2023, 16:12 UTC
- Message-ID
- <e82748ad-e73f-4c67-9bc8-16107eeaf058@app.fastmail.com>
- In-Reply-To
- <20230520104159.53670-1-tenglong.tl@alibaba-inc.com>
Hi Teng Long
On Sat, May 20, 2023, at 12:41, Teng Long wrote:
Show 5 quoted lines
> Yes, I noticed it too, but I'm not sure whether there exists the same > requirement in `git commit -m <message> -F <file> ...`, `git commit` is > usually a more frequently used subcommand, firstly introduced it to > `git notes` maybe is a good idea, but I'm not going to touch `git commit` > yet, unless we find someone who has a strong need.
Yep, you’re correct. My intention wasn’t to imply that git-commit(1) needed something like this, rather to explain (mostly to myself) why git-notes(1) learned a sort of git-commit(1) option in the first place.
`git commit -m` with its multiple paragraphs behavior makes perfect sense, since you are writing paragraphs of text, anyway. However, Git notes are used for other things than that—like line-delimited data—so a `--[no-]-separator[=]` option makes great sense for git-notes(1) and complements it well.
I wanted to figure out why `git notes append -m` works like it does since I’ve been idly wondering about it, and I have seen others around the Web who have been a little puzzled as well.
Cheers
-- Kristoffer Haugsbakk