You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

13 lines
293 B

# 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