Skip to content

Renaming a commit as part of stg refresh -e ignores changes to the body #470

Closed
@Byron

Description

@Byron

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions