t5304: rename "sha1" variables to "oid"

Let's make the script less jarring to read in a post-sha1 world by using more hash-agnostic variable names. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Feb 14, 2019 at 06:07 UTC cc80c95f42289f6288cda5c0e62f618f585e142c
1 file changed +12 -12
t/t5304-prune.sh
+12 -12
@@ -118,10 +118,10 @@ test_expect_success 'prune: do not prune detached HEAD with no reflog' '
118
119 test_expect_success 'prune: prune former HEAD after checking out branch' '
120
121 - head_sha1=$(git rev-parse HEAD) &&
121 + head_oid=$(git rev-parse HEAD) &&
122 git checkout --quiet master &&
123 git prune -v >prune_actual &&
124 - grep "$head_sha1" prune_actual
124 + grep "$head_oid" prune_actual
125
126 '
127
@@ -265,24 +265,24 @@ EOF
265 '
266
267 test_expect_success 'prune .git/shallow' '
268 - SHA1=$(echo hi|git commit-tree HEAD^{tree}) &&
269 - echo $SHA1 >.git/shallow &&
268 + oid=$(echo hi|git commit-tree HEAD^{tree}) &&
269 + echo $oid >.git/shallow &&
270 git prune --dry-run >out &&
271 - grep $SHA1 .git/shallow &&
272 - grep $SHA1 out &&
271 + grep $oid .git/shallow &&
272 + grep $oid out &&
273 git prune &&
274 test_path_is_missing .git/shallow
275 '
276
277 test_expect_success 'prune .git/shallow when there are no loose objects' '
278 - SHA1=$(echo hi|git commit-tree HEAD^{tree}) &&
279 - echo $SHA1 >.git/shallow &&
280 - git update-ref refs/heads/shallow-tip $SHA1 &&
278 + oid=$(echo hi|git commit-tree HEAD^{tree}) &&
279 + echo $oid >.git/shallow &&
280 + git update-ref refs/heads/shallow-tip $oid &&
281 git repack -ad &&
282 # verify assumption that all loose objects are gone
283 git count-objects | grep ^0 &&
284 git prune &&
285 - echo $SHA1 >expect &&
285 + echo $oid >expect &&
286 test_cmp expect .git/shallow
287 '
288
@@ -326,8 +326,8 @@ test_expect_success 'prune: handle HEAD reflog in multiple worktrees' '
326 git reset --hard HEAD^
327 ) &&
328 git prune --expire=now &&
329 - SHA1=`git hash-object expected` &&
330 - git -C third-worktree show "$SHA1" >actual &&
329 + oid=`git hash-object expected` &&
330 + git -C third-worktree show "$oid" >actual &&
331 test_cmp expected actual
332 '
333