repo.or.cz
/
alt-git.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge branch 'ps/do-not-trust-commit-graph-blindly-for-existence' into kn/rev-list...
[alt-git.git]
/
t
/
chainlint
/
function.test
blob
5ee59562c93f365d6f990bf4dab0c90fb017c6bb
1
# LINT: "()" in function definition not mistaken for subshell
2
sha1_file() {
3
echo "$*" | sed "s#..#.git/objects/&/#"
4
} &&
5
6
# LINT: broken &&-chain in function and after function
7
remove_object() {
8
file=$(sha1_file "$*") &&
9
test -e "$file"
10
rm -f "$file"
11
}
12
13
sha1_file arg && remove_object arg