diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2017-01-17 12:25:53 +0000 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2017-01-17 12:30:13 +0000 |
commit | a2b565b98cf2235619ec555c067d8828197c5986 (patch) | |
tree | a9eb3906048d3c9a65a1f60f4e1d58dd10e66784 /tests | |
parent | 606993b2249c69f0a3b6ee95c4cf42dc97c99e83 (diff) |
test suite: gitattributes: Break out sums_check
No functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/tests/gitattributes | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/tests/tests/gitattributes b/tests/tests/gitattributes index fd3faa3..a00c1d3 100755 --- a/tests/tests/gitattributes +++ b/tests/tests/gitattributes @@ -103,6 +103,20 @@ sfmt_setup () { cd .. } +sums_check () { + # caller should cd into working directory and set + # $sums $branch + + for f in af/*; do + git cat-file blob "refs/heads/$branch:$f" \ + | sha256sum \ + | sed -e 's#-$#'$f'#' \ + >>../$sums + done + + diff -U0 ../sums ../$sums +} + sfmt_import () { inst=$1 dgitargs=$2 @@ -137,15 +151,9 @@ sfmt_import () { t-dgit $dgitargs import-dsc ../$dscf +$branch git checkout $branch - for f in af/*; do - git cat-file blob "refs/heads/$branch:$f" \ - | sha256sum \ - | sed -e 's#-$#'$f'#' \ - >>../$sums - done + sums_check cd .. - diff -U0 sums $sums } : ----- generate the orig ----- |