summaryrefslogtreecommitdiff
path: root/server-info.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-09-14 20:08:55 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-09-15 19:46:31 (GMT)
commit0f56479d7325083953be36b8c8ee90380ff27f92 (patch)
tree6fcc320ce76ff96dab81dad33ea4e1f97dfd8194 /server-info.c
parent53764ee43defda7109fe547f471eac54c4e8b3d6 (diff)
downloadgit-0f56479d7325083953be36b8c8ee90380ff27f92.zip
git-0f56479d7325083953be36b8c8ee90380ff27f92.tar.gz
git-0f56479d7325083953be36b8c8ee90380ff27f92.tar.bz2
Retire info/rev-cache
It was one of those things that were well intentioned but did not turn out to be useful in practice. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'server-info.c')
-rw-r--r--server-info.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/server-info.c b/server-info.c
index 2b3aeca..3263035 100644
--- a/server-info.c
+++ b/server-info.c
@@ -3,7 +3,6 @@
#include "object.h"
#include "commit.h"
#include "tag.h"
-#include "rev-cache.h"
/* refs */
static FILE *info_ref_fp;
@@ -516,45 +515,6 @@ static int update_info_packs(int force)
return 0;
}
-/* rev-cache */
-static int record_rev_cache_ref(const char *path, const unsigned char *sha1)
-{
- struct object *obj = parse_object(sha1);
-
- if (!obj)
- return error("ref %s has bad sha %s", path, sha1_to_hex(sha1));
- while (obj && obj->type == tag_type)
- obj = parse_object(((struct tag *)obj)->tagged->sha1);
- if (!obj || obj->type != commit_type)
- /* tag pointing at a non-commit */
- return 0;
- return record_rev_cache(obj->sha1, NULL);
-}
-
-static int update_info_revs(int force)
-{
- char *path0 = strdup(git_path("info/rev-cache"));
- int len = strlen(path0);
- char *path1 = xmalloc(len + 2);
-
- strcpy(path1, path0);
- strcpy(path1 + len, "+");
-
- /* read existing rev-cache */
- if (!force)
- read_rev_cache(path0, NULL, 0);
- safe_create_leading_directories(path0);
-
- for_each_ref(record_rev_cache_ref);
-
- /* update the rev-cache database */
- write_rev_cache(path1, force ? "/dev/null" : path0);
- rename(path1, path0);
- free(path1);
- free(path0);
- return 0;
-}
-
/* public */
int update_server_info(int force)
{
@@ -566,7 +526,6 @@ int update_server_info(int force)
errs = errs | update_info_refs(force);
errs = errs | update_info_packs(force);
- errs = errs | update_info_revs(force);
return errs;
}