Skip to content

Commit 386dcc4

Browse files
committed
Inform about resource usage in the docs
Related to #10
1 parent 0989e0f commit 386dcc4

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ keywords = ["crates", "index", "diff"]
66
license = "MIT"
77
name = "crates-index-diff"
88
repository = "https://github.com/Byron/crates-index-diff-rs"
9-
version = "7.1.1"
9+
version = "7.1.2"
1010
edition = "2018"
1111
readme = "changelog.md"
1212
include = ["src/**/*", "LICENSE.md", "README.md", "changelog.md"]

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## v7.1.2 (2020-05-28)
2+
3+
* Documentation update
4+
15
## v7.1.1 (2020-05-23)
26

37
* Make new feature from v7.1.0 actually usable

src/index.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,14 @@ impl Index {
123123
/// The second field in the returned tuple is the commit object to which the changes were provided.
124124
/// If one would set the `last_seen_reference()` to that object, the effect is exactly the same
125125
/// 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.
126134
pub fn peek_changes_with_options(
127135
&self,
128136
options: Option<&mut git2::FetchOptions<'_>>,
@@ -163,6 +171,14 @@ impl Index {
163171
/// the remote called `origin`.
164172
/// The `last_seen_reference()` will be created or adjusted to point to the latest fetched
165173
/// 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.
166182
pub fn fetch_changes_with_options(
167183
&self,
168184
options: Option<&mut git2::FetchOptions<'_>>,

0 commit comments

Comments
 (0)