summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin/commit.c2
-rwxr-xr-xt/t7516-commit-races.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/builtin/commit.c b/builtin/commit.c
index 8afb0ff5e0..682f922c73 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -1766,7 +1766,7 @@ 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,
+ ? current_head->object.sha1 : null_sha1,
0, sb.buf, &err) ||
ref_transaction_commit(transaction, &err)) {
rollback_index_files();
diff --git a/t/t7516-commit-races.sh b/t/t7516-commit-races.sh
index ed04d1c425..f2ce14e907 100755
--- a/t/t7516-commit-races.sh
+++ b/t/t7516-commit-races.sh
@@ -3,7 +3,7 @@
test_description='git commit races'
. ./test-lib.sh
-test_expect_failure 'race to create orphan commit' '
+test_expect_success 'race to create orphan commit' '
write_script hare-editor <<-\EOF &&
git commit --allow-empty -m hare
EOF