Releases: stacked-git/stgit
Stacked Git 2.0.0
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. Usegit clone
andstg init
instead.stg mail
is replaced withstg email format
andstg email send
.stg refresh --spill
is replaced with dedicatedstg 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
wrapsgit format-patch
and provides a mechanism to generate patch emails and optional cover letter in mbox format.stg email send
wrapsgit send-email
and allows sending patch emails, either from files generated bystg 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 fromstg refresh
are also available tostg 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
replacesstg 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
, andstg 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
, andcommit
, 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 begit config stgit.alias.st '!git status --short'
. - Commands such as
stg goto
,stg push
, andstg 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
replacesstg 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 orNO_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 withstg series
andstg 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 theimport-compressed
feature.stg import
support for importing from a URL is selectable at compile time using theimport-url
feature. N.B. there is a measurable runtime performance impact of building withimport-url
due to the unconditional, pre-main initialization ofcurl
which affects allstg
commands.stg log
now colorizes output by default. The--color
option orNO_COLOR
environment variable may be used to affect this behavior.stgit.new.verbose
changed tostgit.edit.verbose
and now also affects edit behavior foredit
,refresh
, andsquash
along withnew
.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. Usestg 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 fromstg 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
andstg 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
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 forstg email format
andstg 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
andstg 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
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 tostg email send
. - Added
-p
/--patch
option tostg show
as alternative way to select patch ranges (#216). - Added
-n
/--name
option tostg 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 ofunsafe
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
andstg email send
now use-G
/--git-opts
to pass additional options togit format-patch
andgit send-email
.- Patch name arguments to
stg email format
andstg 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.
Stacked Git 2.0.0-beta.3
This third, and likely last, beta release of StGit 2.0 improves StGit's compatibility with sparse checkouts and further improves the Makefiles which should hopefully help downstream packagers. Several other minor bug fixes are also included in this release.
Added
- Add install targets for
contrib/
directory.
Changed
- Use
git
executable instead oflibgit2
for all status and index operations to improve compatibility with sparse index checkouts (#195). - Show commit hash in
stg version
output when not built from tag. - Use
cargo --locked
consistently in Makefiles. - Use "patch" extension in temp file name when editing a patch with a diff.
- Updated transient dependencies in Cargo.lock.
Fixed
Stacked Git 2.0.0-beta.2
This second beta release of StGit 2.0 improves a couple use cases related to patch spilling (stg pop --spill
and stg spill
) as well as updating and reducing StGit's dependencies.
Changed
- Improved error when push conflicts with untracked files (#193)
- Removed a few transitive dependencies by turning-off features in
bstr
andchrono
. - Update
Cargo.lock
with latest dependencies - Update to
clap
3.2 and only use non-deprecated interfaces
Fixed
- Repair
stg spill
when spilling newly added files and using path limits.
Stacked Git 2.0.0-beta.1
This is the first beta release of Stacked Git 2.0, the Rust reimplementation of StGit.
The main changes from v2.0.0-alpha.2 are man pages and packaging. The Python implementation has been removed from the sources, Makefiles are updated to build and install the Rust implementation, and man pages are now generated from the Rust code. As such, this release is ready for broader consumption by StGit users and downstream packagers.
Removed
- Removed Python implementation of StGit.
Added
- Man page generation in asciidoc format with
stg completion man
. This was needed for feature parity with the Python implementation. - 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
- 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. - Makefile targets are updated such that they are all applicable to the Rust implementation.
- Argument value names are now all lowercase in help and man pages.
- Updated Cargo.lock with latest versions of dependencies.
- Release checklist is updated for Rust implementation.
Fixed
- Minor typo fixes in help strings
- Improved documentation for top-level
stg
options. - Improve error message in edge case of attempting to push a hidden patch by name when there are no unapplied patches.
Stacked Git 2.0.0-alpha.2
This is the second alpha release of StGit 2.0, the Rust reimplementation of StGit.
This release introduces the stg email format
and stg email send
commands, which replace the functionality of the removed stg mail
command from StGit 1.x. Other changes include repaired compatibility with older versions of git and various repairs and improvements to shell completions.
Added
stg email format
wrapsgit format-patch
and provides a mechanism to generate patch emails and optional cover letter in mbox format.stg email send
wrapsgit send-email
and allows sending patch emails, either from files generated bystg email format
or by specifying patches directly.
Changed
- Bash completions for shell aliases now fallback to filename completions (#191).
- Help options listings now ensure --color and --help are shown last.
- Various zsh completion improvments:
- Add descriptions for --color values
- Complete -O/--diff-opts values (using
git diff-tree --git-completion-helper
) - Comprehend
stg -C <dir>
options - Improved/corrected alias expansion
- Improved error messages when completion is attempted outside git repo and/or StGit-initialized branch
- Patch name completions now look and feel like output from
stg series
- Complete patch range syntax ('patch0..patchN') for all relevant commands
- Completion for
stg squash
no longer allows duplicate patch name arguments - Removed completions for removed
stg mail
command - Completion for
stg sink
no longer offers hidden patches - Completion for
stg rename
comprehends second, new patch name argument - Completion for
stg diff --range
now works
Fixed
- Compatibility with git versions prior to 2.35.0 is repaired by avoiding using
git apply --allow-empty
(#192). - Fish completions for -O/--diff-opts are repaired
Stacked Git 2.0.0-alpha.1
This is the first official alpha release of StGit 2.0, the Rust reimplementation of StGit.
The change notes below cover both this alpha.1 release as well as the untagged/unreleased alpha.0.
The biggest change from alpha.0 is the addition of shell completions and the stg completion
support commands. Shell completions were rewritten from the ground-up, but are hopefully at least as capable as those that shipped with StGit 1.x.
[2.0.0-alpha.1] 2022-06-17
Removed
Added
stg series
gains the-i/--commit-id
option to display patches' commit ids.stg series
colorized output is modified. The main change is that patch descriptions are no longer yellow.stg version
now displays copyright and license statements.stg version
gains-s/--short
flag to show shortened version info.- The
stgit.diff-opts
configuration variable is now respected as it was in the Python implementation. 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.
Changed
- The
-O/--diff-opts
flag now allows both multiple space separated opts in one value as well as multiple occurrences of-O/--diff-opts
on the same command line. This behavior is compatible with the Python implementation. stg series
help output splits options into a few sections.- Dependencies are updated to more recent versions in Cargo.lock.
Fixed
stg edit --set-tree
no longer causes the interactive editor to be implicitly invoked.- Repair build for non-Linux unix targets (including MacOS) and Windows targets.
- 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.
- Add missing
-t
short option for--set-tree
forstg edit
. - Add missing
-k
short option for--keep
.
[2.0.0-alpha.0] 2022-05-17
Removed
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.stg clone
is removed (at least for the time being). Usegit clone
andstg init
instead.stg mail
is removed, but will be re-added or replaced prior to the 2.0.0 release.
Added
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 fromstg refresh
are also available tostg new
.stg id
now accepts the-b/--branch
option.stg spill
replacesstg refresh --spill
.
Changed
- 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 begit config stgit.alias.st '!git status --short'
. - The
--ack
and--review
options now optionally take a value. The--ack-by
and--review-by
options are deprecated. - Commands such as
stg goto
,stg push
, andstg 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 indicate similar valid patch names. stg branch
output is now generally less verbose.stg branch --describe
replacesstg 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 orNO_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 withstg series
andstg show
.stg import
now only recognizes compressed patches by their file extension (.bz2
or.gz
) and no longer attempts to decompress usin all known decompressors.stg import
support for compressed input files is selectable at compile time using theimport-compressed
feature.stg import
support for importing from a URL is selectable at compile time using theimport-url
feature.stg log
now colorizes output by default. The--color
option orNO_COLOR
environment variable may be used to affect this behavior.stgit.new.verbose
changed tostgit.edit.verbose
and now affects edit behavior foredit
,refresh
, andsquash
along withnew
.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 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 the--spill
flag. Usestg spill
instead.- Updated colorized output for
stg series
. stg series
now requires patch range arguments to be both in-order and contiguous. Constraining patch ranges in this manner ensures that the output fromstg series
is always a valid/correct view of a subset of the series.stg show
diff can now be limited to certain paths by specifying path limits on the command line.stg show
diff output respects the--color
option.- 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>
. stg squash
now allows the full suite of patch edit options, including-d/--diff
. Previously only a few message-related options were available.
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.
Stacked Git 1.5
Several pesky bugs repaired along with some other minor improvements.
Thanks to everyone who submitted a PR or reported an issue!
Added
- Add Makefile targets for installing shell completions
stg rebase --interactive
learns 'hide' instruction
Changed
- Picked patch names are preserved when possible (#175)
- Replace
--unapplied
option with--noapply
forstg pick
(#174) stg pick --noapply
no longer reverses patch order (#174)- Use
stg version
usessys.executable
to get Python version.
Fixed
- Repair
stg repair
with amended first patch (#163) - Repair corner cases where invalid patchnames could be generated by
stg new
,stg uncommit
, etc. (#176) stg mail
could crash due to a misspelled reference (#178)- Zsh completion for
stg refresh -p
now completes against all patches
(not just applied patches). - Zsh gains missing completion for
stg push --noapply
- Minor repair to help for
stg float --noapply
andstg push --noapply
- Restore
stg sink --nopush
capability.
Stacked Git 1.4
This is mostly a bugfix release with a couple minor features affecting
importing patches from mail and stg commit
no longer committing empty
patches by default.
Removed
- Python 3.5, which became EOL 2020-09-13, support is deprecated and
will be removed in a future StGit release - Python 3.6, which will be EOL 2021-12-23, support is deprecated and
will be removed in a future StGit release
Added
- The new
stg import --message-id
option causes the Message-ID from
imported emails to be included as the Message-Id trailer in the patch
description (#42) - The new 'stgit.import.message-id' config option also enables the
Message-Id trailer (#42)
Changed
stg import
no longer creates "Message-Id" trailer by default when
importing patches from email (#42)- StGit works with Python 3.10
stg version
prints a more abbreviated Python versionstg commit
will no longer commit empty patches by default; the
--allow-empty
option may be used to override this behavior (#158)- The
stgit.main.main()
function now takes an argv parameter and
returns an int return code in most cases instead of calling
sys.exit(), thus making main() a bit easier to use as an API.