Repository navigation
1.6.4
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 unstashcould 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.jsonor.git/cl-stashes.jsonwas 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 prunenow removes such records and shows how to group the files again.git cl unstashandgit cl addpoint 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 addcreated an active changelist with the name of a stashed one, which then blockedgit cl unstash.
⚠️ Behaviour change
- If
.git/cl.jsonor.git/cl-stashes.jsonis damaged, every git-cl command now exits with code 1, including read-only ones such asgit cl status. Repair the file, or move it aside as the error message suggests. An empty file still counts as no data. git cl prunenow also removes records of stashed changelists whose Git stash no longer exists. They count as stale entries for--dry-runand--exit-code, so a post-commit hook runninggit cl prune --quietremoves them as well.git cl add <name>fails with exit code 1 if<name>is a stashed changelist.
Other changes
git cl helpshows 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 suggestgit merge --abortwhen no merge is in progress. git cl status | headand similar commands no longer end with aBrokenPipeErrortraceback.- 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