mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-19 15:41:31 +03:00
7c371e5dd4
This also needs the ability to create commits. Also experiment with `async` tauri commands, but without actually making them `async` - nothing actually is so why pretend? Further, assure we get the correct author and committer which helps it pick up the overridden author information when creating a commit.
40 lines
1.1 KiB
Bash
40 lines
1.1 KiB
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"
|
|
)
|
|
|
|
git clone remote single-branch-no-vbranch
|
|
|
|
git clone remote single-branch-no-vbranch-one-commit
|
|
(cd single-branch-no-vbranch-one-commit
|
|
echo change >> file && git add . && git commit -m "local change"
|
|
)
|
|
|
|
git clone remote single-branch-no-vbranch-multi-remote
|
|
(cd single-branch-no-vbranch-multi-remote
|
|
git remote add other-origin ../remote
|
|
git fetch other-origin
|
|
)
|
|
|
|
export GITBUTLER_CLI_DATA_DIR=./git/gitbutler/app-data
|
|
git clone remote one-vbranch-on-integration
|
|
(cd one-vbranch-on-integration
|
|
$CLI project add --switch-to-integration "$(git rev-parse --symbolic-full-name @{u})"
|
|
$CLI branch create virtual
|
|
)
|
|
|
|
git clone remote one-vbranch-on-integration-one-commit
|
|
(cd one-vbranch-on-integration-one-commit
|
|
$CLI project add --switch-to-integration "$(git rev-parse --symbolic-full-name @{u})"
|
|
$CLI branch create virtual
|
|
echo change >> file
|
|
echo in-index > new && git add new
|
|
$CLI branch commit virtual -m "virtual branch change in index and worktree"
|
|
)
|
|
|