Re: [PATCH v2 01/21] environment: make `get_git_dir()` accept a repository

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

 



Patrick Steinhardt <ps@xxxxxx> writes:

[snip]

> diff --git a/repository.c b/repository.c
> index 9825a308993..6f43f2e8344 100644
> --- a/repository.c
> +++ b/repository.c
> @@ -91,6 +91,13 @@ static void expand_base_dir(char **out, const char *in,
>  		*out = xstrfmt("%s/%s", base_dir, def_in);
>  }
>
> +const char *repo_get_git_dir(struct repository *repo)
> +{
> +	if (!repo->gitdir)
> +		BUG("git environment hasn't been setup");

Shouldn't this message be more generic now? Since this function can be
used with any repository?

> +	return repo->gitdir;
> +}
> +
>  static void repo_set_commondir(struct repository *repo,
>  			       const char *commondir)
>  {

[snip]

Rest of the patch looks good. Thanks

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