set -ex # export GIT_TRACE=1 # export GIT_TRACE_PACKET=1 # This script does 100 trials where it: # 1. Makes a copy of local_backup_repo # 2. Fetches from remote_repo into the copy # This lets us replay the same data shape repeatedly. local_backup_repo=path/to/local/repo remote_repo=ssh://user@host:22/path/to/remote/repo # Comment this out to use OpenSSH that ships w/ Git for Windows use_win10_ssh=1 if [ $use_win10_ssh ] then # Use SSH that ships with Windows export GIT_SSH_COMMAND='C:/WINDOWS/System32/OpenSSH/ssh.exe -vvv' export GIT_SSH_VARIANT=ssh else # Use OpenSSH that ships w/ Git for Windows unset GIT_SSH_COMMAND unset GIT_SSH unset GIT_SSH_VARIANT fi for i in {1..100} do trial=trial${i} rm -rf $trial git clone --local --mirror $local_backup_repo $trial git -C $trial fetch --no-progress $remote_repo rm -rf $trial done