diff options
author | Junio C Hamano <junkio@cox.net> | 2006-04-24 21:18:58 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-04-24 21:24:13 -0700 |
commit | bad68ec92410cf47dd001aa9b95d0f24c5f4bf77 (patch) | |
tree | 9c3ef1388867852e706dbf9a4ba9cc6a8ec15bfe /update-index.c | |
parent | dd0c34c46bdda0c20fd92d00516e711a4c9f7837 (diff) | |
download | git-bad68ec92410cf47dd001aa9b95d0f24c5f4bf77.tar.gz git-bad68ec92410cf47dd001aa9b95d0f24c5f4bf77.tar.xz |
index: make the index file format extensible.
... and move the cache-tree data into it.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'update-index.c')
-rw-r--r-- | update-index.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/update-index.c b/update-index.c index 86f53948f..d6d3295e3 100644 --- a/update-index.c +++ b/update-index.c @@ -6,12 +6,8 @@ #include "cache.h" #include "strbuf.h" #include "quote.h" -#include "tree.h" #include "cache-tree.h" -static unsigned char active_cache_sha1[20]; -static struct cache_tree *active_cache_tree; - /* * Default to not allowing changes to the list of files. The * tool doesn't actually care, but this makes it harder to add @@ -501,10 +497,9 @@ int main(int argc, const char **argv) if (newfd < 0) die("unable to create new cachefile"); - entries = read_cache_1(active_cache_sha1); + entries = read_cache(); if (entries < 0) die("cache corrupted"); - active_cache_tree = read_cache_tree(active_cache_sha1); for (i = 1 ; i < argc; i++) { const char *path = argv[i]; @@ -630,11 +625,9 @@ int main(int argc, const char **argv) } } if (active_cache_changed) { - if (write_cache_1(newfd, active_cache, active_nr, - active_cache_sha1) || + if (write_cache(newfd, active_cache, active_nr) || commit_index_file(&cache_file)) die("Unable to write new cachefile"); - write_cache_tree(active_cache_sha1, active_cache_tree); } return has_errors ? 1 : 0; |