Merge branch 'sb/object-store-grafts' into sb/object-store-lookup
[gitweb.git] / builtin / reset.c
index a9136a163c0f168e0ce21aacd0a1675a75ac8401..ffe41c924b4810d79872fb5faf600a47e19508e5 100644 (file)
@@ -314,7 +314,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
        unborn = !strcmp(rev, "HEAD") && get_oid("HEAD", &oid);
        if (unborn) {
                /* reset on unborn branch: treat as reset to empty tree */
-               hashcpy(oid.hash, EMPTY_TREE_SHA1_BIN);
+               oidcpy(&oid, the_hash_algo->empty_tree);
        } else if (!pathspec.nr) {
                struct commit *commit;
                if (get_oid_committish(rev, &oid))