X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=tests%2Ftests%2Fimport-nonnative;h=a1884e7ac4e6d3acc2187051cf96e3c99de137b8;hp=d709ab594b353cacd22095bc56638c9f70fd6b6e;hb=862997ec70c49b644de04639f6f68bc8309e3d56;hpb=37a0cb653704a1c0ded4750946915e5ce4718125 diff --git a/tests/tests/import-nonnative b/tests/tests/import-nonnative index d709ab59..a1884e7a 100755 --- a/tests/tests/import-nonnative +++ b/tests/tests/import-nonnative @@ -55,6 +55,19 @@ chk2() { t-ref-same refs/heads/first-2nd-import for orig in ../${p}_${v%-*}.orig*.tar.*; do + tar -atf $orig | LC_ALL=C sort >../files.o + pfx=$(perl <../files.o -ne ' + while (<>) { + m#^([^/]+/)# or exit 0; + $x //= $1; + $x eq $1 or exit 0; + } + print "$x\n"; + ') + perl -i~ -pe ' + s#^\Q'"$pfx"'\E##; + $_="" if m/^$/ || m#/$#; + ' ../files.o orig=${orig#../} pat="^Import ${orig//./\\.}\$" t-refs-same-start @@ -65,6 +78,9 @@ chk2() { imp=$(cat ../t.imp) t-ref-same-val "$orig $start" "$imp" done + git ls-tree -r --name-only "$t_ref_val:" \ + | sort >../files.g + diff ../files.{o,g} done cd .. }