-
Notifications
You must be signed in to change notification settings - Fork 20
Best-guess drop of commits #4
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
Comments
The way
If a branch points to a commit which has been skipped as a result of one of the above two, then it's deleted. In practice, this solution has worked fairly well for me, although it's indeed not ideal for the case of squashed commits. |
I recently handled this with tree-id, see epage@a472ed6
This was the next idea I was going to play with but glad you brought it up because I kept not finding this idea, so its good we are spreading it around. |
I'm assuming the optimization at arxanas/git-branchless@16b0c69 mentioned at libgit2/libgit2#6036 is helpful for generating the patch ids. |
Furthermore, we're careful only to calculate patch IDs for commits which have touched exactly the same paths, as diff calculation is still slower than calculating the paths changed in a given commit. We also do it in parallel, which is important for large repositories. See https://github.com/arxanas/git-branchless/blob/331b7cf2a37d00a3d54ba5df00f3d702aa7b3948/src/core/rewrite/plan.rs#L700-L710 |
Unlike in #3, not all commits drop cleanly
If we identify a best-guess at the start of a branch, we should then proceed to delete the whole branch, assuming they were all squashed.
This should be configurable.
The text was updated successfully, but these errors were encountered: