Skip to content

Commit

Permalink
Merge pull request #74 from wcampbell0x2a/dependabot/cargo/git2-0.19.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wcampbell0x2a authored Oct 22, 2024
2 parents d00fb89 + 93a6735 commit 5200e79
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ reqwest = { version = "0.12.3", default-features = false, features = ["blocking"
anyhow = "1.0.90"
guppy = "0.17.5"
rayon = "1.10.0"
git2 = { version = "0.18.3", features = ["vendored-libgit2", "vendored-openssl"] }
git2 = { version = "0.19.0", features = ["vendored-libgit2", "vendored-openssl"] }

[dev-dependencies]
assert_cmd = { version = "2.0.16", features = ["color", "color-auto"] }
Expand Down
20 changes: 10 additions & 10 deletions src/git.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
use std::cell::RefCell;
use std::io::Write;
use std::{
cell::RefCell,
path::{Path, PathBuf},
};
use std::path::{Path, PathBuf};

use git2::AutotagOption;
use git2::{
build::{CheckoutBuilder, RepoBuilder},
FetchOptions, Progress, RemoteCallbacks, Repository,
};
use git2::build::{CheckoutBuilder, RepoBuilder};
use git2::{AutotagOption, FetchOptions, Progress, RemoteCallbacks, RemoteUpdateFlags, Repository};

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

let fetch_head = repo.find_reference("FETCH_HEAD")?;
let fetch_commit = repo.reference_to_annotated_commit(&fetch_head)?;
Expand Down

0 comments on commit 5200e79

Please sign in to comment.