Skip to content

Commit

Permalink
libgit2-sys: use src instead .git as vendored indicator (#801)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
catap committed Feb 7, 2022
1 parent ae02afd commit 58ed9c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libgit2-sys/build.rs
Expand Up @@ -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();
Expand Down

0 comments on commit 58ed9c3

Please sign in to comment.