Skip to content

1.6.3

Choose a tag to compare

@BHFock BHFock released this 19 Nov 20:08
· 141 commits to main since this release
fb755a7

This release makes git cl stash and git cl unstash safer and restores changes exactly as they were stashed.

Fixed

  • Failed writes are no longer reported as success. If git-cl cannot write its changelist or stash data in .git/, the command now fails with exit code 1 instead of printing a success message. Previously, git cl stash could report success without saving its record, which left the changelist impossible to unstash with git-cl. Its changes were only in git stash list.
  • A failed stash is undone safely. If the stash record cannot be saved, git-cl now puts your changes back and keeps the changelist active. The previous rollback code would have dropped the stash and discarded the changes.
  • Unstash restores which changes were staged. Files come back exactly as they were stashed: [MM] as [MM], [AM] as [AM] and untracked files as [??]. Previously, all changes came back unstaged, and untracked files came back staged as new files. If a file has changed on the current branch since it was stashed, for example after git cl branch --from, its staged changes come back as unstaged changes, and git-cl lists the file.

⚠️ Behaviour change

  • After git cl unstash, staged changes are staged again, and files that were untracked are untracked again. Scripts that expected all changes to come back unstaged, or untracked files to come back staged, need to stage or unstage them explicitly.

Other changes

  • Tutorial §3.1 describes how unstash restores staged changes.

Pull requests

  • Report failed metadata writes and restore staged changes on unstash by @BHFock in #76

Full Changelog: 1.6.2...1.6.3