send-pack: avoid redundant "pack-objects died with strange error"
[gitweb.git] / builtin / mv.c
index c07f53b34380200eaba223d2e1f8f977c1f9fd18..cdbb09473c0c45efff23a63e78b7623cad523350 100644 (file)
@@ -63,7 +63,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
        const char **source, **destination, **dest_path;
        enum update_mode { BOTH = 0, WORKING_DIRECTORY, INDEX } *modes;
        struct stat st;
-       struct string_list src_for_dst = {NULL, 0, 0, 0};
+       struct string_list src_for_dst = STRING_LIST_INIT_NODUP;
 
        git_config(git_default_config, NULL);
 
@@ -180,7 +180,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
                } else if (string_list_has_string(&src_for_dst, dst))
                        bad = "multiple sources for the same target";
                else
-                       string_list_insert(dst, &src_for_dst);
+                       string_list_insert(&src_for_dst, dst);
 
                if (bad) {
                        if (ignore_errors) {