Rationale
While git-z is currently designed as a Git extension, the features it aims to provide—commit message helper and linter, workflow management, communication with forges and project management systems—are not inherently specific to Git. Other VCSs such as Jujutsu, Mercurial or Pijul could benefit from it.
Furthermore, I am myself now using Jujutsu as my daily VCS, even for maintaining git-z. #56 introduced rudimentary support for describing commits with Jujutsu in Git-colocated repositories, but effectively using it requires a bit of setup with a shell function like:
jj-z-describe() {
# First, get the closest bookmarks on top of which we are working.
local bookmarks="$(
jj log --no-graph -r 'heads(::@ & bookmarks())' -T 'self.bookmarks()'
)"
# Then, call `git z commit` with the `--topic` and `--command` options. Note
# that we are piping the message through `sed` to change any `#` Git comment
# marker to `JJ:`.
git z commit \
--topic "$bookmarks" \
--command "sh -c \"\
echo -n '\$message' \
| sed 's/^#\(.*\)/JJ:\1/' \
| jj describe $@ --edit --stdin\" \
"
}
Also, as git-z expects to be in a Git repository, this works only in colocated mode, and would not work with other VCS such as Mercurial or Pijul.
Concept
Rename git-z and make it a standalone command, with VCS-specific subcommands.
For the example, let’s say it would be named tool. Then, instead of git z commit, one would write tool git commit. But this would also open the door to tool jj commit and tool jj describe for instance.
Rationale
While
git-zis currently designed as a Git extension, the features it aims to provide—commit message helper and linter, workflow management, communication with forges and project management systems—are not inherently specific to Git. Other VCSs such as Jujutsu, Mercurial or Pijul could benefit from it.Furthermore, I am myself now using Jujutsu as my daily VCS, even for maintaining
git-z. #56 introduced rudimentary support for describing commits with Jujutsu in Git-colocated repositories, but effectively using it requires a bit of setup with a shell function like:Also, as
git-zexpects to be in a Git repository, this works only in colocated mode, and would not work with other VCS such as Mercurial or Pijul.Concept
Rename
git-zand make it a standalone command, with VCS-specific subcommands.For the example, let’s say it would be named
tool. Then, instead ofgit z commit, one would writetool git commit. But this would also open the door totool jj commitandtool jj describefor instance.