Skip to content

Commit

Permalink
Merge branch 'sb/refs-code-cleanup'
Browse files Browse the repository at this point in the history
* sb/refs-code-cleanup:
  cache: remove unused function 'have_git_dir'
  refs: remove unused function invalidate_ref_cache
  • Loading branch information
Junio C Hamano committed Nov 1, 2013
2 parents c9bb7d0 + 84471a1 commit e0fd1e3
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 21 deletions.
1 change: 0 additions & 1 deletion cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 0 additions & 5 deletions environment.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 0 additions & 7 deletions refs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 0 additions & 8 deletions refs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit e0fd1e3

Please sign in to comment.