Skip to content

Commit 5200e79

Browse files
Merge pull request #74 from wcampbell0x2a/dependabot/cargo/git2-0.19.0
2 parents d00fb89 + 93a6735 commit 5200e79

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ reqwest = { version = "0.12.3", default-features = false, features = ["blocking"
1616
anyhow = "1.0.90"
1717
guppy = "0.17.5"
1818
rayon = "1.10.0"
19-
git2 = { version = "0.18.3", features = ["vendored-libgit2", "vendored-openssl"] }
19+
git2 = { version = "0.19.0", features = ["vendored-libgit2", "vendored-openssl"] }
2020

2121
[dev-dependencies]
2222
assert_cmd = { version = "2.0.16", features = ["color", "color-auto"] }

src/git.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
1+
use std::cell::RefCell;
12
use std::io::Write;
2-
use std::{
3-
cell::RefCell,
4-
path::{Path, PathBuf},
5-
};
3+
use std::path::{Path, PathBuf};
64

7-
use git2::AutotagOption;
8-
use git2::{
9-
build::{CheckoutBuilder, RepoBuilder},
10-
FetchOptions, Progress, RemoteCallbacks, Repository,
11-
};
5+
use git2::build::{CheckoutBuilder, RepoBuilder};
6+
use git2::{AutotagOption, FetchOptions, Progress, RemoteCallbacks, RemoteUpdateFlags, Repository};
127

138
struct State {
149
progress: Option<Progress<'static>>,
@@ -186,7 +181,12 @@ pub fn pull(repo: &Path) -> Result<(), git2::Error> {
186181
// commits. This may be needed even if there was no packfile to download,
187182
// which can happen e.g. when the branches have been changed but all the
188183
// needed objects are available locally.
189-
remote.update_tips(None, true, AutotagOption::Unspecified, None)?;
184+
remote.update_tips(
185+
None,
186+
RemoteUpdateFlags::UPDATE_FETCHHEAD,
187+
AutotagOption::Unspecified,
188+
None,
189+
)?;
190190

191191
let fetch_head = repo.find_reference("FETCH_HEAD")?;
192192
let fetch_commit = repo.reference_to_annotated_commit(&fetch_head)?;

0 commit comments

Comments
 (0)