Code

read-cache.c cleanup
[git.git] / builtin-update-index.c
index 24dca47d8d6e54429aa89b04e4d67bda04fa0173..d2556f376b293d2907cd8416e99f9c0bd31781ca 100644 (file)
@@ -491,9 +491,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
        /* We can't free this memory, it becomes part of a linked list parsed atexit() */
        lock_file = xcalloc(1, sizeof(struct lock_file));
 
-       newfd = hold_lock_file_for_update(lock_file, get_index_file());
-       if (newfd < 0)
-               die("unable to create new cachefile");
+       newfd = hold_lock_file_for_update(lock_file, get_index_file(), 1);
 
        entries = read_cache();
        if (entries < 0)