#!/usr/bin/env bash set -eu -o pipefail CLI=${1:?The first argument is the GitButler CLI} export GITBUTLER_CLI_DATA_DIR=../user/gitbutler/app-data git init big-repo (cd big-repo empty_oid=$(git hash-object -w --stdin file git add . && git commit -m "init" ) git clone remote revwalk-repo (cd revwalk-repo for round in $(seq 5); do echo main >> file git commit -am "main-$round" done local_tracking_ref="$(git rev-parse --symbolic-full-name @{u})"; git checkout -b feature main for round in $(seq 100); do echo feature >> file git commit -am "feat-$round" done git checkout main $CLI project add --switch-to-workspace "$local_tracking_ref" for round in $(seq 10); do echo virtual-main >> file $CLI branch commit --message "virt-$round" main done git checkout -b non-virtual-feature main for round in $(seq 50); do echo non-virtual-feature >> file git commit -am "non-virtual-feat-$round" done # pretend the remote is at the same state as our local `main` git update-ref refs/remotes/origin/main main git gc --aggressive )