git-branch -D: make it work even when on a yet-to-be-born branch
[gitweb.git] / builtin-commit-tree.c
index 9c987966711d4bff1f709df0c14071170950e21d..e2e690a1ae89b47f595288e452da10113f7b2e8f 100644 (file)
@@ -69,7 +69,7 @@ static int new_parent(int idx)
        int i;
        unsigned char *sha1 = parent_sha1[idx];
        for (i = 0; i < idx; i++) {
-               if (!memcmp(parent_sha1[i], sha1, 20)) {
+               if (!hashcmp(parent_sha1[i], sha1)) {
                        error("duplicate parent %s ignored", sha1_to_hex(sha1));
                        return 0;
                }