#!/bin/bash # Oracle: the system git (git diff-tree -p). generate.py has git write the # patches of the trees of the merge corpus (../../merge/traces) under each of # its diff algorithms; it needs python3 and nothing else. Output goes to $1 # (default ../traces). set -euo pipefail command -v git >/dev/null || { echo "git not on PATH" >&2; exit 1; } command -v python3 >/dev/null || { echo "python3 not on PATH" >&2; exit 1; } out="$(cd "${1:-$(dirname "$0")/../traces}" && pwd)" export GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_SYSTEM=/dev/null GIT_CONFIG_NOSYSTEM=1 unset GIT_DIR GIT_WORK_TREE GIT_INDEX_FILE GIT_OBJECT_DIRECTORY GIT_COMMON_DIR \ GIT_ALTERNATE_OBJECT_DIRECTORIES exec python3 "$(dirname "$0")/generate.py" "$out"