Re: [GSoC] [PATCH v2 1/2] submodule--helper: introduce add-clone subcommand
- From
Atharva Raykar <raykar.ath@gmail.com>
- Date
- Jun 9, 2021, 13:10 UTC
- Message-ID
- <05339721-1CD6-4866-8A5E-368C9B379679@gmail.com>
- In-Reply-To
- <YMC8upoajZm0QQ5G@danh.dev>
On 09-Jun-2021, at 18:36, Đoàn Trần Công Danh <congdanhqx@gmail.com> wrote:
Show 16 quoted lines
>>>
>>> Overral I would replace the block inside capture_command with:
>>>
>>> -----8<-----
>>> char *nextline;
>>> char *line = sb_remote_out.buf;
>>> while ((nextline = strchr(line, '\n')) != NULL) {
>>> size_t len = nextline - line;
>>> if (strip_suffix_mem(line, &len, "(fetch)"))
>>> fprintf(output, " %.*s\n", (int)len, line);
>
> Fix-up for my suggestion:
>
> To be bug-for-bug with shell implementation, it should be:
>
> if (strip_suffix_mem(line, &len, " (fetch)"))That is very subtle, and I would have definitely missed it. Thanks.