summaryrefslogtreecommitdiffstats
path: root/t/chainlint/function.expect
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--t/chainlint/function.expect11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/chainlint/function.expect b/t/chainlint/function.expect
new file mode 100644
index 0000000..a14388e
--- /dev/null
+++ b/t/chainlint/function.expect
@@ -0,0 +1,11 @@
+sha1_file ( ) {
+ echo "$*" | sed "s#..#.git/objects/&/#"
+} &&
+
+remove_object ( ) {
+ file=$(sha1_file "$*") &&
+ test -e "$file" ?!AMP?!
+ rm -f "$file"
+} ?!AMP?!
+
+sha1_file arg && remove_object arg