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

Warn about base vs head relationship #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Werkov
Copy link

@Werkov Werkov commented Jul 4, 2024

I inadvertently passed a base commit that was not an ancestory of head and exploded branch could not be cherry-picked cleanly on top of base (because of head..base changes).

pygit2 does not have an equivalent of git merge-base --is-ancestor, so use the closes approximation by comparing merge base to base. (Hopefully, the "base" is picked by merge_base function when there are multiple merge bases possible so that this ancestor check is corect.)

I inadvertently passed a base commit that was not an ancestory of head
and exploded branch could not be cherry-picked cleanly on top of base
(because of head..base changes).

pygit2 does not have an equivalent of `git merge-base --is-ancestor`, so
use the closes approximation by comparing merge base to base.
(Hopefully, the "base" is picked by merge_base function when there are
multiple merge bases possible so that this ancestor check is corect.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant