Teng Long
90bc19b3ae
notes.c: introduce '--separator=<paragraph-break>' option
...
When adding new notes or appending to an existing notes, we will
insert a blank line between the paragraphs, like:
$ git notes add -m foo -m bar
$ git notes show HEAD
foo
bar
The default behavour sometimes is not enough, the user may want
to use a custom delimiter between paragraphs, like when
specifying '-m', '-F', '-C', '-c' options. So this commit
introduce a new '--separator' option for 'git notes add' and
'git notes append', for example when executing:
$ git notes add -m foo -m bar --separator="-"
$ git notes show HEAD
foo
-
bar
a newline is added to the value given to --separator if it
does not end with one already. So when executing:
$ git notes add -m foo -m bar --separator="-"
and
$ export LF="
"
$ git notes add -m foo -m bar --separator="-$LF"
Both the two exections produce the same result.
The reason we use a "strbuf" array to concat but not "string_list", is
that the binary file content may contain '\0' in the middle, this will
cause the corrupt result if using a string to save.
Signed-off-by: Teng Long <dyroneteng@gmail.com >
Signed-off-by: Junio C Hamano <gitster@pobox.com >
2023-06-21 08:51:00 -07:00
..
2023-03-21 10:56:51 -07:00
2023-04-06 13:38:31 -07:00
2023-03-21 10:56:51 -07:00
2023-03-21 10:56:51 -07:00
2023-04-06 13:38:31 -07:00
2023-04-06 13:38:31 -07:00
2023-04-21 15:35:05 -07:00
2023-03-21 10:56:54 -07:00
2023-03-21 10:56:54 -07:00
2023-04-06 13:38:31 -07:00
2023-03-21 10:56:54 -07:00
2023-03-21 10:56:54 -07:00
2023-03-21 10:56:54 -07:00
2023-04-06 13:38:31 -07:00
2023-03-21 10:56:51 -07:00
2023-03-21 10:56:54 -07:00
2023-04-06 13:38:31 -07:00
2023-03-21 10:56:54 -07:00
2023-04-20 14:33:36 -07:00
2023-03-21 10:56:51 -07:00
2023-03-21 10:56:53 -07:00
2023-04-06 13:38:31 -07:00
2023-04-06 13:38:31 -07:00
2023-03-21 10:56:54 -07:00
2023-03-21 10:56:53 -07:00
2023-03-21 10:56:52 -07:00
2023-03-21 10:56:54 -07:00
2023-03-21 10:56:54 -07:00
2023-03-28 14:11:24 -07:00
2023-04-21 15:35:04 -07:00
2023-03-21 10:56:52 -07:00
2022-11-21 12:06:15 +09:00
2023-03-21 10:56:54 -07:00
2023-03-21 10:56:51 -07:00
2023-04-06 13:38:31 -07:00
2023-04-17 18:05:11 -07:00
2023-04-06 13:38:31 -07:00
2023-04-06 13:38:31 -07:00
2023-04-06 13:38:31 -07:00
2023-04-06 13:38:32 -07:00
2023-03-21 10:56:53 -07:00
2023-04-21 15:35:05 -07:00
2023-04-06 13:38:31 -07:00
2023-04-06 13:38:31 -07:00
2023-04-06 13:38:31 -07:00
2023-04-06 13:38:31 -07:00
2023-04-20 14:33:36 -07:00
2023-04-06 13:38:31 -07:00
2023-03-21 10:56:54 -07:00
2023-03-21 10:56:54 -07:00
2023-03-21 10:56:51 -07:00
2023-04-06 13:38:31 -07:00
2023-03-21 10:56:54 -07:00
2023-03-21 10:56:51 -07:00
2023-04-06 13:38:31 -07:00
2023-04-06 13:38:31 -07:00
2023-04-06 13:38:31 -07:00
2023-04-06 13:38:31 -07:00
2023-03-21 10:56:53 -07:00
2023-04-06 13:38:31 -07:00
2023-04-06 13:38:31 -07:00
2023-03-21 10:56:54 -07:00
2023-03-28 14:11:24 -07:00
2023-03-28 14:11:24 -07:00
2023-04-06 13:38:31 -07:00
2023-04-06 13:38:31 -07:00
2023-04-06 13:38:31 -07:00
2023-04-06 13:38:31 -07:00
2023-03-21 10:56:51 -07:00
2023-03-21 10:56:53 -07:00
2023-03-21 10:56:54 -07:00
2023-04-06 13:38:31 -07:00
2023-06-21 08:51:00 -07:00
2023-04-06 13:38:31 -07:00
2023-04-06 13:38:31 -07:00
2023-03-21 10:56:51 -07:00
2023-03-21 10:56:51 -07:00
2023-03-21 10:56:51 -07:00
2023-04-06 13:38:31 -07:00
2023-04-06 13:38:31 -07:00
2023-03-21 10:56:53 -07:00
2023-04-06 13:38:31 -07:00
2023-04-06 13:38:31 -07:00
2023-04-17 18:05:13 -07:00
2023-04-06 13:38:31 -07:00
2023-04-06 13:38:31 -07:00
2023-03-28 14:11:24 -07:00
2023-03-28 14:11:24 -07:00
2023-04-06 13:38:31 -07:00
2023-04-06 13:38:31 -07:00
2023-04-06 13:38:31 -07:00
2023-03-21 10:56:53 -07:00
2023-04-06 13:38:31 -07:00
2023-04-06 13:38:31 -07:00
2023-04-06 13:38:31 -07:00
2023-04-17 18:05:13 -07:00
2023-04-06 13:38:31 -07:00
2023-04-06 13:38:31 -07:00
2023-04-06 13:38:31 -07:00
2023-04-06 13:38:31 -07:00
2023-03-21 10:56:51 -07:00
2023-04-06 13:38:31 -07:00
2023-04-11 13:49:12 -07:00
2023-04-06 13:38:31 -07:00
2023-03-21 10:56:54 -07:00
2023-04-06 13:38:31 -07:00
2023-03-21 10:56:51 -07:00
2023-04-21 15:35:05 -07:00
2023-04-06 13:38:31 -07:00
2023-04-06 13:38:31 -07:00
2023-03-21 10:56:54 -07:00
2023-04-06 13:38:31 -07:00
2023-03-21 10:56:51 -07:00
2023-03-28 14:11:24 -07:00
2023-03-21 10:56:51 -07:00
2023-03-28 14:11:24 -07:00
2023-04-06 13:38:31 -07:00
2023-03-21 10:56:51 -07:00
2023-04-06 13:38:31 -07:00
2023-04-06 13:38:31 -07:00
2023-04-17 18:05:11 -07:00