Skip to content

Releases: stacked-git/stgit

Stacked Git 2.2.1

29 Mar 15:14
v2.2.1
f990a1d
Compare
Choose a tag to compare

This bugfix release addresses regressions with running StGit in linked worktrees and with hooks not working when running from a subdirectory of the work dir. Several other minor issues are also repaired.

Changed

  • chore: update to clap 4.2.0
  • chore: update to gix 0.43.0
  • chore: pin clap minor version

Fixed

  • fix(branch): allow reuse of partially deleted branch names (#290)
  • fix(branch): branch list alignment
  • fix: running hooks from worktree subdir (#295)
  • fix: running from linked worktree (#297)
  • fix(float): correct -S in usage string
  • fix: correctly show bold command/subcommand in overidden usage

Stacked Git 2.2.0

24 Feb 23:33
v2.2.0
327d1db
Compare
Choose a tag to compare

This release contains several quality of life features, including new options for specifying patches and branches on the command line. And improved performance.

Patch Locator Syntax

In addition to being able to specify patches by name, StGit now supports several new alternatives for specifying patches:

  • By relative offset from the topmost patch, e.g. -1, +3, or ~2.
  • By their absolute index in the stack, e.g. 0 or 12.
  • By offset from another patch, e.g. some-patch~ or some-patch+2.
  • By relative offset from the last visible patch, e.g. ^ or ^2.

The new patch locator syntax is detailed in the stg man page.

New Options for stg series

To complement the new patch locator syntax, new -O/--offsets and -I/--indices options display each patch's relative offset from top and absolute index, respectively.

The new -r/--reverse option allows the stack to be shown top-side up. This may produce a more intuitive view of the stack for some StGit users. Consider adding a stack alias using this option, for example with git config --global stgit.alias.stack 'series -rOP'.

Speaking of aliases, now each of the "Display Options" for stg series have a --no-xxx variant. These can be helpful for masking options used in series aliases. For example, the stack offset suggested above could be run as stg stack --no-offsets to disable display of offsets.

Finally, the --short option now takes an optional integer value to specify the number of patches to show.

Branch Locators

StGit now supports specifying a branch using the same @{-<n>} syntax supported by git. This enables, for example, switching to the previously checked-out branch with stg branch @{-1} or just stg branch - (where - is synonymous with @{-1}).

Command Line Options

The --signoff option now has a short variant -s. This is a breaking change. The --submodules no longer has a -s short option. Similarly, the --series options for stg import, stg float, and stg sync now use -S instead of -s for their short variants.

Gitoxide

StGit now uses Gitoxide (gix crate) instead of libgit2 (git2 crate) as its git access library. In addition to being a pure-Rust dependency, gitoxide has considerably less startup overhead (4x) than git2. This has a big impact on the latency of StGit commands.

Removed

  • feat!: remove short -s option for --submodules
  • fix!: patch name cannot be {base} or @

Added

  • feat: patch locator syntax
  • feat: locate branches using @{-N} syntax
  • feat(series): Add --reverse option
  • feat(series): options for patch offsets and indices
  • feat(series): --no-xxx options to override display options
  • feat(series): optional value for --short
  • feat!: short -s option for --signoff (#245)
  • feat(init): add -b/--branch option

Changed

  • fix!: use -S as short opt for --series
  • feat!: constrain refresh -p to visible patches
  • feat(series)!: empty patch prefix changed to *
  • feat!: spell errors in lowercase
  • refactor: use gitoxide instead of git2
  • refactor: use time crate instead of chrono
  • feat!: update to clap 4.1
  • chore: update to latest dependencies

Fixed

  • fix: Error if author or committer is not configured
  • fix: Use correct base directory for core.hooksPaths
  • fix(rename): colliding patch names
  • fix(rebase): repair rebasing to a tag (#265)
  • fix(branch): switch branch with detached head
  • docs: Repair docstrings being confused as html
  • docs: normalized spelling for --branch value

Stacked Git 2.1.0

12 Dec 16:42
v2.1.0
35a9822
Compare
Choose a tag to compare

This minor release introduces several long-awaited features, including some potentially breaking changes.

The main breaking feature is relaxed stack initialization. Instead of needing to explicitly initialize a StGit stack on a branch, patch creating commands such as stg new and stg import will automatically initialize the stack, if needed. Most other commands that previously required an initialized stack will now operate as if there is an empty stack if the stack is not yet initialized.

Another potentially breaking change is that the stgit.gpgsign configuration variable is now independent of commit.gpgsign. I.e. to have signed stack metadata commits, stgit.gpgsign must be set to true.

Added

  • feat: Configurable push conflict policy (#60)
  • feat: Add --committer-date-is-author-date option (#47)
  • feat(import): Add --3way option (#36)
  • feat(import): Add --directory option (#36)

Changed

  • feat!: Relaxed stack initialization (#238)
  • feat!: Only sign stack based on stgit.gpgsign (#238)
  • fix!: Allow "---" separator in messages (#243)
  • feat: More descriptive push conflict message (#60)
  • feat: Avoid post-edit commits when no change
  • chore: Update dependencies to latest versions

Fixed

  • fix: Improved error message for uninitialized stack
  • fix: Improve error for re-initialization attempt
  • fix(prev): Different error message for empty stack
  • fix: Accept full ref name for branches
  • fix(zsh): Complete --edit and --diff for stg new

Stacked Git 2.0.4

30 Nov 16:14
v2.0.4
23c865d
Compare
Choose a tag to compare

This release makes some repairs to aliases, including documenting aliases along with all other StGit configuration variables.

Changed

  • docs: Document configuration variables
  • refactor: Use is-terminal instead of atty
  • chore: Update Cargo.lock with latest dependencies.

Fixed

  • fix: Don't generate new patch name until after edit (#239)
  • fix: Run shell aliases from top-level of work tree
  • fix: Use GIT_PREFIX in built-in aliases

Stacked Git 2.0.3

21 Nov 05:29
v2.0.3
ad1c46c
Compare
Choose a tag to compare

This release includes a few minor bug fixes and lots of spelling corrections.

Changed

  • chore: Update Cargo.lock with latest dependencies.

Fixed

  • fix: improved git version parsing on MacOS
  • fix: StGit-specific branch config handling
  • docs: fixed many typos

Stacked Git 2.0.2

17 Nov 17:04
v2.0.2
7c0fb79
Compare
Choose a tag to compare

This release further improves support for sparse checkout with partial clone and worktrees. A few documentation improvements are also included.

Changed

  • chore: Update Cargo.lock with latest dependencies.
  • docs(init): Add long help for stg init (#233).

Added

  • feat: Enable basic support for extensions.worktreeconfig to unblock sparse checkout with partial clone (#195).

Fixed

  • docs: More inter-command links
  • docs: Normalize quoting

Stacked Git 2.0.1

08 Nov 03:55
v2.0.1
d9e2ce9
Compare
Choose a tag to compare

This bugfix release addresses pathological documentation build performance issues that should improve the downstream packaging experience.

Changed

  • chore: Update to clap 4.0.22

Fixed

  • docs(readme): Clarify static versus dynamic linking (#230)
  • build: Improve Documentation build performance (#229)

Stacked Git 2.0.0

06 Nov 14:00
v2.0.0
a32891b
Compare
Choose a tag to compare

This major release of StGit brings improved performance, several new features, and many refinements compared to StGit 1.x. It is recommended that all StGit users upgrade to 2.0.0.

Many thanks to all the StGit users who took the time and effort to try out the many alpha, beta, and release candidate releases leading up to this final 2.0.0 release. Lots of issues, big and small, were worked out from this effort to make this a high-confidence release.

Removed

  • stg clone is removed. Use git clone and stg init instead.
  • stg mail is replaced with stg email format and stg email send.
  • stg refresh --spill is replaced with dedicated stg spill command.
  • stg edit no longer accepts -O/--diff-opts. Custom diff options is in conflict with editable diffs since many (most?) diff options cause the diff to no long be applicable.
  • stg files no longer accepts -O/--diff-opts. This option was of marginal value since it only had a possible side effect when --stat was being used.

Added

  • stg id now accepts the -b/--branch option.
  • stg completion command provides runtime support for shell completions.
  • stg completion bash generates bash shell completion script.
  • stg completion fish generates fish shell completion script.
  • stg completion zsh outputs zsh shell completion script.
  • stg completion list shows StGit commands and aliases and is used at completion-time by shell completion scripts.
  • stg completion man generates man pages in asciidoc format.
  • stg email format wraps git format-patch and provides a mechanism to generate patch emails and optional cover letter in mbox format.
  • stg email send wraps git send-email and allows sending patch emails, either from files generated by stg email format or by specifying patches directly.
  • stg new --refresh allows a new patch to be refreshed with changes in one step. The -i/--index, -F/--force, -s/--submodules, and --no-submodules options from stg refresh are also available to stg new when using -r/--refresh.
  • stg series gains the -i/--commit-id option to display patches' commit ids.
  • stg show diff output can now be limited to certain paths by specifying path limits on the command line.
  • stg spill replaces stg refresh --spill.
  • stg version gains -s/--short flag to show shortened version info.
  • Added documentation for patch range syntax to stg(1) man page.
  • Added install-all target to top-level Makefile that installs the executable, man pages, html pages, and shell completions.

Changed

  • StGit is now implemented entirely in Rust instead of Python.
  • StGit is generally much faster; many commands are up to 4x faster. There was an emphasis on making informational commands such as stg id, stg series, and stg top as fast as possible to make their use in interactive contexts (shell prompts, IDE extensions) more comfortable.
  • StGit error messages have been updated; many have different, and hopefully better, wording. Error messages are also use color (when color is enabled). Scripts relying on exact error messages from StGit will need to be updated.
  • StGit output to stdout is generally more terse. Commands that change the stack such as push, pop, and commit, use sigils to denote the changes made to the stack. E.g. stg commit p0..p3 will output $ p0..p3 where the "$" sigil means that a patch, or patch range, has been committed. These are all the currently used stack change sigils:
    • + patch was pushed
    • - patch was popped
    • > patch became the current topmost patch
    • & patch was updated
    • $ patch was committed
    • # patch was deleted
    • @ patch was rolled-back
    • ! patch was hidden
  • StGit aliases are now more like Git aliases. Normal aliases refer to StGit subcommands, but aliases prefixed with '!' are shell aliases that may run arbitrary commands. An example normal alias would be git config stgit.alias.list 'series --description --empty'. An example shell alias would be git config stgit.alias.st '!git status --short'.
  • Commands such as stg goto, stg push, and stg pop now require full/correct patch names on the command line and no longer accept unambiguous patch name prefixes. When an inexact patch name is provided on the command line, the error message will now suggest similar valid patch names.
  • Additional template search paths were added. In addition to looking for template files in .git/, also look in $XDG_CONFIG_HOME/stgit/templates/ and $HOME/.stgit/templates. This search strategy is consistent with how git looks for the global config file.
  • The new --signoff patch edit option supercedes the deprecated --sign and --sign-by options. --signoff without its optional value does the same thing as --sign, while --signoff=<value> does the same thing as --sign-by=<value>.
  • The --ack and --review patch edit options now optionally take a value. The --ack-by and --review-by options are deprecated.
  • stg branch output is now generally less verbose.
  • stg branch --describe replaces stg branch --description. The --description subcommand remains supported as a hidden alias to --describe, but the description string must now be provided as its own argument; i.e. --description="description string" is no longer supported.
  • stg branch --list now produces colorized output. The --color option or NO_COLOR environment variable may be used to affect this behavior.
  • stg branch --rename now supports renaming regular git branches in addition to StGit-enabled branches.
  • stg clean now uses -A and -U short options for --applied and --unapplied instead of -a and -u. This is done for consistency with stg series and stg show.
  • stg import now only recognizes compressed patches by their file extension (.bz2 or .gz) and no longer proactively attempts to decompress using all known decompressors.
  • stg import support for compressed input files is selectable at compile time using the import-compressed feature.
  • stg import support for importing from a URL is selectable at compile time using the import-url feature. N.B. there is a measurable runtime performance impact of building with import-url due to the unconditional, pre-main initialization of curl which affects all stg commands.
  • stg log now colorizes output by default. The --color option or NO_COLOR environment variable may be used to affect this behavior.
  • stgit.new.verbose changed to stgit.edit.verbose and now also affects edit behavior for edit, refresh, and squash along with new.
  • stg new now accepts -e/--edit and -d/--diff instead of -v/--verbose
  • stg pick now allows a mix of commits and patches to be picked whereas previously only a single commit xor multiple patches could be picked.
  • stg pick now performs a single stack transaction for all the picked patches/commits instead of one transaction per pick.
  • stg push now attempts to perform three-way merges, which may improve conflict resolution in some cases. This feature is enabled by default when git >= 2.32.0 is detected.
  • stg rebase --interactive the "squash" and "fixup" instructions may no longer be applied to the first patch in the instruction list. The stated semantics of both "squash" and "fixup" is that they squash the labeled patch with the preceding patch, which is not possible/valid when there is no preceding patch.
  • stg refresh no longer has a --spill flag. Use stg spill instead.
  • stg series has updated colorized output.
  • stg series now requires patch range arguments to be both in-order and contiguous. Constraining patch ranges in this manner ensures that the output from stg series is always a valid/correct view of a subset of the series.
  • stg show diff output respects the --color option.
  • stg squash now allows the full suite of patch edit options, including -d/--diff. Previously only a few message-related options were available.
  • stg version now displays copyright and license statements.

Fixed

  • stg branch --create inherits the current branch's remote branch configuration, if available. The Python implementation had an apparent bug that prevented inheriting the remote branch configuration when creating from the current branch.
  • Avoid case insensitive patch name collisions. On operating systems with case-insensitive paths, patch names that only differ by case lead to patch reference collisions. StGit now ensures that patch names are distinct under case insensitive comparisions.
  • stg pull and stg rebase record updated stack state instead of deferring until the next stack-modifying command to do so.

Changed since 2.0.0-rc.2

Changed

  • chore: Update Cargo.lock

Fixed

  • fix(zsh): Repair broken completion of --git-opt
  • fix(zsh): Add missing stg email send --branch
  • fix(email): Send using --branch option
  • fix: Avoid duplicate signoff with stgit.autosign
  • fix: Do not use 3way for merged checks

Stacked Git 2.0.0-rc.2

24 Oct 03:56
v2.0.0-rc.2
1a46d8a
Compare
Choose a tag to compare
Pre-release

This second 2.0 release candidate repairs several bugs and refines how git options are passed-through in stg diff, stg show, and stg email commands.

Changed

  • The --diff-opts option is renamed to --diff-opt. --diff-opts remains available as an alias.
  • The --diff-opt option no longer allows multiple git options per occurrence. This allows git diff options with spaces in their values.
  • The --git-opts option for stg email format and stg email send is renamed --git-opt.
  • The --git-opt option no longer allows multiple git options per occurrence. This allows git options with spaces in their values.
  • Zsh completion for --diff-opt and --git-opt leverage the full-featured git completion capability.

Fixed

  • Repair check for modifications to stack by external tools.
  • stg pull and stg rebase record updated stack state instead of deferring until the next stack-modifying command to do so.
  • Improve patch appliction with git apply --3way when pushing` (#225)
  • Zsh completion for --diff-opt accommodates multiple occurrences

Stacked Git 2.0.0-rc.1

30 Sep 17:39
v2.0.0-rc.1
Compare
Choose a tag to compare
Pre-release

This first 2.0 release candidate brings a new look to the online help thanks to updating to clap 4.0. Further compatibility improvements with sparse checkouts and multiple worktrees comes from the update to git2 0.15.0. And several changes were made to support patch names starting with '-'.

Added

  • Added --annotate flag to stg email send.
  • Added -p/--patch option to stg show as alternative way to select patch ranges (#216).
  • Added -n/--name option to stg new as alternative way to specify new patch name (#216).

Changed

  • Update git2 to 0.15.0, which may further help compatibility with sparse checkouts and multiple worktrees (#195).
  • Update to clap 4.0, which changes the help formatting and coloring.
  • Update other dependencies to latest versions in Cargo.lock.
  • No longer depend on lazy_static crate.
  • Use std::thread::scope instead of custom mechanism. This brings the total number of uses of unsafe in StGit to zero.
  • Minimum rustc requirement is set to 1.63.0.
  • The '$' sigil used for committed patches is now yellow instead of white.
  • Patch names beginning with a hyphen '-' may be disambiguated from command line options by escaping the leading '-' with a backslash.
  • stg email format and stg email send now use -G/--git-opts to pass additional options to git format-patch and git send-email.
  • Patch name arguments to stg email format and stg email-send can now be placed after a -- separator (#216).
  • Update top-level usage help for stg.

Fixed

  • Various errors that may occur when executing a stack transaction are now handled more robustly such that the changes from the transaction are rolled-back so that the stack, repository, and worktree are all in a consistent state (#205).
  • The stg uncommit -h usage indentation is repaired.
  • The stg float usage now shows the two distinct usage modes.
  • stg squash --name allows patch names with leading '-'.
  • stg diff --range allows patch names and ranges with leading '-'.
  • Fix some pre-indented paragraphs in help/about strings.
  • Zsh completion for stg edit incorrectly included -O/--diff-opts.
  • Zsh completion for stg files incorrectly included -O/--diff-opts.