Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'pb/test-must-fail-is-for-git'
[gitweb.git]
/
t
/
test-lib-functions.sh
diff --git
a/t/test-lib-functions.sh
b/t/test-lib-functions.sh
index 579e812506ec7cf0ea48aeb70991592fa7616f29..bd357704cce987afa79ec8fce038aa05f8c0a762 100644
(file)
--- a/
t/test-lib-functions.sh
+++ b/
t/test-lib-functions.sh
@@
-1004,3
+1004,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 &&
+ "$@"
+ )
+}