summaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2012-04-26 22:27:02 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-05-03 20:15:36 (GMT)
commit1900b976a4a3d06c22d57031efece81947539337 (patch)
tree37484622f78b39086440c6041891cfa1fc66bd09 /refs.c
parentd12229f532dc88024c249fb3e2ca0ac921cc14a9 (diff)
downloadgit-1900b976a4a3d06c22d57031efece81947539337.zip
git-1900b976a4a3d06c22d57031efece81947539337.tar.gz
git-1900b976a4a3d06c22d57031efece81947539337.tar.bz2
read_loose_refs(): rename function from get_ref_dir()
The new name better describes the function's purpose, and also makes the old name available for a more suitable purpose. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/refs.c b/refs.c
index 56d37ab..beb186c 100644
--- a/refs.c
+++ b/refs.c
@@ -769,8 +769,8 @@ void add_packed_ref(const char *refname, const unsigned char *sha1)
* dirname must end with '/'. dir must be the directory entry
* corresponding to dirname.
*/
-static void get_ref_dir(struct ref_cache *refs, const char *dirname,
- struct ref_dir *dir)
+static void read_loose_refs(struct ref_cache *refs, const char *dirname,
+ struct ref_dir *dir)
{
DIR *d;
const char *path;
@@ -808,8 +808,8 @@ static void get_ref_dir(struct ref_cache *refs, const char *dirname,
; /* silently ignore */
} else if (S_ISDIR(st.st_mode)) {
strbuf_addch(&refname, '/');
- get_ref_dir(refs, refname.buf,
- &search_for_subdir(dir, refname.buf, 1)->u.subdir);
+ read_loose_refs(refs, refname.buf,
+ &search_for_subdir(dir, refname.buf, 1)->u.subdir);
} else {
if (*refs->name) {
hashclr(sha1);
@@ -835,9 +835,9 @@ static struct ref_dir *get_loose_refs(struct ref_cache *refs)
{
if (!refs->loose) {
refs->loose = create_dir_entry("");
- get_ref_dir(refs, "refs/",
- &search_for_subdir(&refs->loose->u.subdir,
- "refs/", 1)->u.subdir);
+ read_loose_refs(refs, "refs/",
+ &search_for_subdir(&refs->loose->u.subdir,
+ "refs/", 1)->u.subdir);
}
return &refs->loose->u.subdir;
}