Skip to content

Commit

Permalink
libgit2-sys: use src instead .git as vendored indicator
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.

Backported as: rust-lang/git2-rs#801
  • Loading branch information
catap committed Feb 7, 2022
1 parent ca8eda6 commit cf89155
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vendor/libgit2-sys/build.rs
Expand Up @@ -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();
Expand Down

0 comments on commit cf89155

Please sign in to comment.