File tree 3 files changed +7
-0
lines changed
3 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ pub fn checkout_exclusive(
17
17
index : Options { object_hash, .. } ,
18
18
empty_files,
19
19
keep_going,
20
+ thread_limit,
20
21
} : index:: checkout_exclusive:: Options ,
21
22
) -> anyhow:: Result < ( ) > {
22
23
let repo = repo
@@ -57,6 +58,7 @@ pub fn checkout_exclusive(
57
58
destination_is_initially_empty : true ,
58
59
overwrite_existing : false ,
59
60
keep_going,
61
+ thread_limit,
60
62
..Default :: default ( )
61
63
} ;
62
64
Original file line number Diff line number Diff line change @@ -29,6 +29,10 @@ pub mod checkout_exclusive {
29
29
/// If true, all files will be written with zero bytes despite having made an ODB lookup.
30
30
pub empty_files : bool ,
31
31
pub keep_going : bool ,
32
+ /// If set, don't use more than this amount of threads.
33
+ /// Otherwise, usually use as many threads as there are logical cores.
34
+ /// A value of 0 is interpreted as no-limit
35
+ pub thread_limit : Option < usize > ,
32
36
}
33
37
}
34
38
Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ pub fn main() -> Result<()> {
102
102
index : core:: index:: Options { object_hash, format } ,
103
103
empty_files,
104
104
keep_going,
105
+ thread_limit,
105
106
} ,
106
107
)
107
108
} ,
You can’t perform that action at this time.
0 commit comments