summaryrefslogtreecommitdiff
path: root/write-tree.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2006-06-06 16:42:52 -0700
committerLibravatar Junio C Hamano <junkio@cox.net>2006-06-06 16:42:52 -0700
commit9941afc051d953ee5e8fd9a8a27c5cd659ef9552 (patch)
tree1c2e8296f1cb0e97e341c220a5246bd3154ced7a /write-tree.c
parentMerge branch 'js/alias' (diff)
parentref-log: style fixes. (diff)
downloadtgif-9941afc051d953ee5e8fd9a8a27c5cd659ef9552.tar.xz
Merge branch 'jc/lockfile'
* jc/lockfile: ref-log: style fixes. refs.c: convert it to use lockfile interface. Make index file locking code reusable to others.
Diffstat (limited to 'write-tree.c')
-rw-r--r--write-tree.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/write-tree.c b/write-tree.c
index 7a4f691d8a..d6a605893d 100644
--- a/write-tree.c
+++ b/write-tree.c
@@ -11,7 +11,7 @@ static int missing_ok = 0;
static const char write_tree_usage[] = "git-write-tree [--missing-ok]";
-static struct cache_file cache_file;
+static struct lock_file lock_file;
int main(int argc, char **argv)
{
@@ -19,7 +19,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();
if (argc == 2) {
if (!strcmp(argv[1], "--missing-ok"))
@@ -45,7 +45,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