#!/usr/bin/env bash
set -x -e
source ./functions.sh
cd ..
rm -rf picolispX-tests
mkdir picolispX-tests
if [ -d pil21 ]
then
cd pil21
git pull -a
cd ..
else
git clone https://github.com/picolisp/pil21
fi
cp -Rp pil21 picolispX-tests/repo
cd picolispX-tests/repo
git clean -fx
pijul init .
for G in $(git log --pretty=format:%h --reverse); do
git checkout -q "$G"
if [ -d src ]
then
pijul add -r src
pijul record --timestamp=123456789 -am"$G" 1> /dev/null
fi
done
git checkout master
cd ..
pijul clone repo repo2
zero "$(diff -qr repo/src repo2/src | wc -l)"