Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
t5304: rename "sha1" variables to "oid"
author
Jeff King
<peff@peff.net>
Thu, 14 Feb 2019 11:07:36 +0000
(06:07 -0500)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 14 Feb 2019 23:25:56 +0000
(15:25 -0800)
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>
t/t5304-prune.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
c2bf473
)
diff --git
a/t/t5304-prune.sh
b/t/t5304-prune.sh
index 2c19a790c1be2eac2ba13903933c2b96692d620c..1eeb828a15146e9e5040c64b20a31329853f12e7 100755
(executable)
--- a/
t/t5304-prune.sh
+++ b/
t/t5304-prune.sh
@@
-118,10
+118,10
@@
test_expect_success 'prune: do not prune detached HEAD with no reflog' '
test_expect_success 'prune: prune former HEAD after checking out branch' '
test_expect_success 'prune: prune former HEAD after checking out branch' '
- head_
sha1
=$(git rev-parse HEAD) &&
+ head_
oid
=$(git rev-parse HEAD) &&
git checkout --quiet master &&
git prune -v >prune_actual &&
git checkout --quiet master &&
git prune -v >prune_actual &&
- grep "$head_
sha1
" prune_actual
+ grep "$head_
oid
" prune_actual
'
'
@@
-265,24
+265,24
@@
EOF
'
test_expect_success 'prune .git/shallow' '
'
test_expect_success 'prune .git/shallow' '
-
SHA1
=$(echo hi|git commit-tree HEAD^{tree}) &&
- echo $
SHA1
>.git/shallow &&
+
oid
=$(echo hi|git commit-tree HEAD^{tree}) &&
+ echo $
oid
>.git/shallow &&
git prune --dry-run >out &&
git prune --dry-run >out &&
- grep $
SHA1
.git/shallow &&
- grep $
SHA1
out &&
+ grep $
oid
.git/shallow &&
+ grep $
oid
out &&
git prune &&
test_path_is_missing .git/shallow
'
test_expect_success 'prune .git/shallow when there are no loose objects' '
git prune &&
test_path_is_missing .git/shallow
'
test_expect_success 'prune .git/shallow when there are no loose objects' '
-
SHA1
=$(echo hi|git commit-tree HEAD^{tree}) &&
- echo $
SHA1
>.git/shallow &&
- git update-ref refs/heads/shallow-tip $
SHA1
&&
+
oid
=$(echo hi|git commit-tree HEAD^{tree}) &&
+ echo $
oid
>.git/shallow &&
+ git update-ref refs/heads/shallow-tip $
oid
&&
git repack -ad &&
# verify assumption that all loose objects are gone
git count-objects | grep ^0 &&
git prune &&
git repack -ad &&
# verify assumption that all loose objects are gone
git count-objects | grep ^0 &&
git prune &&
- echo $
SHA1
>expect &&
+ echo $
oid
>expect &&
test_cmp expect .git/shallow
'
test_cmp expect .git/shallow
'
@@
-326,8
+326,8
@@
test_expect_success 'prune: handle HEAD reflog in multiple worktrees' '
git reset --hard HEAD^
) &&
git prune --expire=now &&
git reset --hard HEAD^
) &&
git prune --expire=now &&
-
SHA1
=`git hash-object expected` &&
- git -C third-worktree show "$
SHA1
" >actual &&
+
oid
=`git hash-object expected` &&
+ git -C third-worktree show "$
oid
" >actual &&
test_cmp expected actual
'
test_cmp expected actual
'