arxanas / git-branchless

High-velocity, monorepo-scale workflow for Git
Apache License 2.0
3.47k stars 89 forks source link

(#1088) post-rewrite hook does not track intermediate commits from an interactive rebase #1419

Open chf2117 opened 1 month ago

chf2117 commented 1 month ago

Fixes https://github.com/arxanas/git-branchless/issues/1088

This pull request copies the changes from https://github.com/arxanas/git-branchless/pull/1098 and addresses arxanas' comments.

I was able to repro the issue from https://github.com/arxanas/git-branchless/issues/1088. It seems that we are tracking the intermediate commits created by a rebase and adding them to the events db during the post rewrite hook. I noticed that this code was added to prevent aborted rebases from adding intermediate commits, but the test written for that still passes.

arxanas commented 1 month ago

Will look at this later, want to get the next release out soon