Releases: abhinav/git-spice
Releases · abhinav/git-spice
v0.16.1
v0.16.0
This release contains a number of improvements.
Full list available below, but a couple highlights:
- Custom shorthands now support shelling out to external commands by prefixing them with
!
--similarly to Git aliases. - A number of fixes have been made to make git-spice commands play nicer with Git worktrees.
submit
commands now support a--label
flag and configuration option that adds labels to GitHub Pull Requests and GitLab Merge Requests upon submission.submit
commands can now be configured to open a web browser only for newly created CRs. Usegit config --global spice.submit.web create
to opt into this behavior.
Added
- Add support for custom shorthands to invoke external shell commands.
- submit: Add -l/--label flag and accompanying 'spice.submit.label' configuration option to add labels to created/updated CRs.
- stack delete: New command to delete all branches in the current branch's stack.
- upstack delete: New command to delete all branches upstack from the current branch, not including the current branch.
- repo restack: New command to restack all tracked branches.
- submit: Add 'spice.submit.draft' configuration option to control the default value of --draft/--no-draft for new CRs.
- checkout: Add 'spice.checkout.verbose' configuration option to report the branch name checked out. This works for
up
,down
,top
, andbottom
commands too. - submit: Add 'spice.submit.navigationCommentSync' configuration option to control which branches' navigation comments are updated when a change is submitted.
- stack restack: Add --branch option to restack the stack of a different branch.
- branch squash: Add --branch option to specify the branch being targeted.
- branch squash: Add --no-edit flag to use generated commit message without opening an editor.
Changed
- submit: Support a value of 'created' for the --web flag and the 'spice.submit.web' configuration option. This will result in only new CRs being opened in a browser.
- branch fold: Confirm user intent when called from a branch based directly on the trunk branch. This prevents accidentally folding changes into trunk.
- repo init: Warn when trunk is behind upstream at initialization time. This prevents issues caused by trying to rebase newer feature branches on top of a severely old trunk branch.
- branch squash: Use a commit message template similar to Git. Information from git-spice is commented out and commit messages are presented in oldest-to-newest order.
Fixed
- repo init: Validate that the trunk branch is a local branch.
- repo sync: Don't fail if a merged branch is checked out in another worktree. Log a message and skip it.
- branch delete: Don't fail if the branch to check out after deletion is checked out in another worktree. Log a message and detach HEAD.
- restack: If a branch planned to be restacked is checked out in another worktree, don't attempt to restack it or its upstacks.
- log long: Fix incorrect list of commits listed in the log following a manual rebase operation.
- branch squash: Fix no-op commit left behind in some scenarios when 'branch squash' is run after a manual rebase.
- Fix concurrent updates to git-spice's state causing "cannot lock ref" warnings.
- up: Don't re-load state repeatedly when going up >1 branches. This is >8x faster in degenerate cases.
- stack restack: Don't reload state information to determine upstack/downstack branches.
v0.15.2
Fixed
- submit: Pre-push hooks should run in the same worktree as the submit command.
v0.15.1
Fixed
- Fix several operations using the incorrect Git worktree when invoked from the non-primary worktree.
v0.15.0
Added
- log short: Add
spice.logShort.crFormat
configuration option. This takes precedence overspice.log.crFormat
forgs log short
/gs ls
. - log long: Add
spice.logLong.crFormat
configuration option. This takes precedence overspice.log.crFormat
forgs log long
/gs ll
. - submit: Add --no-verify flag to bypass pre-push hooks.
Changed
- repo sync: If a CR is closed without being merged, sync will now offer to delete their branches as well.
- branch create: Reject untracked base branches sooner in the process. This prevents unnecessary work, such as writing a commit message only to have the operation fail later.
- commit amend: Confirm user intent when called from the trunk branch, providing an option to create a new branch instead. This prevents accidental changes to the trunk branch.
- commit amend: Confirm user intent when called during a rebase operation with unresolved conflicts. This prevents accidental amendments that could complicate the rebase process.
Fixed
- branch submit: If a GitHub PR cannot be submitted because the base branch hasn't been pushed, present a more friendly error message.
- GitLab: CLI authentication now recognizes the new token format (
glab-XXXX
). - Rebase operations now detect conflicts caused by autostashed dirty changes to prevent corrupted state.
v0.14.1
Fixed
- Fix panic when using shell tab completion for a branch name.
v0.14.0
Added
- branch checkout: Add 'spice.branchCheckout.trackUntrackedPrompt' configuration option to disable prompting to track untracked branches upon checkout.
- branch create: Add 'spice.branchCreate.prefix' configuration option to always add a configured prefix to new branches.
- Add more debug-level logging across the application to help diagnose issues.
- Support CTRL+j/k to navigate selection UIs that accept text input like branch selection.
Changed
- Log output is now styled differently for better readability.
Fixed
- branch split: Fix debug logs interrupting the branch name prompt.
- branch track: Fix incorrectly reporting an error when a branch needs to be restacked.
- If a remote branch reference (e.g. origin/feature) is deleted after pushing to it with gs, we will no longer hold onto the stale reference.
This better handles cases where the local and remote branches are both intended to be renamed.
v0.13.0
Added
- log: Add
spice.log.crFormat = ("id" | "url")
configuration to change how CRs are listed in the log output. The default is "id". - GitLab: Allow changing the API URL with the
spice.forge.gitlab.apiUrl
configuration option or theGITLAB_API_URL
environment variable. - log: Add
spice.log.pushStatusFormat = (true | false | aheadBehind)
to show whether a branch is out-of-sync with its remote, and optionally, by how many commits. Defaults totrue
. - repo sync: Update the trunk branch even if it's checked out in another worktree.
- commit {create, amend}: Add --allow-empty flag to allow commits without any changes.
Changed
- log: Fetch branch information in parallel to speed up the operation.
v0.12.0
Added
- Add 'version' command as alternative to '--version' flag.
Fixed
- gitlab: Fix rejection of
GITLAB_TOKEN
environment variable for authentication.
v0.11.0
Added
- Add 'branch squash' command to squash commits in a branch into a single commit and restack upstack branches.
- Add 'spice.branchPrompt.sort' configuration option to control the sort order of branches in the branch selection prompt used by 'branch checkout', 'branch onto', 'branch delete', and others.
- branch rename: Provide shell completions for the current branch.
Changed
- Homebrew tap: Install shell completions.
- upstack onto: When prompting for a new base, do not allow selecting branches that are being moved as the operation will always be rejected to keep the graph acyclic.
Fixed
- branch onto: Fix infinite rebase conflict handling loop that occurred when a branch is moved onto another branch that is upstack from the original base, and the operation encounters a rebase conflict.
- Fix debug logs using incorrect prefix for Git command output logs.