Re: [PATCH 03/44] repository.c: delete dead functions

2018-03-21 Thread Brandon Williams
On 03/03, Nguyễn Thái Ngọc Duy wrote:
> Signed-off-by: Nguyễn Thái Ngọc Duy 
> Signed-off-by: Junio C Hamano 
> ---
>  repository.c | 25 -
>  1 file changed, 25 deletions(-)
> 
> diff --git a/repository.c b/repository.c
> index bb53b54b6d..e65f4138a7 100644
> --- a/repository.c
> +++ b/repository.c
> @@ -15,31 +15,6 @@ void initialize_the_repository(void)
>   repo_set_hash_algo(&the_repo, GIT_HASH_SHA1);
>  }
>  
> -static char *git_path_from_env(const char *envvar, const char *git_dir,
> -const char *path, int fromenv)
> -{
> - if (fromenv) {
> - const char *value = getenv(envvar);
> - if (value)
> - return xstrdup(value);
> - }
> -
> - return xstrfmt("%s/%s", git_dir, path);
> -}
> -
> -static int find_common_dir(struct strbuf *sb, const char *gitdir, int 
> fromenv)
> -{
> - if (fromenv) {
> - const char *value = getenv(GIT_COMMON_DIR_ENVIRONMENT);
> - if (value) {
> - strbuf_addstr(sb, value);
> - return 1;
> - }
> - }
> -
> - return get_common_dir_noenv(sb, gitdir);
> -}
> -
>  static void expand_base_dir(char **out, const char *in,
>   const char *base_dir, const char *def_in)
>  {
> -- 
> 2.16.1.435.g8f24da2e1a
> 

This patch needs to be squashed into the previous one, the build breaks
otherwise (unless built with -Werror=unused-function).

-- 
Brandon Williams


[PATCH 03/44] repository.c: delete dead functions

2018-03-03 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy 
Signed-off-by: Junio C Hamano 
---
 repository.c | 25 -
 1 file changed, 25 deletions(-)

diff --git a/repository.c b/repository.c
index bb53b54b6d..e65f4138a7 100644
--- a/repository.c
+++ b/repository.c
@@ -15,31 +15,6 @@ void initialize_the_repository(void)
repo_set_hash_algo(&the_repo, GIT_HASH_SHA1);
 }
 
-static char *git_path_from_env(const char *envvar, const char *git_dir,
-  const char *path, int fromenv)
-{
-   if (fromenv) {
-   const char *value = getenv(envvar);
-   if (value)
-   return xstrdup(value);
-   }
-
-   return xstrfmt("%s/%s", git_dir, path);
-}
-
-static int find_common_dir(struct strbuf *sb, const char *gitdir, int fromenv)
-{
-   if (fromenv) {
-   const char *value = getenv(GIT_COMMON_DIR_ENVIRONMENT);
-   if (value) {
-   strbuf_addstr(sb, value);
-   return 1;
-   }
-   }
-
-   return get_common_dir_noenv(sb, gitdir);
-}
-
 static void expand_base_dir(char **out, const char *in,
const char *base_dir, const char *def_in)
 {
-- 
2.16.1.435.g8f24da2e1a