Skip to content

Commit 79cf4ca

Browse files
jyn514Byron
authored andcommitted
Only fetch the master crates.io branch, not all branches
This shrinks the data downloaded for a first fetch from 752 to 94 MB.
1 parent d6f6d46 commit 79cf4ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ impl Index {
180180
.or_else(|_| Oid::from_str(EMPTY_TREE_HASH))?;
181181
let to = {
182182
self.repo.find_remote("origin").and_then(|mut r| {
183-
r.fetch(&["refs/heads/*:refs/remotes/origin/*"], options, None)
183+
r.fetch(&["refs/heads/master:refs/remotes/origin/master"], options, None)
184184
})?;
185185
let latest_fetched_commit_oid =
186186
self.repo.refname_to_id("refs/remotes/origin/master")?;

0 commit comments

Comments
 (0)