diff options
| author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2014-06-13 19:19:23 +0700 | 
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2014-06-13 11:49:10 -0700 | 
| commit | 03b86647722f11ccc321cd7279aa49b811d17cc2 (patch) | |
| tree | dc5b717a01867692ce344d1548ad5a82ac1c1881 /cache-tree.c | |
| parent | 33c297aacc0ce0f945198fbcdf48fbf2fd27d01b (diff) | |
| download | git-03b86647722f11ccc321cd7279aa49b811d17cc2.tar.gz | |
read-cache: new API write_locked_index instead of write_index/write_cache
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache-tree.c')
| -rw-r--r-- | cache-tree.c | 3 | 
1 files changed, 1 insertions, 2 deletions
diff --git a/cache-tree.c b/cache-tree.c index 7fa524a113..52f8692efa 100644 --- a/cache-tree.c +++ b/cache-tree.c @@ -595,8 +595,7 @@ int write_cache_as_tree(unsigned char *sha1, int flags, const char *prefix)  				      active_nr, flags) < 0)  			return WRITE_TREE_UNMERGED_INDEX;  		if (0 <= newfd) { -			if (!write_cache(newfd, active_cache, active_nr) && -			    !commit_lock_file(lock_file)) +			if (!write_locked_index(&the_index, lock_file, COMMIT_LOCK))  				newfd = -1;  		}  		/* Not being able to write is fine -- we are only interested  | 
