Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
delete_ref_loose(): inline function
[gitweb.git]
/
t
/
test-lib-functions.sh
diff --git
a/t/test-lib-functions.sh
b/t/test-lib-functions.sh
index fdaeb3a96bed361f53030cb6ea5c6bdde445163f..adab7f51f4c962967c90e3184853377feece2b1e 100644
(file)
--- a/
t/test-lib-functions.sh
+++ b/
t/test-lib-functions.sh
@@
-994,3
+994,17
@@
test_copy_bytes () {
}
' - "$1"
}
+
+# run "$@" inside a non-git directory
+nongit () {
+ test -d non-repo ||
+ mkdir non-repo ||
+ return 1
+
+ (
+ GIT_CEILING_DIRECTORIES=$(pwd) &&
+ export GIT_CEILING_DIRECTORIES &&
+ cd non-repo &&
+ "$@"
+ )
+}