Skip to content

use libgit2 for git operations to improve performance and security #3787

@MoralCode

Description

@MoralCode

Libgit2 (website, repo) is a cross platform C library implementing the git plumbing. It is designed for use as a library within complex applications, unlike the git CLI which is designed as a CLI. (source)

https://www.pygit2.org/ is the python version of this.

I learned about libgit2 through a conversation in a nerdy group chat of mine where there was a large 80ms -> 0.5ms speedup for one minimal usecase (render times for displaying git repo status in your shell prompt). While this may not be applicable to Augur directly, I wonder if we could eliminate a lot of shell calls, parsing bugs, and extra layers in the process when facade collects a git repo by using git more directly via a library that directly interfaces with git's plumbing, rather than calling an external program to do it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionSeeking active feedback, usually for items under active development

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions