summaryrefslogtreecommitdiff
path: root/tests/lib
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/lib b/tests/lib
index 118c497..bd74ba8 100644
--- a/tests/lib
+++ b/tests/lib
@@ -111,11 +111,12 @@ t-git-objects-not-present () {
t-reporefs () {
local whichoutput=$1; shift
+ local whichrepo=${1-$dgitrepo}
local outputfile="$tmp/show-refs.$whichoutput"
(set -e
exec >"$outputfile"
- if test -d $dgitrepo; then
- cd $dgitrepo
+ if test -d $whichrepo; then
+ cd $whichrepo
git show-ref |sort
fi)
}