commit caf168800142c29b4880b16d058656aae9c44a4a from: Omar Polo date: Sat Jul 13 15:08:59 2024 UTC enable some tests in sha256 mode commit - f05170897d7b849510231de7900a6f85653af1b7 commit + caf168800142c29b4880b16d058656aae9c44a4a blob - d029636f37e1e06a4fba931a86782da565457b03 blob + 01b59d6b22c8914f82397ad837939e2a7abf0c82 --- regress/cmdline/blame.sh +++ regress/cmdline/blame.sh @@ -1130,7 +1130,7 @@ run_test test_blame_lines_shifted_down run_test test_blame_commit_subsumed run_test test_blame_blame_h run_test test_blame_added_on_branch -run_test test_blame_submodule -run_test test_blame_symlink +run_test test_blame_submodule sha256-ok +run_test test_blame_symlink sha256-ok run_test test_blame_lines_shifted_skip run_test test_blame_commit_keywords blob - 6b14508b86ae76b06c4b422f9dddcb726e665798 blob + df93594b0d2b9c43f5458f984970bcbfef007d20 --- regress/cmdline/branch.sh +++ regress/cmdline/branch.sh @@ -675,9 +675,9 @@ test_branch_list_worktree_state() { test_parseargs "$@" run_test test_branch_create run_test test_branch_list -run_test test_branch_delete +run_test test_branch_delete sha256-ok run_test test_branch_delete_current_branch -run_test test_branch_delete_packed +run_test test_branch_delete_packed sha256-ok run_test test_branch_show run_test test_branch_packed_ref_collision run_test test_branch_commit_keywords blob - 9d71d8d52004f89383a535be68110b0dbb61be97 blob + da9f21b71ed5a6182df333e72bc95c8b004bd456 --- regress/cmdline/cat.sh +++ regress/cmdline/cat.sh @@ -435,9 +435,9 @@ test_cat_commit_keywords() { } test_parseargs "$@" -run_test test_cat_basic +run_test test_cat_basic sha256-ok run_test test_cat_path -run_test test_cat_submodule -run_test test_cat_submodule_of_same_repo -run_test test_cat_symlink +run_test test_cat_submodule sha256-ok +run_test test_cat_submodule_of_same_repo sha256-ok +run_test test_cat_symlink sha256-ok run_test test_cat_commit_keywords blob - a43ed7a5edf97dd118bdc839444f242a3b12dbe4 blob + 049027ad6c75376ea3889f4c9d676de6c9036ec2 --- regress/cmdline/common.sh +++ regress/cmdline/common.sh @@ -28,6 +28,7 @@ export GOT_TEST_ROOT="/tmp" export GOT_IGNORE_GITCONFIG=1 export GOT_VERSION_STR=`got --version | cut -d ' ' -f2` export GOT_TEST_HTTP_PORT=${GOT_TEST_HTTP_PORT:-8080} +export GOT_TEST_ALGO="${GOT_TEST_ALGO:-sha1}" export LC_ALL=C @@ -35,8 +36,13 @@ export MALLOC_OPTIONS=S git_init() { - git init -q "$1" + args= + if [ "${GOT_TEST_ALGO}" = sha256 ]; then + args="--object-format=sha256" + fi + git init -q $args "$1" + # Switch the default branch to match our test expectations if needed. # Only need to change HEAD since 'git init' did not create any refs. # Relying on implementation details of 'git init' is no problem for us. @@ -266,12 +272,17 @@ test_parseargs() run_test() { testfunc="$1" + limits="$2" if [ -n "$regress_run_only" ]; then case "$regress_run_only" in *$testfunc*) ;; *) return ;; esac + fi + + if [ "${GOT_TEST_ALGO}" = sha256 -a -z "$limits" ]; then + return fi if [ -z "$GOT_TEST_QUIET" ]; then blob - 59243b5c07792da8486b3128282d07cd79ae5bbe blob + f3fd9cd4b4a1c4dcb75a3452a8b6f215af48bf95 --- regress/cmdline/diff.sh +++ regress/cmdline/diff.sh @@ -2270,12 +2270,12 @@ test_diff_commit_keywords() { test_parseargs "$@" run_test test_diff_basic run_test test_diff_shows_conflict -run_test test_diff_tag -run_test test_diff_lightweight_tag -run_test test_diff_ignore_whitespace -run_test test_diff_submodule_of_same_repo +run_test test_diff_tag sha256-ok +run_test test_diff_lightweight_tag sha256-ok +run_test test_diff_ignore_whitespace +run_test test_diff_submodule_of_same_repo sha256-ok run_test test_diff_symlinks_in_work_tree -run_test test_diff_symlinks_in_repo +run_test test_diff_symlinks_in_repo sha256-ok run_test test_diff_binary_files run_test test_diff_commits run_test test_diff_ignored_file blob - b1c3c8ec3866e7ac66371da08256f2fa1212a13c blob + 158e231472a384a544f9d5fb653f59f7e41266f0 --- regress/cmdline/log.sh +++ regress/cmdline/log.sh @@ -1304,21 +1304,21 @@ EOF test_parseargs "$@" -run_test test_log_in_repo -run_test test_log_in_bare_repo +run_test test_log_in_repo sha256-ok +run_test test_log_in_bare_repo sha256-ok run_test test_log_in_worktree run_test test_log_in_worktree_with_path_prefix run_test test_log_tag run_test test_log_limit run_test test_log_oneline run_test test_log_patch_added_file -run_test test_log_nonexistent_path +run_test test_log_nonexistent_path sha256-ok run_test test_log_end_at_commit run_test test_log_reverse_display -run_test test_log_in_worktree_different_repo +run_test test_log_in_worktree_different_repo sha256-ok run_test test_log_changed_paths -run_test test_log_merge_commit_nonexistent_path -run_test test_log_submodule +run_test test_log_merge_commit_nonexistent_path sha256-ok +run_test test_log_submodule sha256-ok run_test test_log_diffstat run_test test_log_commit_keywords run_test test_log_toposort blob - 64e5549700453bd0afc70a70e8b3e31c3cde21db blob + 8c3ef3d540c1d85f90159c2da205319d07f7a15e --- regress/cmdline/ref.sh +++ regress/cmdline/ref.sh @@ -635,7 +635,7 @@ test_ref_commit_keywords() { test_parseargs "$@" run_test test_ref_create -run_test test_ref_delete +run_test test_ref_delete sha256-ok run_test test_ref_list run_test test_ref_list_packed_refs run_test test_ref_commit_keywords blob - 1b2025992be4d03420f106db1af5777b5bb84907 blob + 58ab6c1816b37910ac753cdd7a7af8703b5d2981 --- regress/cmdline/tree.sh +++ regress/cmdline/tree.sh @@ -271,6 +271,6 @@ test_tree_commit_keywords() { test_parseargs "$@" run_test test_tree_basic run_test test_tree_branch -run_test test_tree_submodule -run_test test_tree_submodule_of_same_repo +run_test test_tree_submodule sha256-ok +run_test test_tree_submodule_of_same_repo sha256-ok run_test test_tree_commit_keywords