Merge branch 'bc/hash-independent-tests-part-4'

Test fix.

* bc/hash-independent-tests-part-4:
  t0000: reword comments for "local" test
  t: decrease nesting in test_oid_to_path
This commit is contained in:
Junio C Hamano
2019-08-09 10:13:14 -07:00
2 changed files with 8 additions and 9 deletions

View File

@ -1433,7 +1433,8 @@ test_oid () {
# 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#??}"
local basename=${1#??}
echo "${1%$basename}/$basename"
}
# Choose a port number based on the test script's number and store it in