commit f3243aa5875dfd29e54bed572bb4f5e040e6a2618b56a4294acc04fbef092405 from: Stefan Sperling date: Sat May 2 15:05:11 2026 UTC improve test coverage of send_merge_commit I am seeing cases where an automatic git mirroring sync job apparently fails to send all parents of a merge commit occasionally. My attempts to reproduce this in the test suite have failed so far. But anyway, this test should be checking whether all required commits have reached the destination repository, so let's expand test coverage accordingly. commit - 871be30ab9adaa3e16f3724562ff23643aa9dac00354bb557876921a131805d9 commit + f3243aa5875dfd29e54bed572bb4f5e040e6a2618b56a4294acc04fbef092405 blob - d67f732df99a1ab1e26f95137d64af2e54dfb7d144974cad82a8b068f724624b blob + a0025417140cf2f4582244ec4173d5f2ec9d1114596c449f12c85d8827360064 --- regress/cmdline/send.sh +++ regress/cmdline/send.sh @@ -340,16 +340,26 @@ test_send_merge_commit() { return 1 fi + if ! got clone -b master -m -q "$testurl/repo" "$testroot/repo-dest"; \ + then + echo "got clone command failed unexpectedly" >&2 + test_done "$testroot" 1 + return 1 + fi + echo 'upstream change' > $testroot/repo/alpha git_commit $testroot/repo -m 'upstream change' + local commit_id_upstream=`git_show_head $testroot/repo` got checkout $testroot/repo-clone $testroot/wt-clone > /dev/null echo 'downstream change' > $testroot/wt-clone/beta (cd $testroot/wt-clone && got commit -m 'downstream change' > /dev/null) + local commit_id_downstream=`git_show_head $testroot/repo-clone` got fetch -q -r $testroot/repo-clone (cd $testroot/wt-clone && got update > /dev/null) (cd $testroot/wt-clone && got merge origin/master > /dev/null) + local commit_id_merge=`git_show_head $testroot/repo-clone` ret=$? if [ $ret -ne 0 ]; then echo "got merge command failed unexpectedly" >&2 @@ -357,15 +367,31 @@ test_send_merge_commit() { return 1 fi - git -C $testroot/repo config receive.denyCurrentBranch ignore - - got send -q -r $testroot/repo-clone + cat >> $testroot/repo-clone/got.conf < /dev/null + ret=$? + if [ $ret -ne 0 ]; then + echo "got cat $commit_id failed unexpectedly" >&2 + test_done "$testroot" "$ret" + return 1 + fi + done + test_done "$testroot" 0 }