Byron · GitHub

How to reproduce

  • create a commit with stg new current, with a message body that says 'old'
  • use stg refresh -e to edit the commit message to new, but also change the first line to alter current to renamed

You will see that stg series -Id will show that the commit was renamed to renamed, but the commit message will still be old.

Expected behaviour

stg refresh -e is there to change the message of a commit, so it was surprising to see it would throw that away rather than the rename of the commit. Ideally, it would keep all the changes the user made, or error gracefully without discarding data.

Environment

❯ stg --version
Stacked Git 2.4.1
Copyright (C) 2005-2022 StGit authors
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
SPDX-License-Identifier: GPL-2.0-only
git version 2.39.3 (Apple Git-146)

Read the original on github.com ↗