Code

Convert memcpy(a,b,20) to hashcpy(a,b).
[git.git] / builtin-add.c
index 096b611b5b0eef1c5a96dcaddc21aa874bdaee29..0cb9c812006ba4826122b57b9732e895b0eed905 100644 (file)
@@ -93,9 +93,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)
 
        git_config(git_default_config);
 
-       newfd = hold_lock_file_for_update(&lock_file, get_index_file());
-       if (newfd < 0)
-               die("unable to create new index file");
+       newfd = hold_lock_file_for_update(&lock_file, get_index_file(), 1);
 
        if (read_cache() < 0)
                die("index file corrupt");