Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restacking will drop empty commits #257

Open
mattprecious opened this issue Feb 20, 2025 · 0 comments
Open

Restacking will drop empty commits #257

mattprecious opened this issue Feb 20, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@mattprecious
Copy link
Owner

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.

@mattprecious mattprecious added the bug Something isn't working label Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant