common-main: call git_setup_gettext()
[alt-git.git] / test-scrap-cache-tree.c
blob5b2fd0990894dd59a074ded5822bbcf215a989aa
1 #include "cache.h"
2 #include "lockfile.h"
3 #include "tree.h"
4 #include "cache-tree.h"
6 static struct lock_file index_lock;
8 int cmd_main(int ac, const char **av)
10 hold_locked_index(&index_lock, 1);
11 if (read_cache() < 0)
12 die("unable to read index file");
13 active_cache_tree = NULL;
14 if (write_locked_index(&the_index, &index_lock, COMMIT_LOCK))
15 die("unable to write index file");
16 return 0;