@@ -28,14 +28,15 @@ def gc(repository_path, aggressive=False, bare=False):
28
28
29
29
@git_exec
30
30
def gc_exec (* args , ** kwargs ):
31
- repo = git .Repo (repository_path )
31
+ repo = git .Repo (repository_path , odbt = git . GitCmdObjectDB )
32
32
repo .git .gc (* args , ** kwargs )
33
33
34
34
gc_exec (name = 'gc' , args = args , kwargs = kwargs )
35
35
36
36
def clone (repository_path , url , bare = False , shared = False , branch = None ):
37
37
args = [url , repository_path ]
38
- kwargs = {"no-hardlinks" : True , "shared" : shared }
38
+ kwargs = {"no-hardlinks" : True , "shared" : shared ,
39
+ "odbt" : git .GitCmdObjectDB }
39
40
logging .debug ("Cloning from %s to %s" % (url , repository_path ))
40
41
if bare is True :
41
42
kwargs ["bare" ] = True
@@ -56,7 +57,8 @@ def fetch(repository_path, prune=False):
56
57
57
58
@git_exec
58
59
def fetch_exec (* args , ** kwargs ):
59
- git .Repo (repository_path ).remotes .origin .fetch (* args , ** kwargs )
60
+ repo = git .Repo (repository_path , odbt = git .GitCmdObjectDB )
61
+ repo .remotes .origin .fetch (* args , ** kwargs )
60
62
61
63
fetch_exec (name = 'fetch' , args = args , kwargs = kwargs )
62
64
@@ -67,7 +69,8 @@ def reset(repository_path, treeish, hard=False):
67
69
68
70
@git_exec
69
71
def reset_exec (* args , ** kwargs ):
70
- git .refs .head .HEAD (git .Repo (repository_path )).reset (* args , ** kwargs )
72
+ repo = git .Repo (repository_path , odbt = git .GitCmdObjectDB )
73
+ git .refs .head .HEAD (repo ).reset (* args , ** kwargs )
71
74
72
75
reset_exec (name = 'reset' , args = args , kwargs = kwargs )
73
76
@@ -77,6 +80,8 @@ def get_refs(repository_path):
77
80
78
81
@git_exec
79
82
def get_refs_exec (* args , ** kwargs ):
80
- return dict ((h .name , h .commit .hexsha ) for h in git .Repo (repository_path ).heads )
83
+ r = dict ((h .name , h .commit .hexsha ) for h in git .Repo (repository_path ,
84
+ odbt = git .GitCmdObjectDB ).heads )
85
+ return r
81
86
82
87
return get_refs_exec (name = 'show-ref' , args = args , kwargs = kwargs )
0 commit comments