1
0
Fork 0
git/t/chainlint/function.expect
Daniel Baumann 54102a2c29
Adding upstream version 1:2.47.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-23 07:43:39 +02:00

11 lines
247 B
Text

2 sha1_file() {
3 echo "$*" | sed "s#..#.git/objects/&/#"
4 } &&
5
6 remove_object() {
7 file=$(sha1_file "$*") &&
8 test -e "$file" ?!LINT: missing '&&'?!
9 rm -f "$file"
10 } ?!LINT: missing '&&'?!
11
12 sha1_file arg && remove_object arg