From 1f6dec4285cb046d157fb00f1c0d51c7633a3601 Mon Sep 17 00:00:00 2001 From: "Kirill A. Korinsky" Date: Mon, 7 Feb 2022 01:37:13 +0100 Subject: [PATCH] `libgit2-sys`: use `src` instead `.git` as vendored indicator When someone vendored `libgit2-sys` he may exclude `.git` folder. When such things happened an attempt to build it may lead to error like: `fatal: not a git repository (or any of the parent directories): .git`. The only way to fix it is using system's `libgit2` which may lead to `invalid version 0 on git_proxy_options; class=Invalid (3)` at some cases. Backported as: https://github.com/rust-lang/git2-rs/pull/801 --- vendor/libgit2-sys/build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/libgit2-sys/build.rs b/vendor/libgit2-sys/build.rs index 76aa687cf6..9ea69e171c 100644 --- a/vendor/libgit2-sys/build.rs +++ b/vendor/libgit2-sys/build.rs @@ -20,7 +20,7 @@ fn main() { } } - if !Path::new("libgit2/.git").exists() { + if !Path::new("libgit2/src").exists() { let _ = Command::new("git") .args(&["submodule", "update", "--init", "libgit2"]) .status();