Re: [PATCH 01/16] path: refactor `repo_common_path()` family of functions

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

 



Patrick Steinhardt <ps@xxxxxx> writes:

[snip]

> diff --git a/path.c b/path.c
> index 07964f5d32..273b649e00 100644
> --- a/path.c
> +++ b/path.c
> @@ -414,7 +414,7 @@ static void strbuf_worktree_gitdir(struct strbuf *buf,
>  	else if (!wt->id)
>  		strbuf_addstr(buf, repo->commondir);
>  	else
> -		strbuf_git_common_path(buf, repo, "worktrees/%s", wt->id);
> +		repo_common_path_append(repo, buf, "worktrees/%s", wt->id);

This is the only place we replace `strbuf_git_common_path` with
`repo_common_path_append`, whereas other places it is
`repo_common_path_replace`. I assume that is because in those places the
buf is newly initialized.

[snip]

Rest of the patch looks good!

Attachment: signature.asc
Description: PGP signature


[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