Teach "apply --index-info" to handle rename patches
[gitweb.git] / diff-no-index.c
index 4cd9dacbe8e98d1420ebe1a217b0f927d24d125a..43aeeba2e0fd9c3c175dbc74a6f488e2c352c928 100644 (file)
@@ -26,7 +26,7 @@ static int read_directory(const char *path, struct string_list *list)
 
        while ((e = readdir(dir)))
                if (strcmp(".", e->d_name) && strcmp("..", e->d_name))
-                       string_list_insert(e->d_name, list);
+                       string_list_insert(list, e->d_name);
 
        closedir(dir);
        return 0;