@@ -123,6 +123,14 @@ impl Index {
123
123
/// The second field in the returned tuple is the commit object to which the changes were provided.
124
124
/// If one would set the `last_seen_reference()` to that object, the effect is exactly the same
125
125
/// as if `fetch_changes(…)` had been called.
126
+ ///
127
+ /// # Resource Usage
128
+ ///
129
+ /// As this method fetches the git repository, loose objects or small packs may be created. Over time,
130
+ /// these will accumulate and either slow down subsequent operations, or cause them to fail due to exhaustion
131
+ /// of the maximum number of open file handles as configured with `ulimit`.
132
+ ///
133
+ /// Thus it is advised for the caller to run `git gc` occasionally based on their own requirements and usage patterns.
126
134
pub fn peek_changes_with_options (
127
135
& self ,
128
136
options : Option < & mut git2:: FetchOptions < ' _ > > ,
@@ -163,6 +171,14 @@ impl Index {
163
171
/// the remote called `origin`.
164
172
/// The `last_seen_reference()` will be created or adjusted to point to the latest fetched
165
173
/// state, which causes this method to have a different result each time it is called.
174
+ ///
175
+ /// # Resource Usage
176
+ ///
177
+ /// As this method fetches the git repository, loose objects or small packs may be created. Over time,
178
+ /// these will accumulate and either slow down subsequent operations, or cause them to fail due to exhaustion
179
+ /// of the maximum number of open file handles as configured with `ulimit`.
180
+ ///
181
+ /// Thus it is advised for the caller to run `git gc` occasionally based on their own requirements and usage patterns.
166
182
pub fn fetch_changes_with_options (
167
183
& self ,
168
184
options : Option < & mut git2:: FetchOptions < ' _ > > ,
0 commit comments