Skip to content

1.8.0

Choose a tag to compare

@BHFock BHFock released this 28 Nov 20:25
· 57 commits to main since this release
741a471

This release adds tab completion for bash and completes a review of git-cl's user experience: shorter output for stash and unstash, clearer messages when a command refuses, and hints that name the changelists and files involved instead of placeholders.

Fixed

  • git cl branch: when not every changelist could be stashed, the message explained Git's index first and then gave generic commands (git cl unstage <changelist>, git cl rm <files>). Its "Then retry" line also repeated the changelist name as the branch name. It now lists the files with their status, gives the commands for them, and ends with the command that was typed.
  • git cl status <name> silently ignored a name that is not an active changelist, so a typing mistake or a stashed name looked like "no changes". It now warns on stderr; the exit code stays 0.
  • No colour when TERM is dumb, as in the Emacs shell, which showed the colour codes as text.
  • Unstashing onto another branch with uncommitted changes, for example right after git cl branch, was refused with "The branch workflow works best with a clean working directory". The message now says that it is a refusal, why, and how to unstash anyway.

Other changes

  • New: tab completion for bash in contrib/completion/git-cl.bash. It completes commands, options, changelist names (stashed ones for unstash) and branch names after --from. See "Optional: Tab completion in bash" in the tutorial. The file is taken from main and is not part of the PyPI package.
  • git cl stash prints the same short summary as git cl unstash (Stashed changelist 'one' from branch 'main' (2 files): and the files). stash --all and unstash --all print one summary per changelist, and an error line only if not all could be stashed or unstashed.
  • git cl add shows the files as in the shell (a.txt 'b c.txt') instead of a Python list, and says when a file was moved from another changelist.
  • git cl status in a repository without changelists and without changes says so instead of printing nothing.
  • git cl stash no longer suggests plain git stash --staged, but git cl unstage <name> or git cl rm <files>. The hint on untracked files names them (git add n.txt).
  • Tutorial: new FAQ on getting the other changelists back after git cl branch, and notes on git cl diff showing only unstaged changes by default and on filtering git cl status.
  • The demo GIF in the README shows the new add output.

Pull requests

  • Shorten the stash output and explain the unstash refusal on another branch by @BHFock in #101
  • Add bash completion for git cl by @BHFock in #102
  • Tidy up the status and add output by @BHFock in #103
  • Name the changelists and files in hints instead of placeholders by @BHFock in #104

Full Changelog: 1.7.6...1.8.0