2011-12-06 18:43:35 +01:00
|
|
|
#include "cache.h"
|
2014-10-01 12:28:42 +02:00
|
|
|
#include "lockfile.h"
|
2011-12-06 18:43:35 +01:00
|
|
|
#include "tree.h"
|
|
|
|
#include "cache-tree.h"
|
|
|
|
|
|
|
|
static struct lock_file index_lock;
|
|
|
|
|
|
|
|
int main(int ac, char **av)
|
|
|
|
{
|
2014-06-13 14:19:23 +02:00
|
|
|
hold_locked_index(&index_lock, 1);
|
2011-12-06 18:43:35 +01:00
|
|
|
if (read_cache() < 0)
|
|
|
|
die("unable to read index file");
|
|
|
|
active_cache_tree = NULL;
|
2014-06-13 14:19:23 +02:00
|
|
|
if (write_locked_index(&the_index, &index_lock, COMMIT_LOCK))
|
2011-12-06 18:43:35 +01:00
|
|
|
die("unable to write index file");
|
|
|
|
return 0;
|
|
|
|
}
|