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 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 supersedes 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 allstg 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 comparisons.
stg pull and stg rebase record updated stack state instead of
deferring until the next stack-modifying command to do so.
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.
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.
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.
Changed
Bash completions for shell aliases now fallback to filename
completions (#191).
Help options listings now ensure –color and –help are shown last.
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 comparisons.
Add missing -t short option for --set-tree for stg edit.
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). Use git clone
and stg 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 from stg refresh are also available to
stg new.
stg id now accepts the -b/--branch option.
stg spill replaces stg 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 be git 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, 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 indicate
similar valid patch names.
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 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.
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 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 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. Use stg 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 from stg 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 supersedes 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.
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 version
stg 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.
Fixed
Repair stack upgrade with stg branch --list (#155)
Repair crash in stg squash with out of order patches and no name
specified (#157)
Zsh completions learn stg float --noapply option
Zsh completion for stg sink now allows multiple patches
stg new learns --verbose, which includes a diff in the editor
window (similar to git commit --verbose). This behavior is also
configurable with the stgit.new.verbose configuration option
stg push and stg float learn --noapply option; allows patches
to be reordered without updating worktree and deferring merge conflict
resolution (#144)
stg edit, stg refresh, and stg new learn the --sign-by,
--ack-by, and --review-by options which allow those respective
trailers’ values to be specified by the user on the command line (#92)
Changed
Stack metadata version 5; stack metadata is moved from
refs/heads/<branch>.stgit to refs/stacks/<branch> and the stack
metadata file now uses a JSON format instead of the prior custom
format; the stack metadata will be upgraded to v5 on first use of
this version of StGit; like all stack metadata upgrades, this is a
one-way auto-upgrade for existing stacks (#65)
Use setuptools instead of distutils for packaging
No git or python version checks in setup.py
Use different dynamic versioning system
Install stg executable as console_script entry point
More sophisticated search for bash.exe on Windows when running hooks
The editor window text for stg squash has been modified to mirror
git’s behavior – the squash edit message now includes all commits
(#71)
Binary diffs are no longer shown when with stg edit -d
Multiple trailers can now be added at once; this is now allowed, for
example: stg edit --sign --review --ack
Update zsh completion for stg rebase to show local and remote heads
(#102)
Zsh completions for commands with patch arguments now comprehend the
effect of -b/--branch and -B/--ref-branch
Zsh completions now guard patch names–one less TAB press to complete
patch names in certain contexts
stg import now extracts the Message-ID email header into the patch
message (#42)
Fixed
Repair crash when attempting to export empty patch (#112)
Stack metadata format 4. All metadata now kept in Git objects; no more
stack state files in .git/patches. A one-way auto-upgrade to format
version 4 will occur when StGit commands are run on an existing StGit
branch.
Use python3 in shebangs instead of python
contrib/stgbashprompt.sh is no longer executable
Internal docstrings now use reStructuredText instead of Epytext
Fixed
Importing large patches is much, much faster (#66)
Other performance improvements when dealing with large patches
stg publish --overwrite allows branch to be overwritten instead of
creating new commits.
stg log --clear deletes the stack’s log history. Use with caution.
Fish shell completions for stg.
Zsh completions for stg.
stg mail --domain option overrides the host’s domain in the message
ID.
Changed
Branch protection metadata now captured in config instead of
.git/patches/protect file. This updates stgit’s metadata
format from v2 to v3.
stg diff no longer shows binary diffs by default. Use -O--binary
or add --binary to stgit.diff-opts in config.
Diagnostic output is now routed to stderr instead of stdout.
Diagnostic output is also now sent to stderr unconditionally, i.e. no
more isatty() test (#35).
Converted to “new” lib infrastructure: show, patches, diff,
pick, pull, rebase, and fold.
Fixed
stg show detects conflicting –applied and –unapplied options.
stg show --stat now shows commit headers.
stg patches --diff now shows proper diff instead of b'...' repr of
diff.
stg diff --range detects some invalid values (e.g. -r ..).
Date parsing is now more portable, only use platform specific date
as last parsing option. Affects, e.g., stg refresh --authdate.
Repaired search path for templates to avoid looking in Python
site-packages directory.
Ensure stdout and stderr are flushed. Rarely affected stg diff.
stg repair will now fail if extra command line arguments are
provided.
Bash completions are now generated in a reproducible manner.
stg edit --diff on an empty patch no longer crashes.
stg pick no longer fails when picked commit has empty message (#39).
stg rebase no longer crashes when there are conflicts (#34).
stg pick no longer crashes if –name is not provided when picking a
regular commit object.
Improved test coverage for: branch, diff, pick, sync,
New tests for: files, patches, fold, series
Portable use of iconv, sort, and sed in tests.
Linting using flake8 and isort.
All Python code now conforms to PEP-8.
Updated test infrastructure from git 2.20.
Parallel tests with coverage (make -j4 coverage) now works.
Documentation build is not included in code coverage.
Repaired log end messages when using STGIT_SUBPROCESS_LOG=debug.
Renamed “dunder” instance attributes to improve debugging.
Fail faster when patch name has slash (’/’) (#24).
The commands “stg add”, “stg rm”, “stg cp”, and “stg resolved” were
removed, since there are corresponding Git equivalents.
Added
New core infrastructure for repository operations, including:
Infinite undo/redo operations and corresponding commands.
Automatic rollback of changes following a failed operation (using
transactions)—this ensures that StGit commands either succeed or
do nothing. Previously, every commands had its own ad hoc
implementation of this.
Some commands were added, including
stg squash, for combining two or more patches into one.
stg publish, for maintaining merge-friendly branches (which are
not rebased).
stg prev/next for printing the name of the previous or next patch
in the series.
The stg import and stg fold commands support the -p N option for
stripping leading slashes from diff paths.
The stg import and stg fold commands support the --reject option
for leaving rejected hunks in corresponding *.rej files.
New patch identification syntax: <branch>:<patch> (see documentation
for the “stg id” command).
Autosigning of imported patches when sign.autosign configuration
option is set.
A powerful Emacs mode for StGit was added to the “contrib” directory.
It displays the patch stack in an Emacs buffer, and can handle all
common StGit tasks.
Man pages and an improved tutorial.
Changed
Improved bash tab-completion, automatically generated from the stg
command definitions.