chiark / gitweb /
autopkgtests: t-has-ancestor: cope with tag args and return a commit
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 17 Nov 2013 19:18:36 +0000 (19:18 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 24 Nov 2013 17:45:28 +0000 (17:45 +0000)
tests/lib

index 6f2558061d343f8545d2e459f793a9ffd47b13b5..b6bf81088114a2c8f792995b23e7b7544e3af4d3 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -50,8 +50,8 @@ t-git-none () {
 }
 
 t-has-ancestor () {
-       local ancestor=`git rev-parse $1`
        local now=`git rev-parse HEAD`
+       local ancestor=`git rev-parse $1^{}`
        local mbase=`git merge-base $ancestor $now`
        if [ x$mbase != x$ancestor ]; then
                echo "not ff $ancestor..$now, $mbase != $ancestor"