gitweb: git_get_project_config requires only $git_dir, not also $project
[gitweb.git] / commit.c
index 632061c2c3669991b6526a5b6b452e3b54ee718c..731191e63bd39a89a8ea4ed0390c49d5605cdbed 100644 (file)
--- a/commit.c
+++ b/commit.c
@@ -224,7 +224,7 @@ int unregister_shallow(const unsigned char *sha1)
        if (pos < 0)
                return -1;
        if (pos + 1 < commit_graft_nr)
-               memcpy(commit_graft + pos, commit_graft + pos + 1,
+               memmove(commit_graft + pos, commit_graft + pos + 1,
                                sizeof(struct commit_graft *)
                                * (commit_graft_nr - pos - 1));
        commit_graft_nr--;