X-Git-Url: https://git.octo.it/?p=git.git;a=blobdiff_plain;f=write-tree.c;h=bd07da6183b25470b00b9a2eedef29b7275760ec;hp=895e7a359d108312918c27d98c7b529f2e25e300;hb=HEAD;hpb=6bd20358a9b831b3b545284188871bc844245c25 diff --git a/write-tree.c b/write-tree.c index 895e7a35..bd07da61 100644 --- a/write-tree.c +++ b/write-tree.c @@ -13,7 +13,7 @@ static char *prefix = NULL; static const char write_tree_usage[] = "git-write-tree [--missing-ok] [--prefix=/]"; -static struct cache_file cache_file; +static struct lock_file lock_file; int main(int argc, char **argv) { @@ -21,7 +21,7 @@ int main(int argc, char **argv) setup_git_directory(); - newfd = hold_index_file_for_update(&cache_file, get_index_file()); + newfd = hold_lock_file_for_update(&lock_file, get_index_file()); entries = read_cache(); while (1 < argc) { @@ -52,7 +52,7 @@ int main(int argc, char **argv) die("git-write-tree: error building trees"); if (0 <= newfd) { if (!write_cache(newfd, active_cache, active_nr)) - commit_index_file(&cache_file); + commit_lock_file(&lock_file); } /* Not being able to write is fine -- we are only interested * in updating the cache-tree part, and if the next caller