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:
commit
fcdd9cc86d
@ -25,16 +25,14 @@ try_local_x () {
|
|||||||
echo "$x"
|
echo "$x"
|
||||||
}
|
}
|
||||||
|
|
||||||
# This test is an experiment to check whether any Git users are using
|
# Check whether the shell supports the "local" keyword. "local" is not
|
||||||
# Shells that don't support the "local" keyword. "local" is not
|
|
||||||
# POSIX-standard, but it is very widely supported by POSIX-compliant
|
# POSIX-standard, but it is very widely supported by POSIX-compliant
|
||||||
# shells, and if it doesn't cause problems for people, we would like
|
# shells, and we rely on it within Git's test framework.
|
||||||
# to be able to use it in Git code.
|
|
||||||
#
|
#
|
||||||
# For now, this is the only test that requires "local". If your shell
|
# If your shell fails this test, the results of other tests may be
|
||||||
# fails this test, you can ignore the failure, but please report the
|
# unreliable. You may wish to report the problem to the Git mailing
|
||||||
# problem to the Git mailing list <git@vger.kernel.org>, as it might
|
# list <git@vger.kernel.org>, as it could cause us to reconsider
|
||||||
# convince us to continue avoiding the use of "local".
|
# relying on "local".
|
||||||
test_expect_success 'verify that the running shell supports "local"' '
|
test_expect_success 'verify that the running shell supports "local"' '
|
||||||
x="notlocal" &&
|
x="notlocal" &&
|
||||||
echo "local" >expected1 &&
|
echo "local" >expected1 &&
|
||||||
|
@ -1433,7 +1433,8 @@ test_oid () {
|
|||||||
# Insert a slash into an object ID so it can be used to reference a location
|
# 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..".
|
# under ".git/objects". For example, "deadbeef..." becomes "de/adbeef..".
|
||||||
test_oid_to_path () {
|
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
|
# Choose a port number based on the test script's number and store it in
|
||||||
|
Loading…
Reference in New Issue
Block a user