From e307f047a00a0f1a8da490d68125c3c0ea45fc8b Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 2 Nov 2018 07:07:48 -0700 Subject: [PATCH] Pass `--update-head-ok` when fetching via git CLI Discovered in a recent [comment] it looks like not passing this may cause the git CLI to fail in some situations. [comment]: https://github.com/rust-lang/cargo/issues/2078#issuecomment-435333292 --- src/cargo/sources/git/utils.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cargo/sources/git/utils.rs b/src/cargo/sources/git/utils.rs index 66301c1da1b..65ae5db2702 100644 --- a/src/cargo/sources/git/utils.rs +++ b/src/cargo/sources/git/utils.rs @@ -755,6 +755,7 @@ fn fetch_with_cli( cmd.arg("fetch") .arg("--tags") // fetch all tags .arg("--quiet") + .arg("--update-head-ok") // see discussion in #2078 .arg(url.to_string()) .arg(refspec) .cwd(repo.path());