summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/lib6
-rwxr-xr-xtests/tests/inarchivecopy2
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/lib b/tests/lib
index 6c55cba..23daeac 100644
--- a/tests/lib
+++ b/tests/lib
@@ -198,11 +198,11 @@ t-has-ancestor () {
fi
}
-t-has-parent () {
- # t-has-parent CHILD PARENT
+t-has-parent-or-is () {
+ # t-has-parent-or-is CHILD PARENT
local child=$1
local parent=$2
- local parents=$(git show --pretty=format:' %P ' "$child")
+ local parents=$(git show --pretty=format:' %P %H ' "$child")
parent=$(git rev-parse "$parent~0")
case "$parents" in
*" $parent "*) ;;
diff --git a/tests/tests/inarchivecopy b/tests/tests/inarchivecopy
index 394a214..c83a5d3 100755
--- a/tests/tests/inarchivecopy
+++ b/tests/tests/inarchivecopy
@@ -21,7 +21,7 @@ copy-check-good () {
git diff $vtag
t-refs-same refs/remotes/dgit/dgit/stable
t-ref-head
- t-has-parent HEAD $vtag
+ t-has-parent-or-is HEAD $vtag
}
copy-check () {