Skip to content

stg repair can throw away commits #163

@smoofra

Description

@smoofra

To Reproduce:

$ git co -b xxx origin/main
$ stg init
$ stg new xxx
$ vi README
$ stg refresh
$ git commit --amend
$ stg repair

Results.

The amended commit has not been turned into a patch, and instead has been silently left behind.

Expected results.

Ideally stg repair would recognize that only the patch message has changed and update that. In any case though it should't abandon the commit, it should patchily the amended commit resulting in two, now conflicting identical unapplied patches in the
series.

Why would I do that anyway?

I use stgit to maintain my queue of ongoing patches while contributing to llvm-project, which uses Phabricator as a code review platform. Phabricators client wants to amend the commit messages to add its own information to them, which makes the workflow with stgit awkward.

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