Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, adheres to Semantic Versioning, and is generated by Changie.
v0.8.1 - 2024-11-12¶
Fixed¶
- Shell completion: Don't use an incorrect command name if the binary is renamed.
v0.8.0 - 2024-11-09¶
Added¶
- {trunk, branch checkout}: Add -n/--dry-run flag to print the target branch.
- {up, down, top, bottom, branch checkout}: Add --detach flag to detach HEAD after checking out the target branch.
- submit: Add -w/--web flag to open a browser with the submitted CR, and a
spice.submit.web
configuration option to allow making this the default. - submit: Add
spice.submit.listTemplatesTimeout
configuration option to change the timeout for template lookup operations.
Changed¶
- GitHub: API errors will now include error codes to more easily root-cause issues.
- branch split: If the branch being split has been submitted, prompt to associate the CR with one of the branches.
- submit: If a branch has already been pushed to the remote repository with
git push -u
, use that branch name when creating a CR. - submit: If a branch name is already taken in the remote, generate a unique name for the remote branch that is used to submit the CR.
- submit: When matching externally submitted CRs to a branch, reject matches where the names are equal but their HEADs are not.
- submit: If CR template lookup from the forge times out, present the outdated templates to the user instead of presenting none.
Fixed¶
- submit: Fix incorrect branch name used when a base branch of a submitted branch is renamed.
v0.7.1 - 2024-10-26¶
Fixed¶
- branch submit: Fix bad log statement in --dry-run mode.
- branch submit: Fix bug when importing externally created PRs, where the first comment in the PR would be hijacked as the navigation comment.
v0.7.0 - 2024-10-02¶
This release contains significant changes to internal state management to prevent corruption. If you run into any issues, please report them here.
Changed¶
- branch delete: Accept multiple branches for deletion.
- Branch selection widget is now smarter about prioritizing fuzzy matches.
Fixed¶
- branch create: Prevent creation of tracked branches with untracked bases as this leaves the storage in a corrupted state.
- repo init: Don't leave dangling branch references when trunk is changed.
- branch create: Don't commit staged changes if git-spice is unable to save the branch to its internal storage.
- branch onto: Don't rebase the branch if changing its base would corrupt the data store.
- github: Recognize remote URLs in the form
ssh://git@ssh.github.com:443/org/repo
. - repo sync: Fix case when many branches from the same stack are merged, and order of deletion causes a restacking error or conflict.
- repo sync: Reduce the number of redundant operations performed when processing multiple merged branches.
v0.6.0 - 2024-09-17¶
Added¶
- Windows support.
Changed¶
- submit: If a CR for a branch is closed or merged, and the branch is submitted again, git-spice will now create a new CR for that branch instead of failing to update the existing CR.
- repo sync: Reduce the number of network requests made to check status of submitted branches.
- repo sync: Gracefully degrade for unsupported Git hosting services by looking for merged branches locally instead of attempting to make API requests and failing. This only works for merge commits and fast-forwards, but it makes it easier to use git-spice with non-GitHub remotes.
Fixed¶
- branch submit: Present template list in consistent order.
- branch create: Fix bug where aborting a commit would leave the repository in a detached HEAD state.
- repo sync: Don't warn about missing remote tracking branch if it was already deleted by a 'git fetch --prune' or similar operation.
- repo sync: Delete the correct tracking branch for renamed branches.
v0.5.2 - 2024-08-30¶
Fixed¶
- submit: Fix outdated PR template being used when trunk is behind its remote ref.
- github: Fix outdated PR templates being used when templates used lower-cased file names.
v0.5.1 - 2024-08-28¶
Fixed¶
- Support use with older Git versions by dropping use of a v2.33-only flag.
v0.5.0 - 2024-08-25¶
Added¶
- submit: Add
spice.submit.publish
configuration to allow making--no-publish
the default. Use this to work with unsupported Git hosting services. - branch checkout: Add
spice.branchCheckout.showUntracked
configuration to always show untracked branches in checkout prompt. - branch create: Add
--[no-]commit
flag and accompanyingspice.branchCreate.commit
configuration to create stacked branches without committing changes. - submit: When importing existing CRs, also detect existing stack navigation comments and update them instead of posting duplicates. This will only work for comments posted git-spice v0.5 or newer.
Fixed¶
- submit: When submitting with
--no-publish
, don't fail if the repository is hosted in an unsupported Git hosting services. - {branch, upstack} onto: Always rebase commits after the operation--even if the branch's base already matches the target. This better matches user expectations when the branch and base diverge.
v0.4.0 - 2024-08-09¶
This release adds support for configuring the behavior of git-spice
with use of the git config
command.
See https://abhinav.github.io/git-spice/cli/config/ for details.
Added¶
- cli: Support custom shorthands with the
spice.shorthand.*
configuration option. - submit: Support opting out or reducing navigation comment frequency with the --nav-comment flag.
The accompanying
spice.submit.navigationComment
configuration option may also be used instead. - log: Add a
spice.log.all
configuration option to default to--all
forgs ls
andgs ll
. - GitHub Enterprise: Allow setting the GitHub URL and API URL with the
spice.forge.github.url
andspice.forge.github.apiUrl
configuration options.
Changed¶
- GitHub Enterprise:
GITHUB_API_URL
is now optional. If not set, we'll guess it from the GitHub URL.
v0.3.1 - 2024-07-30¶
Fixed¶
- branch submit: Fail if Git editor is explicitly unset and there's no fallback.
- branch create: Ensure auto-generated branch names are unique.
- branch create: Don't lose data if the branch cannot be created for any reason.
- Fix messages instructing use of 'gs branch restack' to use correct arguments.
v0.3.0 - 2024-07-24¶
Added¶
- Authentication: If a secure storage is not available, fall back to plain text, but warn the user about it.
- gs branch submit: Add short form
-c
for the--fill
flag.
Removed¶
- branch delete: Drop short form
-f
for the--force
flag.
Fixed¶
- commit split: Fix bug where canceling the split would fail to revert to original state.
v0.2.0 - 2024-07-23¶
Added¶
- Publish pre-built Linux ARM binaries.
- {branch, stack, upstack, downstack} submit: Add --force flag. This acts like 'git push --force'.
Changed¶
- cli: Show --help when run without arguments
Fixed¶
- branch submit: Fix incorrect warning about current branch not being tracked when --no-publish is used.
- branch submit: Fix bug where updating an open PR would overwrite changes pushed to it by others. Use --force to overwrite these changes.
- branch submit: Use the same editor used by Git for commit messages to author the PR body.
- branch submit: Allow Git editor to be a shell command, not just an executable name.
- {downstack, stack} edit: Use Git editor to edit list of branches.
v0.1.0 - 2024-07-22¶
Announcing git-spice, a tool to stack Git branches with ease. This is the first public release of the tool after being in a private beta for several months.
Added¶
- commit amend: Add -a/--all flag to stage changes to tracked files before committing.
- {branch, downstack, upstack, stack} submit: Post a comment to PRs visualizing the stack and the PR's position in it.
Changed¶
- all: Adjust terminology in messaging to refer to Change Requests consistently.
Removed¶
- As promised in release notes for v0.1.0-beta5, drop support for old storage format for branch metadata.
Fixed¶
- branch split: Fix panicking prompt when there are only two commits in the branch.
- branch submit: Fix --draft/--no-draft API failures for existing PRs.
- branch submit: Fix inability to submit if a directory name in root matches the branch name.
- branch delete: Focus on current branch by default even if it's not tracked.
- {upstack, downstack, stack} submit: Drop a few redundant calls to GitHub API.
v0.1.0-rc2 - 2024-07-08¶
Added¶
- Add 'upstack submit' to submit a branch and those above it. Best used after restacking the middle of an already-submitted stack.
- Add 'commit split' command to split the topmost commit into two commits.
- {stack, upstack, downstack} submit: Add --draft/--no-draft flags for changing the reviewability status of a PR.
- {stack, upstack, downstack} submit: Add --no-publish to push stack branches without posting PRs for them.
- branch create: Add -a/--all flag that behaves like 'git add -a'
- auth login: Add support back for logging in with GitHub CLI.
Changed¶
- branch submit: If a submission fails, recover previously-filled metadata automatically in subsequent submit attempts.
- Branch prompt now presents a tree-style view where possible. This includes 'branch checkout', 'branch onto', 'up', and more.
Fixed¶
- branch submit: Improve error message when trying to submit trunk.
v0.1.0-rc1 - 2024-07-02¶
Added¶
- Add 'gs auth login', 'gs auth logout', and 'gs auth status' commands to log in, log out, and check the authentication status. Supports OAuth, GitHub App, and Personal Access Token. Authentication tokens are stored in the system keychain.
Removed¶
- (Breaking) git-spice no longer shells out to the GitHub CLI for authentication. Use the new 'gs auth' command to log in.
v0.1.0-beta6 - 2024-06-28¶
Added¶
- Add 'stack edit' command to edit an entire stack, similarly to 'downstack edit'.
- Add 'branch split' command to split an existing branch with multiple commits into one or more new branches.
Changed¶
- upstack restack: Rename --no-base to --skip-start.
- upstack restack: Target branch name is now a --branch flag.
- downstack submit: Optional positional branch argument is now --branch flag.
- downstack edit: Optional positional branch argument is now a --branch flag.
- branch fold: The optional branch name argument is now a flag.
- branch restack: The optional positional argument is now a --branch flag.
- branch submit: Optional branch positional argument is now the --branch flag.
Fixed¶
- branch submit: If there's a PR template but no commit body, don't add extraneous newlines at the start of the default PR description.
- upstack restack: Fix --no-base ignored when there's only one branch.
- commit {create, amend}: Fix unintended restacking of current branch when there's only one branch in the stack.
- branch onto: Move the upstack of the target branch before the brach itself. This makes the operation better able to recover from conflicts.
v0.1.0-beta5 - 2024-06-17¶
Added¶
- branch create: Add -b/--base flag to specify a different base branch for the new branch.
- branch submit: Add --no-publish to push or update a branch without publishing a pull request.
- upstack restack: Accept name of base branch as an argument. Defaults to current branch.
- upstack restack: Add --no-base flag to skip restacking the starting base branch.
- {up, down, top, bottom}: Add -n/--dry-run flag. This will print the target branch name without checking it out. Output may be piped to other commands.
- branch submit: If a repository has multiple templates, allow picking between them in the submission prompt.
- Add 'gs log long' (alias 'gs ll') to list branches and their commits.
Changed¶
- shell completion: Make shell argument optional and guess shell based on environment.
- Prompts are now posted to stderr instead of stdout.
- branch delete: Prompt to force delete unmerged branches instead of just letting Git fail.
- Format for how PR information is stored was changed. The format will be upgraded automatically when you run
gs branch submit
with this release. Support for the old format will be dropped in the release after this one. - log short: Make branch labels more visually distinct with an icon next to them.
Fixed¶
- Fix name for Linux AMD64 release tarball to match
uname -m
for easier fetching from scripts. - commit {create, amend}: Don't restack the current branch on commit. Only the upstacks will be restacked.
- shell completion: Better handling of quoted strings while predicting.
v0.1.0-beta4 - 2024-06-10¶
Added¶
- repo sync: Detect PRs for local branches created and merged externally.
- Add 'log short' command (alias 'ls') to print the current stack. Use with
--all
to print all tracked branches.
Changed¶
- (Breaking) Rename
completion
toshell completion
. Other shell helpers are expected in the future. - branch submit: Delay fetching PR templates until necessary. This should result in an apparent speed-up in the submission prompt.
- branch submit: Make fewer requests to GitHub for PR templates by caching them locally.
Fixed¶
- branch delete: When prompting for branch selection, select current branch by default.
- {branch, upstack} onto: When prompting for a new base, default to current base.
- Fix bug in state management attempting to write files with empty names to state.
- shell completion: Command aliases can now be completed.
v0.1.0-beta3 - 2024-06-05¶
Added¶
- branch submit: Populate default PR message with PR template, if found.
Changed¶
- branch submit: Update an existing PR's draft status only if
--draft
or--no-draft
flags are provided.
Fixed¶
- branch submit: The --draft flag is no longer ignored. Whether a PR is draft or not will be changed on each submit.
- {downstack, stack} submit: Don't change draft status of existing PRs. Use
branch submit --[no-]draft
to do that. - Fix issue where some operations printed rebase conflict message two or more times.
- rebase {continue, abort}: Heal from external
git rebase --continue
orgit rebase --abort
and avoid running old rebase continuation commands. - branch checkout: Fix trunk branch not showing in branch selection prompt.
v0.1.0-beta2 - 2024-06-01¶
Added¶
- branch rename: Support renaming another branch by name with the
branch rename <old> <new>
form of the command.
Changed¶
- (Breaking) Change shorthand for 'branch delete' to 'bd'.
- (Breaking) Change shorthand for 'branch rename' to 'brn'.
- rebase continue: Don't run continuations if a rebase wasn't in progress. This avoids unexpected behavior from lefotver state.
- branch checkout: Prompt for picking a branch only shows tracked branches by default. Use -u/--untracked to also see untracked branches.
- branch submit: Auto-detect PRs created outside git-spice, e.g. using the GitHub UI.
Fixed¶
- repo sync: Fix failure if the worktree has uncommitted changes.
- branch delete: Don't fail if the repository is in detached HEAD state.
- branch delete: Fix repository left on the wrong branch if upstacks were restacked.
- GitHub URL detection now respects non-standard URLs like GHES set via
$GITHUB_URL
.
v0.1.0-beta1 - 2024-05-28¶
Added¶
- Add
gs rebase continue
(aliasgs rbc
) andgs rebase abort
(aliasgs rba
) to continue git-spice operations interrupted by rebase conflicts. - Add 'upstack onto' command to move a branch and its upstack onto a new base. This was previously the behavior of 'branch onto'.
Changed¶
- branch {edit, onto}: Support continuing the operation after resolving conflicts with
gs rebase continue
. - {branch, upstack, stack} restack: Support continuing the operation after resolving conflicts with
gs rebase continue
. - (Breaking) branch onto: Extract only the commits of the target branch onto the new base. The upstack will be rebased to point to its base. Use 'upstack onto' to graft the entire upstack onto the new base.
- (Breaking) branch delete: Remove commits of the deleted branch from the stack. If you want to keep them around, untrack the branch instead.
- branch delete: In the selection prompt for deleting a branch, default to the current branch.
Fixed¶
- Reduce boilerplate in rebase error messages.
- branch delete: Don't report an empty hash for untracked branches.
v0.1.0-alpha5 - 2024-05-27¶
Added¶
- branch {checkout, delete, onto, rename}: Prompt for branch if not provided.
- branch checkout: Allow opting into tracking after checking out a branch.
Changed¶
- Use more compact UI for terminal widgets.
- branch submit: Replace inline text editor with option to open
$EDITOR
or accept the default. - Selection widgets now support fuzzy filtering. Start typing to filter options.
v0.1.0-alpha4 - 2024-05-24¶
Added¶
- commit create, commit amend: Allow using during an ongoing rebase. During a rebase, these commands will not restack the upstack.
- repo sync: Support running in detached head state.
Changed¶
- Breaking: Change restack alias to 'r', allowing for 'br', 'sr', 'usr', etc.
Fixed¶
- Adjust restacking commit selection to avoid picking up extraneous commits.
- branch submit: Don't truncate PR bodies longer than 400 characters.
- branch edit: Fix not surfacing the editor to the user.
v0.1.0-alpha3 - 2024-05-23¶
Changed¶
- branch delete: Report hash of deleted branch. Use this to recover the deleted branch before the next
git gc
. - Rename 'gs complete' to 'gs completion'.
Fixed¶
- repo sync: Fix deleting merged branches after a manual 'git pull'.
v0.1.0-alpha2 - 2024-05-23¶
Fixed¶
- branch submit: Fix default PR title and body for branches with multiple commits.
- repo sync: Delete remote tracking branches for merged PRs.
v0.1.0-alpha1 - 2024-05-22¶
Initial alpha release.