Skip to content

Restacking will drop empty commits #257

@mattprecious

Description

@mattprecious
git init &&
  git commit --allow-empty -m "Empty" &&
  st repo init &&
  st branch create "change-a" &&
  git commit --allow-empty -m "Change A" &&
  st branch create "change-b" &&
  git commit --allow-empty -m "Change B" &&
  st upstack onto

Accept default main trunk and select main for the onto prompt. The empty commit "Change B" gets dropped.

I think this is an issue with libgit2, or at least how I'm using it. We're receiving an EAPPLIED return code when performing the rebase commit.

The docs say that this is returned:

if the current commit has already been applied to the upstream and there is nothing to commit

I can't find anything in the docs for an option that I might not be passing. There's one for creating a commit normally, but that matches the git commit API. You don't need to pass any flags for this for git rebase.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions