diff options
author | Junio C Hamano <junkio@cox.net> | 2005-09-15 00:08:55 +0400 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-09-15 23:46:31 +0400 |
commit | 0f56479d7325083953be36b8c8ee90380ff27f92 (patch) | |
tree | 6fcc320ce76ff96dab81dad33ea4e1f97dfd8194 /build-rev-cache.c | |
parent | 53764ee43defda7109fe547f471eac54c4e8b3d6 (diff) |
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 'build-rev-cache.c')
-rw-r--r-- | build-rev-cache.c | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/build-rev-cache.c b/build-rev-cache.c deleted file mode 100644 index 948898beb4..0000000000 --- a/build-rev-cache.c +++ /dev/null @@ -1,56 +0,0 @@ -#include "refs.h" -#include "cache.h" -#include "commit.h" -#include "rev-cache.h" - -static void process_head_list(int verbose) -{ - char buf[512]; - - while (fgets(buf, sizeof(buf), stdin)) { - unsigned char sha1[20]; - struct commit *commit; - - if (get_sha1_hex(buf, sha1)) { - error("ignoring: %s", buf); - continue; - } - if (!(commit = lookup_commit_reference(sha1))) { - error("not a commit: %s", sha1_to_hex(sha1)); - continue; - } - record_rev_cache(commit->object.sha1, verbose ? stderr : NULL); - } -} - - -static const char *build_rev_cache_usage = -"git-build-rev-cache <rev-cache-file> < list-of-heads"; - -int main(int ac, char **av) -{ - int verbose = 0; - const char *path; - - while (1 < ac && av[1][0] == '-') { - if (!strcmp(av[1], "-v")) - verbose = 1; - else - usage(build_rev_cache_usage); - ac--; av++; - } - - if (ac != 2) - usage(build_rev_cache_usage); - - path = av[1]; - - /* read existing rev-cache */ - read_rev_cache(path, NULL, 0); - - process_head_list(verbose); - - /* update the rev-cache database by appending newly found one to it */ - write_rev_cache(path, path); - return 0; -} |