Skip to content

Commit 3d8ff14

Browse files
author
Vladimir Kotal
committed
use GitPython instead of pygit2
1 parent c78a27b commit 3d8ff14

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

opengrok-tools/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ requests==2.20.0
1111
Resource==0.2.1
1212
six==1.11.0
1313
urllib3==1.23
14+
GitPython==3.0.2

opengrok-tools/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def readme():
4545
],
4646
tests_require=[
4747
'pytest',
48-
'pygit2',
48+
'GitPython',
4949
'pytest-xdist',
5050
],
5151
entry_points={

opengrok-tools/src/test/python/test_mirror.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import tempfile
2828
import os
2929
import stat
30-
import pygit2
30+
from git import Repo
3131
import pytest
3232
import sys
3333

@@ -154,8 +154,8 @@ def mock_get(*args, **kwargs):
154154
return MockResponse()
155155

156156
# Clone a Git repository so that it can pull.
157-
pygit2.init_repository(repo_path, True)
158-
pygit2.clone_repository(repo_path, cloned_repo_path)
157+
repo = Repo.init(repo_path)
158+
repo.clone(cloned_repo_path)
159159

160160
with monkeypatch.context() as m:
161161
m.setattr(sys, 'argv', ['prog', "-I", project_name])

0 commit comments

Comments
 (0)