-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
1,456 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
"""Minimal wrapper for libgit2 | ||
This package wraps the functionality of libgit2 used by rpmautospec (and | ||
only that), aiming to mimic the pygit2 API (of the minimum version | ||
supported, 1.1). | ||
The reason why we don’t use pygit2 itself is because it makes | ||
bootstrapping rpmautospec hairy (e.g. for a new Python version). | ||
""" | ||
|
||
from .constants import GIT_REPOSITORY_OPEN_NO_SEARCH | ||
from .exc import GitError | ||
from .wrapper import Commit, Repository, Tree |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from . import native_adaptation | ||
|
||
GIT_DIFF_OPTIONS_VERSION = 1 | ||
|
||
GIT_OID_RAWSZ = GIT_OID_SHA1_SIZE = 20 | ||
GIT_OID_HEXSZ = GIT_OID_SHA1_HEXSIZE = GIT_OID_SHA1_SIZE * 2 | ||
|
||
GIT_REPOSITORY_OPEN_NO_SEARCH = native_adaptation.git_repository_open_flag_t.NO_SEARCH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
"""Minimal wrapper for libgit2 - Exceptions and Warnings""" | ||
|
||
|
||
class Libgit2Error(Exception): | ||
pass | ||
|
||
|
||
class Libgit2NotFoundError(Libgit2Error): | ||
pass | ||
|
||
|
||
class Libgit2VersionError(Libgit2Error): | ||
pass | ||
|
||
|
||
class Libgit2VersionWarning(UserWarning): | ||
pass | ||
|
||
|
||
class GitError(Exception): | ||
pass | ||
|
||
|
||
class GitPeelError(GitError): | ||
pass |
Oops, something went wrong.