Merge branch 'ps/reftable-repo-init-fix'
Clear the fallout from a fix for 2.44 regression. * ps/reftable-repo-init-fix: t0610: remove unused variable assignment refs/reftable: don't fail empty transactions in repo without HEADmaint
commit
963a277a52
|
@ -781,6 +781,7 @@ static int reftable_be_transaction_prepare(struct ref_store *ref_store,
|
|||
&head_referent, &head_type);
|
||||
if (ret < 0)
|
||||
goto done;
|
||||
ret = 0;
|
||||
|
||||
for (i = 0; i < transaction->nr; i++) {
|
||||
struct ref_update *u = transaction->updates[i];
|
||||
|
|
|
@ -328,6 +328,18 @@ test_expect_success 'ref transaction: writes are synced' '
|
|||
EOF
|
||||
'
|
||||
|
||||
test_expect_success 'ref transaction: empty transaction in empty repo' '
|
||||
test_when_finished "rm -rf repo" &&
|
||||
git init repo &&
|
||||
test_commit -C repo --no-tag A &&
|
||||
git -C repo update-ref -d refs/heads/main &&
|
||||
test-tool -C repo ref-store main delete-refs REF_NO_DEREF msg HEAD &&
|
||||
git -C repo update-ref --stdin <<-EOF
|
||||
prepare
|
||||
commit
|
||||
EOF
|
||||
'
|
||||
|
||||
test_expect_success 'pack-refs: compacts tables' '
|
||||
test_when_finished "rm -rf repo" &&
|
||||
git init repo &&
|
||||
|
|
Loading…
Reference in New Issue