[PATCH 06/16] t2018: replace "sha" with "oid"
From: Denton Liu <hidden>
Date: 2019-12-27 13:47:44
Subsystem:
the rest · Maintainer:
Linus Torvalds
As part of the effort to become more hash-agnostic, replace all instances of "sha" with "oid". Signed-off-by: Denton Liu <redacted> --- t/t2018-checkout-branch.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/t/t2018-checkout-branch.sh b/t/t2018-checkout-branch.sh
index 69758041f4..6b36c7800a 100755
--- a/t/t2018-checkout-branch.sh
+++ b/t/t2018-checkout-branch.sh@@ -4,12 +4,12 @@ test_description='checkout' . ./test-lib.sh -# Arguments: <branch> <sha> [<checkout options>] +# Arguments: <branch> <oid> [<checkout options>] # # Runs "git checkout" to switch to <branch>, testing that # # 1) we are on the specified branch, <branch>; -# 2) HEAD is <sha>; if <sha> is not specified, the old HEAD is used. +# 2) HEAD is <oid>; if <oid> is not specified, the old HEAD is used. # # If <checkout options> is not specified, "git checkout" is run with -b. do_checkout () {
@@ -22,9 +22,9 @@ do_checkout () { exp_branch=$1 && exp_ref="refs/heads/$exp_branch" && - # if <sha> is not specified, use HEAD. + # if <oid> is not specified, use HEAD. head=$(git rev-parse --verify HEAD) && - exp_sha=${2:-$head} && + exp_oid=${2:-$head} && # default options for git checkout: -b if [ -z "$3" ]; then
@@ -33,16 +33,16 @@ do_checkout () { opts="$3" fi - $should_fail git checkout $opts $exp_branch $exp_sha && + $should_fail git checkout $opts $exp_branch $exp_oid && if test -z "$should_fail" then echo "$exp_ref" >ref.expect && git rev-parse --symbolic-full-name HEAD >ref.actual && test_cmp ref.expect ref.actual && - echo "$exp_sha" >sha.expect && - git rev-parse --verify HEAD >sha.actual && - test_cmp sha.expect sha.actual + echo "$exp_oid" >oid.expect && + git rev-parse --verify HEAD >oid.actual && + test_cmp oid.expect oid.actual fi }
--
2.24.1.810.g65a2f617f4