The test.sh script was more intended to be a kind of demo, and instead of creating lots of little repos, I prefer it to create just one repo and produce all the conflicts there.
OY22R4GF23ULRECE2XCL2CFA7CKARS5SACRGLRT3AHHQ5ODHQ5XAC
pijul init "${repo}" 2> /dev/null
pushd "${repo}" > /dev/null
cat <<EOF > file.txt
pijul init "${repo}" --channel alice 2> /dev/null
pijul fork bob --repository "${repo}"
echo "${repo}"
}
pijul_rec() {
local hash="$(pijul record --all --message "${1}")"
echo -n "${hash:6}"
}
newfile() {
local file="$1"
pijul channel switch alice 2> /dev/null
cat <<EOF > ${file}
pijul add file.txt 2> /dev/null
pijul record --all --message "initial change" > /dev/null
echo "${repo}"
pijul add ${file} 2> /dev/null
local hash="$(pijul_rec "add ${file}")"
pijul channel switch bob 2> /dev/null
pijul apply "${hash}" 2> /dev/null
pijul reset 2> /dev/null
echo "test: ${1} in repo ${repo}"
"${1}"
"${PIJUL_CONFLICTS}"
echo ">>> test: ${test} in repo ${PWD}"
pijul channel switch main 2>/dev/null
sed -i -e '/B/d' file.txt
pijul_rec "bob deletes"
pijul apply "$(pijul log --channel alice --hash-only --limit 1)" 2> /dev/null
pijul channel switch alice 2>/dev/null
sed -i -e '/B/d' file2.txt
pijul_rec "alice deletes" > /dev/null
pijul apply "${hash}" 2> /dev/null
"${PIJUL_CONFLICTS}"
popd > /dev/null
cleanup "${repo}"