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

Replace GitPython with pygit2 #2120

Merged
merged 18 commits into from
Dec 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feedstock_io: Always search parent directories
Remove the `search_parent_directories` kwarg that's never been used,
and instead always enable searching parent directories for better
cross-version pygit2 compatibility.
  • Loading branch information
mgorny committed Nov 11, 2024
commit a21d135023f1eba1bc269f6c53b10869baf77252
9 changes: 2 additions & 7 deletions conda_smithy/feedstock_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,12 @@
from contextlib import contextmanager


def get_repo(path, search_parent_directories=True):
def get_repo(path):
repo = None
try:
import pygit2

if search_parent_directories:
path = pygit2.discover_repository(path)
if path is not None:
repo = pygit2.Repository(
path, pygit2.enums.RepositoryOpenFlag.NO_SEARCH
)
repo = pygit2.Repository(path)
except ImportError:
pass
except pygit2.GitError:
Expand Down