Skip to content

utility to test if a commit is a descendent of one or more commits #815

Description

@chadrik

Hi,
I'm looking to recreate the behavior of git branch --contains <commit> using pygit2. The core of the routine in git is implemented here and here in is_descendent_of and merge_bases_many. I've looked through the pygit2 source for the building blocks of something similar but couldn't find anything.

A few questions:

  • is there something similar to this in pygit2 that I missed?
  • if no: is this considered too "high level" for this project?
  • if no: would you be interested in a pull request for this feature should I find the time to do it?
  • if yes: do you think this would be better implemented in C or python?

thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions