From eb218a6f5fc16aadeee0736f0abc3771ad8b5542 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 07031cc928..3c16a272a6 100644 --- a/vendor/libgit2-sys/build.rs +++ b/vendor/libgit2-sys/build.rs @@ -22,7 +22,7 @@ fn main() { } } - if !Path::new("libgit2/.git").exists() { + if !Path::new("libgit2/src").exists() { let _ = Command::new("git") .args(&["submodule", "update", "--init"]) .status();