@@ -84,7 +84,7 @@ def write(self, *args, **kwargs):
84
84
object."""
85
85
return self .odb .write (* args , ** kwargs )
86
86
87
- def pack (self , path = None , pack_delegate = None , max_threads = None ):
87
+ def pack (self , path = None , pack_delegate = None , num_threads = None ):
88
88
"""Pack the objects in the odb chosen by the pack_delegate function
89
89
and write .pack and .idx files for them.
90
90
@@ -93,13 +93,13 @@ def pack(self, path=None, pack_delegate=None, max_threads=None):
93
93
Parameters:
94
94
95
95
path
96
- The path to which the .pack and .idx files should be written. None will write to the default location
96
+ The path to which the .pack and .idx files should be written. None will write to the default location.
97
97
98
98
pack_delegate
99
99
The method which will provide add the objects to the pack builder. Defaults to all objects.
100
100
101
- max_threads
102
- The maximum number of threads the PackBuilder will spawn.
101
+ num_threads
102
+ The number of threads the PackBuilder will spawn. If set to 0 libgit2 will autodetect the number of CPUs .
103
103
"""
104
104
105
105
def pack_all_objects (pack_builder ):
@@ -109,8 +109,8 @@ def pack_all_objects(pack_builder):
109
109
pack_delegate = pack_delegate or pack_all_objects
110
110
111
111
builder = PackBuilder (self )
112
- if max_threads :
113
- builder .set_max_threads ( max_threads )
112
+ if num_threads is not None :
113
+ builder .set_threads ( num_threads )
114
114
pack_delegate (builder )
115
115
builder .write (path = path )
116
116
0 commit comments