commit 4cf9fd02447f77ca777e84d86fe4a58dc75d7047e49758809a769560d0536326 from: Stefan Sperling date: Wed Oct 14 13:09:03 2026 UTC fix some tests which used to assume that SHA1 is the default commit - b3b0bea809a80a786998e3d60e67a4cd66ba7619f43fca80ba08e8a2bba1ac60 commit + 4cf9fd02447f77ca777e84d86fe4a58dc75d7047e49758809a769560d0536326 blob - 8954cce20bde9ed518d18150a3602a7efd7ccfa4b74af2d8e3dfa4781e632645 blob + 6a2f098cffe5489de75407cb6c60870e22ce472bb753c9f0ff3a0b870c5a279c --- regress/cmdline/import.sh +++ regress/cmdline/import.sh @@ -16,17 +16,12 @@ . ./common.sh -format_arg= -if [ "${GOT_TEST_ALGO}" = sha256 ]; then - format_arg="-A sha256" -fi - test_import_basic() { local testname=import_basic local testroot=`mktemp -d \ "$GOT_TEST_ROOT/got-test-$testname-XXXXXXXXXX"` - got init $format_arg $testroot/repo + got init -A "$GOT_TEST_ALGO" $testroot/repo mkdir $testroot/tree make_test_tree $testroot/tree @@ -152,7 +147,7 @@ test_import_specified_head() { "$GOT_TEST_ROOT/got-test-$testname-XXXXXXXXXX"` local headref=trunk - gotadmin init $format_arg -b $headref $testroot/repo + gotadmin init -A "$GOT_TEST_ALGO" -b $headref $testroot/repo mkdir $testroot/tree make_test_tree $testroot/tree @@ -377,7 +372,7 @@ test_import_ignores() { local testroot=`mktemp -d \ "$GOT_TEST_ROOT/got-test-$testname-XXXXXXXXXX"` - got init $format_arg $testroot/repo + got init -A "$GOT_TEST_ALGO" $testroot/repo mkdir $testroot/tree make_test_tree $testroot/tree @@ -411,7 +406,7 @@ test_import_empty_dir() { local testroot=`mktemp -d \ "$GOT_TEST_ROOT/got-test-$testname-XXXXXXXXXX"` - gotadmin init $format_arg $testroot/repo + gotadmin init -A "$GOT_TEST_ALGO" $testroot/repo mkdir $testroot/tree mkdir -p $testroot/tree/empty $testroot/tree/notempty @@ -455,7 +450,7 @@ test_import_symlink() { local testroot=`mktemp -d \ "$GOT_TEST_ROOT/got-test-$testname-XXXXXXXXXX"` - gotadmin init $format_arg $testroot/repo + gotadmin init -A "$GOT_TEST_ALGO" $testroot/repo mkdir $testroot/tree echo 'this is file alpha' > $testroot/tree/alpha blob - dc3810b21b45279016f75d4edf8d407da1560abd217a1e5eb361baf3b578909f blob + 8ada3d7b009a3cd7804ac0e8cffeda42f1a44626daf98e13a5d0e0869712adfc --- regress/cmdline/init.sh +++ regress/cmdline/init.sh @@ -16,18 +16,13 @@ . ./common.sh -format_arg= -if [ "${GOT_TEST_ALGO}" = sha256 ]; then - format_arg="-A sha256" -fi - test_init_basic() { local testname=init_basic local testroot=`mktemp -d \ "$GOT_TEST_ROOT/got-test-$testname-XXXXXXXXXX"` local headref=main - gotadmin init $format_arg $testroot/repo + gotadmin init -A "${GOT_TEST_ALGO}" $testroot/repo local git_head=`git -C $testroot/repo symbolic-ref HEAD` echo $git_head > $testroot/content @@ -47,7 +42,7 @@ test_init_specified_head() { "$GOT_TEST_ROOT/got-test-$testname-XXXXXXXXXX"` local headref=trunk - gotadmin init $format_arg -b $headref $testroot/repo + gotadmin init -A "$GOT_TEST_ALGO" -b $headref $testroot/repo local git_head=`git -C $testroot/repo symbolic-ref HEAD` echo refs/heads/$headref > $testroot/content.expected blob - e0d3b00bfb3728186d6879719e6b867a353f7f337c77f583d61c7ad6acabc307 blob + cecfd3c642cc1a4c124e339d0408a2507afca00b495043a9b73de094d37a7b15 --- regress/cmdline/load.sh +++ regress/cmdline/load.sh @@ -16,11 +16,6 @@ . ./common.sh -format_arg= -if [ "${GOT_TEST_ALGO}" = sha256 ]; then - format_arg="-A sha256" -fi - test_load_bundle() { local testroot=`test_init test_load_bundle` @@ -28,7 +23,7 @@ test_load_bundle() { git -C "$testroot/repo" bundle create -q "$testroot/bundle" master # then load it in an empty repository - (cd "$testroot/" && gotadmin init $format_arg -b master repo2) >/dev/null + (cd "$testroot/" && gotadmin init -A "$GOT_TEST_ALGO" -b master repo2) >/dev/null (cd "$testroot/repo2" && gotadmin load < "$testroot/bundle") \ >/dev/null if [ $? -ne 0 ]; then @@ -95,7 +90,7 @@ test_load_branch_from_bundle() { (cd "$testroot/repo" && gotadmin dump -q >$testroot/bundle) - (cd "$testroot/" && gotadmin init $format_arg -b newbranch repo2) >/dev/null + (cd "$testroot/" && gotadmin init -A "$GOT_TEST_ALGO" -b newbranch repo2) >/dev/null # check that the reference in the bundle are what we expect (cd "$testroot/repo2" && gotadmin load -l "$testroot/bundle") \