Skip to content

Stacking should handle rebases performed outside of gh stack #193

Description

@flakey-bit

Let's say I have

trunk: AA1
    branch1: BB1
        branch2: CC1

The stack JSON will look something like this

{
  "schemaVersion": 1,
  "stacks": [{
      "trunk": {
        "branch": "master",
        "head": "AA1"
      },
      "branches": [{
          "branch": "branch1",
          "head": "BB1",
          "base": "AA1",
          "pullRequest": {
             // ...
          }
        }, {
          "branch": "branch2",
          "head": "CC1",
          "base": "BB1",
          "pullRequest": {
            // ..
          }
        }
      ]
    }
  ]
}

If I now perform an interactive rebase (outside of gh stack) - e.g. to remove the head commit from branch1, or if I do something like git reset HEAD^1 --hard from a branch1 checkout, the stack has no knowledge of what has happened.

If I view the stack, there's now one fewer commit on branch1 (as expected) but one extra commit on branch2. I'd like / expect that commit to have been removed entirely from the stack.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestFeature Requeststopic: cli - generalGeneral CLI: install/arch, shell completion, hotkeys, autocomplete, tracking branches, stack list.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions