diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-08-01 18:10:49 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-08-01 18:10:49 +0200 |
commit | a7b27d9e6d1071ff61a0263a87fac441b8dff11b (patch) | |
tree | a0a7f701e74edc6cc5d68fa62794f7be44f30fe1 /t/test-lib-functions.sh | |
parent | RelNotes/2.23.0: fix a few typos and other minor issues (diff) | |
parent | t2203: avoid hard-coded object ID values (diff) | |
download | git-a7b27d9e6d1071ff61a0263a87fac441b8dff11b.tar.xz git-a7b27d9e6d1071ff61a0263a87fac441b8dff11b.zip |
Merge branch 'bc/hash-independent-tests-part-4'
Update to the tests to help SHA-256 transition continues.
* bc/hash-independent-tests-part-4:
t2203: avoid hard-coded object ID values
t1710: make hash independent
t1007: remove SHA1 prerequisites
t0090: make test pass with SHA-256
t0027: make hash size independent
t6030: make test work with SHA-256
t5000: make hash independent
t1450: make hash size independent
t1410: make hash size independent
t: add helper to convert object IDs to paths
Diffstat (limited to 't/test-lib-functions.sh')
-rw-r--r-- | t/test-lib-functions.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index d4f199391f..48bd3b467d 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -1430,6 +1430,12 @@ test_oid () { eval "printf '%s' \"\${$var}\"" } +# Insert a slash into an object ID so it can be used to reference a location +# under ".git/objects". For example, "deadbeef..." becomes "de/adbeef..". +test_oid_to_path () { + echo "${1%${1#??}}/${1#??}" +} + # Choose a port number based on the test script's number and store it in # the given variable name, unless that variable already contains a number. test_set_port () { |