mirror of
https://github.com/git/git
synced 2024-10-31 01:43:41 +00:00
14 lines
293 B
Text
14 lines
293 B
Text
|
# LINT: "()" in function definition not mistaken for subshell
|
||
|
sha1_file() {
|
||
|
echo "$*" | sed "s#..#.git/objects/&/#"
|
||
|
} &&
|
||
|
|
||
|
# LINT: broken &&-chain in function and after function
|
||
|
remove_object() {
|
||
|
file=$(sha1_file "$*") &&
|
||
|
test -e "$file"
|
||
|
rm -f "$file"
|
||
|
}
|
||
|
|
||
|
sha1_file arg && remove_object arg
|