Skip to content

1.6.4

Choose a tag to compare

@BHFock BHFock released this 20 Nov 19:41
· 132 commits to main since this release
0b4cafe

This release makes git-cl more robust when stashes or metadata are changed outside git-cl, and when its metadata files are damaged.

Fixed

  • The wrong stash could be unstashed. git-cl found a stash by the changelist name only. If an older stash of an earlier changelist with the same name was still in git stash list, git cl unstash could apply those old changes. Stashes are now found by their full message. This affects all earlier versions.
  • Damaged metadata files are no longer overwritten. If .git/cl.json or .git/cl-stashes.json was damaged, for example after editing it by hand, git-cl carried on with empty data, and the next command overwrote the file. All changelists or stash records were lost. git-cl now stops, explains the problem and how to recover, and leaves the file as it is. Wrongly shaped files no longer cause Python tracebacks.
  • Stashes dropped outside git-cl can be cleaned up. If you popped or dropped a git-cl stash with plain git stash, its record stayed behind, and its files could not be added to any changelist. git cl prune now removes such records and shows how to group the files again. git cl unstash and git cl add point to it.
  • Unstash conflicts are handled like git stash pop. If unstashing stops with conflicts, git-cl lists the conflicted files, restores the changelist and keeps the stash until you drop it. Previously it showed the wrong hint, and a second unstash could apply the changes again.
  • A stashed changelist's name can no longer be reused. git cl add created an active changelist with the name of a stashed one, which then blocked git cl unstash.

⚠️ Behaviour change

  • If .git/cl.json or .git/cl-stashes.json is damaged, every git-cl command now exits with code 1, including read-only ones such as git cl status. Repair the file, or move it aside as the error message suggests. An empty file still counts as no data.
  • git cl prune now also removes records of stashed changelists whose Git stash no longer exists. They count as stale entries for --dry-run and --exit-code, so a post-commit hook running git cl prune --quiet removes them as well.
  • git cl add <name> fails with exit code 1 if <name> is a stashed changelist.

Other changes

  • git cl help shows the version number.
  • Clearer messages: stashing a changelist that is already stashed, the [XX] warning for files that no longer exist, and conflict hints that no longer suggest git merge --abort when no merge is in progress.
  • git cl status | head and similar commands no longer end with a BrokenPipeError traceback.
  • New tutorial FAQ entry on damaged metadata files; design notes and tutorial updated.

Pull requests

  • Stop on damaged metadata files instead of overwriting them by @BHFock in #77
  • Remove records of stashes dropped outside git-cl in prune by @BHFock in #78
  • Improve stash consistency and error messages by @BHFock in #79
  • Print version number in help by @BHFock in #80

Full Changelog: 1.6.3...1.6.4