0.2.0
Highlights
New configuration format
The git-z.toml format has been updated to version 0.2 to provide a much better configurability. It is now possible to:
- allow scopes to be arbitrary, instead of a list;
- allow the ticket reference to be optional, or even not asked for;
After updating git-z, to update your git-z.toml to the new configuration format, you can run:
git z update
git-z 0.2.0 is still compatible with previous configurations, keeping their semantics. However, previous version of git-z cannot run with a configuration version 0.2.
Working in any repository
The default configuration without a git-z.toml has been updated to be much more sensible. You can then run git z commit without a configuration file and still get something usable.
In addition, a new git z init command has been added to create a git-z.toml in the current repository.
Added
- [
git z init] Add a command to create agit-z.tomlin the current repository. - [
git z update] Add a command to update the configuration file without loosing comments and formatting. - [Config] Add a
ticket.requiredfield: when set totrue, the ticket is required as in previous versions. When set tofalse, the ticket is still asked for but optional.
Changed
- BREAKING [Config] Update the configuration format to allow for more options.
- BREAKING [Config] Make the
ticketkey optional: when the ticket configuration is not present, no ticket will be asked for. - BREAKING [Config] Allow scopes to be arbitrary.
- BREAKING [CLI] Print errors, warnings and hints on
stderr. - [Config] Make the default configuration more sensible. It now has much more built-in types, accepts an optional arbitrary scope, and no ticket.
- [CLI] Print better messages for many usage errors.
- [CLI] Do not print an error on cancelled / interrupted operations.
- [
git z commit] Do not print an error ongit commitfailure. - [
git z commit] Check the commit template early and pretty-print any error mesasge. - [
git z commit] Consider#as a special ticket prefix: when matching in the branch name,#is omitted from the match so that branches likefeature/23-nameare valid, and#is then added to the matching ticket number. In this example it would extract#23as ticket number from the branch name. - [
git z commit] Enhance a bit the error message when failing to build a regex from the list of prefixes. - [Cargo] Exclude unneeded files from the package.
- [Cargo] Update the dependencies.
- [Rust] Update from 1.74.0 to 1.74.1.
Fixed
- [Config] Check the version before trying to parse using the latest configuration format. Previously, the configuration was parsed, then its
versionfield was checked. This led to parsing errors instead of reporting an out of date configuration.