Merge branch 'rs/daemon-hostname-in-strbuf'
[gitweb.git] / builtin / commit.c
index 6055c760f037617637eb7bffebe82213748b5e59..961e467242747dac07aa6f5e619e2d1a50570b06 100644 (file)
@@ -1766,8 +1766,8 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
        if (!transaction ||
            ref_transaction_update(transaction, "HEAD", sha1,
                                   current_head
-                                  ? current_head->object.sha1 : NULL,
-                                  0, !!current_head, sb.buf, &err) ||
+                                  ? current_head->object.sha1 : null_sha1,
+                                  0, sb.buf, &err) ||
            ref_transaction_commit(transaction, &err)) {
                rollback_index_files();
                die("%s", err.buf);