1#include "cache.h"
2#include "tree.h"
3#include "cache-tree.h"
45
static struct lock_file index_lock;
67
int main(int ac, char **av)
8{
9int fd = hold_locked_index(&index_lock, 1);
10if (read_cache() < 0)
11die("unable to read index file");
12active_cache_tree = NULL;
13if (write_cache(fd, active_cache, active_nr)
14|| commit_lock_file(&index_lock))
15die("unable to write index file");
16return 0;
17}