Re: [GSoC] [PATCH v2 1/2] submodule--helper: introduce add-clone subcommand

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09-Jun-2021, at 18:36, Đoàn Trần Công Danh <congdanhqx@xxxxxxxxx> wrote:
>>> 
>>> 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.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux