Merge branch 'mm/push-social-engineering-attack-doc'
[gitweb.git] / builtin / mv.c
index 446a316738e0e739b6a89992879c6e4838f23c8f..43adf92ba64426a2f312cd6133276a98b20855f1 100644 (file)
@@ -26,7 +26,7 @@ static const char **internal_copy_pathspec(const char *prefix,
        int i;
        const char **result;
        ALLOC_ARRAY(result, count + 1);
-       memcpy(result, pathspec, count * sizeof(const char *));
+       COPY_ARRAY(result, pathspec, count);
        result[count] = NULL;
        for (i = 0; i < count; i++) {
                int length = strlen(result[i]);
@@ -126,7 +126,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
        if (--argc < 1)
                usage_with_options(builtin_mv_usage, builtin_mv_options);
 
-       hold_locked_index(&lock_file, 1);
+       hold_locked_index(&lock_file, LOCK_DIE_ON_ERROR);
        if (read_cache() < 0)
                die(_("index file corrupt"));