summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-11-01 07:38:58 -0700
committerJunio C Hamano <gitster@pobox.com>2013-11-01 07:38:58 -0700
commite0fd1e3841ebe24aa1d1a6c1ebbb1673f1201927 (patch)
tree46c21b4f55eb15722b3659a7cf8ea19e904e0fcf
parentc9bb7d040a266e8562e56f3ad0a375582f1d6f6f (diff)
parent84471a12130a40a050ce502c49f1faba97651add (diff)
downloadgit-e0fd1e3841ebe24aa1d1a6c1ebbb1673f1201927.tar.gz
Merge branch 'sb/refs-code-cleanup'
* sb/refs-code-cleanup: cache: remove unused function 'have_git_dir' refs: remove unused function invalidate_ref_cache
-rw-r--r--cache.h1
-rw-r--r--environment.c5
-rw-r--r--refs.c7
-rw-r--r--refs.h8
4 files changed, 0 insertions, 21 deletions
diff --git a/cache.h b/cache.h
index 9aa46e70c3..ce377e1354 100644
--- a/cache.h
+++ b/cache.h
@@ -398,7 +398,6 @@ extern int is_bare_repository(void);
extern int is_inside_git_dir(void);
extern char *git_work_tree_cfg;
extern int is_inside_work_tree(void);
-extern int have_git_dir(void);
extern const char *get_git_dir(void);
extern int is_git_directory(const char *path);
extern char *get_object_directory(void);
diff --git a/environment.c b/environment.c
index 378254c77a..0a15349cfe 100644
--- a/environment.c
+++ b/environment.c
@@ -155,11 +155,6 @@ int is_bare_repository(void)
return is_bare_repository_cfg && !get_git_work_tree();
}
-int have_git_dir(void)
-{
- return !!git_dir;
-}
-
const char *get_git_dir(void)
{
if (!git_dir)
diff --git a/refs.c b/refs.c
index 0c0e963532..5e5a3824b9 100644
--- a/refs.c
+++ b/refs.c
@@ -947,13 +947,6 @@ static struct ref_cache *get_ref_cache(const char *submodule)
return refs;
}
-void invalidate_ref_cache(const char *submodule)
-{
- struct ref_cache *refs = get_ref_cache(submodule);
- clear_packed_ref_cache(refs);
- clear_loose_ref_cache(refs);
-}
-
/* The length of a peeled reference line in packed-refs, including EOL: */
#define PEELED_LINE_LENGTH 42
diff --git a/refs.h b/refs.h
index b113377c48..87a1a79ad6 100644
--- a/refs.h
+++ b/refs.h
@@ -165,14 +165,6 @@ extern void unlock_ref(struct ref_lock *lock);
/** Writes sha1 into the ref specified by the lock. **/
extern int write_ref_sha1(struct ref_lock *lock, const unsigned char *sha1, const char *msg);
-/*
- * Invalidate the reference cache for the specified submodule. Use
- * submodule=NULL to invalidate the cache for the main module. This
- * function must be called if references are changed via a mechanism
- * other than the refs API.
- */
-extern void invalidate_ref_cache(const char *submodule);
-
/** Setup reflog before using. **/
int log_ref_setup(const char *ref_name, char *logfile, int bufsize);