gitbutler/crates/gitbutler-stack/tests/fixtures/stacking.sh
2024-09-30 00:22:35 +02:00

30 lines
781 B
Bash

#!/usr/bin/env bash
set -eu -o pipefail
CLI=${1:?The first argument is the GitButler CLI}
git init remote
(cd remote
echo first > file
git add . && git commit -m "init"
)
export GITBUTLER_CLI_DATA_DIR=../user/gitbutler/app-data
git clone remote multiple-commits
(cd multiple-commits
git branch existing-branch
$CLI project add --switch-to-workspace "$(git rev-parse --symbolic-full-name @{u})"
$CLI branch create --set-default first_branch
echo asdf >> foo
$CLI branch commit first_branch -m "some commit"
$CLI branch create --set-default virtual
echo change >> file
$CLI branch commit virtual -m "first commit"
echo change2 >> file
$CLI branch commit virtual -m "second commit"
echo change3 >> file
$CLI branch commit virtual -m "third commit"
)