chiark / gitweb /
test suite: gitattributes: Test that checkout is good too
[dgit.git] / tests / tests / gitattributes
index a00c1d3667482732aa4781b5395dfcc10d110bfb..e6089bd9cdda9007c597a7e2c9728cf9a3e90d48 100755 (executable)
@@ -104,8 +104,12 @@ sfmt_setup () {
 }
 
 sums_check () {
-       # caller should cd into working directory and set
+       # caller should cd into working directory, set
        #   $sums  $branch
+       # and check out $branch
+
+       sha256sum af/* >../$sums.checkout
+       diff -U0 ../sums ../$sums.checkout
 
        for f in af/*; do
                git cat-file blob "refs/heads/$branch:$f" \
@@ -150,6 +154,7 @@ sfmt_import () {
 
        t-dgit $dgitargs import-dsc ../$dscf +$branch
        git checkout $branch
+       git reset --hard
 
        sums_check