From 78d0f5d210bc053d961185be6cfb0e248a0bdda3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=97=E3=82=89=E3=81=84=E3=81=97=E3=81=AA=E3=81=AA?= =?UTF-8?q?=E3=81=93?= Date: Thu, 19 Jun 2008 08:21:09 +0900 Subject: [PATCH 1/2] environment.c: remove unused function get_refs_directory() is not used anywhere. Signed-off-by: Nanako Shiraishi Signed-off-by: Junio C Hamano --- cache.h | 1 - environment.c | 7 ------- 2 files changed, 8 deletions(-) diff --git a/cache.h b/cache.h index 81b7e17de2..feb49b788f 100644 --- a/cache.h +++ b/cache.h @@ -311,7 +311,6 @@ extern char *git_work_tree_cfg; extern int is_inside_work_tree(void); extern const char *get_git_dir(void); extern char *get_object_directory(void); -extern char *get_refs_directory(void); extern char *get_index_file(void); extern char *get_graft_file(void); extern int set_git_dir(const char *path); diff --git a/environment.c b/environment.c index 73feb2d03a..187248bf5d 100644 --- a/environment.c +++ b/environment.c @@ -129,13 +129,6 @@ char *get_object_directory(void) return git_object_dir; } -char *get_refs_directory(void) -{ - if (!git_refs_dir) - setup_git_env(); - return git_refs_dir; -} - char *get_index_file(void) { if (!git_index_file) From e4bffb5a1d9ab3c9c0ef0541a395d47516480d97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=97=E3=82=89=E3=81=84=E3=81=97=E3=81=AA=E3=81=AA?= =?UTF-8?q?=E3=81=93?= Date: Thu, 19 Jun 2008 08:21:11 +0900 Subject: [PATCH 2/2] config.c: make git_env_bool() static This function is not used by any other file. Signed-off-by: Nanako Shiraishi Signed-off-by: Junio C Hamano --- cache.h | 1 - config.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cache.h b/cache.h index feb49b788f..8140763008 100644 --- a/cache.h +++ b/cache.h @@ -734,7 +734,6 @@ extern int git_config_set_multivar(const char *, const char *, const char *, int extern int git_config_rename_section(const char *, const char *); extern const char *git_etc_gitconfig(void); extern int check_repository_format_version(const char *var, const char *value, void *cb); -extern int git_env_bool(const char *, int); extern int git_config_system(void); extern int git_config_global(void); extern int config_error_nonbool(const char *); diff --git a/config.c b/config.c index c2f2bbb000..04d97e3d0b 100644 --- a/config.c +++ b/config.c @@ -549,7 +549,7 @@ const char *git_etc_gitconfig(void) return system_wide; } -int git_env_bool(const char *k, int def) +static int git_env_bool(const char *k, int def) { const char *v = getenv(k); return v ? git_config_bool(k, v) : def;