projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Document git aliases support
[git.git]
/
write-tree.c
diff --git
a/write-tree.c
b/write-tree.c
index
7a4f691
..
d6a6058
100644
(file)
--- 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 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)
{
int main(int argc, char **argv)
{
@@
-19,7
+19,7
@@
int main(int argc, char **argv)
setup_git_directory();
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"))
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))
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
}
/* Not being able to write is fine -- we are only interested
* in updating the cache-tree part, and if the next caller