From 72e25f1e725c61493edaa86a1cc06f1f1f4de01e Mon Sep 17 00:00:00 2001 From: "Kirill A. Korinsky" Date: Mon, 7 Feb 2022 01:43:30 +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. --- libgit2-sys/build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libgit2-sys/build.rs b/libgit2-sys/build.rs index 0046afafca..41b6041721 100644 --- a/libgit2-sys/build.rs +++ b/libgit2-sys/build.rs @@ -24,7 +24,7 @@ fn main() { println!("cargo:rustc-cfg=libgit2_vendored"); - if !Path::new("libgit2/.git").exists() { + if !Path::new("libgit2/src").exists() { let _ = Command::new("git") .args(&["submodule", "update", "--init", "libgit2"]) .status();