Re: [PATCH v9 4/6] notes.c: introduce '--separator=<paragraph-break>' option
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Jun 14, 2023, 01:41 UTC
- Message-ID
- <CAPig+cRzx2r34tqqi527sBcDXm3h_sLR1Y7_gX9R4uQ4KUKzFA@mail.gmail.com>
- In-Reply-To
- <xmqqh6ra26vq.fsf@gitster.g>
On Tue, Jun 13, 2023 at 9:02 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 10 quoted lines
> This step seems to break CI asan/ubsan job
> https://github.com/git/git/actions/runs/5260417146/jobs/9507299904#step:4:1826
> Perhaps something like this is in order?
>
> diff --git c/builtin/notes.c w/builtin/notes.c
> @@ -239,7 +239,7 @@ static void write_note_data(struct note_data *d, struct object_id *oid)
> static void append_separator(struct strbuf *message)
> {
> - if (separator[strlen(separator) - 1] == '\n')
> + if (*separator && separator[strlen(separator) - 1] == '\n')Is this the same issue Peff reported[1]? His proposed solution was a bit different.
[1]: https://lore.kernel.org/git/20230519005447.GA2955320@coredump.intra.peff.net/