Skip to content

Commit 58ed9c3

Browse files
authored
libgit2-sys: use src instead .git as vendored indicator (#801)
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.
1 parent ae02afd commit 58ed9c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libgit2-sys/build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ fn main() {
2424

2525
println!("cargo:rustc-cfg=libgit2_vendored");
2626

27-
if !Path::new("libgit2/.git").exists() {
27+
if !Path::new("libgit2/src").exists() {
2828
let _ = Command::new("git")
2929
.args(&["submodule", "update", "--init", "libgit2"])
3030
.status();

0 commit comments

Comments
 (0)