Skip to content

Commit 5443555

Browse files
committed
Update libgit2
1 parent f269dc4 commit 5443555

File tree

4 files changed

+24
-7
lines changed

4 files changed

+24
-7
lines changed

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "git2"
3-
version = "0.14.2"
3+
version = "0.14.3"
44
authors = ["Josh Triplett <[email protected]>", "Alex Crichton <[email protected]>"]
55
license = "MIT/Apache-2.0"
66
readme = "README.md"
@@ -20,7 +20,7 @@ url = "2.0"
2020
bitflags = "1.1.0"
2121
libc = "0.2"
2222
log = "0.4.8"
23-
libgit2-sys = { path = "libgit2-sys", version = "0.13.2" }
23+
libgit2-sys = { path = "libgit2-sys", version = "0.13.3" }
2424

2525
[target."cfg(all(unix, not(target_os = \"macos\")))".dependencies]
2626
openssl-sys = { version = "0.9.0", optional = true }

libgit2-sys/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "libgit2-sys"
3-
version = "0.13.2+1.4.2"
3+
version = "0.13.3+1.4.3"
44
authors = ["Josh Triplett <[email protected]>", "Alex Crichton <[email protected]>"]
55
links = "git2"
66
build = "build.rs"

libgit2-sys/build.rs

+20-3
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,26 @@ fn main() {
158158
cfg.define("SHA1DC_NO_STANDARD_INCLUDES", "1");
159159
cfg.define("SHA1DC_CUSTOM_INCLUDE_SHA1_C", "\"common.h\"");
160160
cfg.define("SHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C", "\"common.h\"");
161-
cfg.file("libgit2/src/util/hash/sha1/collisiondetect.c");
162-
cfg.file("libgit2/src/util/hash/sha1/sha1dc/sha1.c");
163-
cfg.file("libgit2/src/util/hash/sha1/sha1dc/ubc_check.c");
161+
cfg.file("libgit2/src/util/hash/collisiondetect.c");
162+
cfg.file("libgit2/src/util/hash/sha1dc/sha1.c");
163+
cfg.file("libgit2/src/util/hash/sha1dc/ubc_check.c");
164+
165+
if https {
166+
if windows {
167+
features.push_str("#define GIT_SHA256_WIN32 1\n");
168+
cfg.file("libgit2/src/util/hash/win32.c");
169+
} else if target.contains("apple") {
170+
features.push_str("#define GIT_SHA256_COMMON_CRYPTO 1\n");
171+
cfg.file("libgit2/src/util/hash/common_crypto.c");
172+
} else {
173+
features.push_str("#define GIT_SHA256_OPENSSL 1\n");
174+
cfg.file("libgit2/src/util/hash/openssl.c");
175+
}
176+
} else {
177+
features.push_str("#define GIT_SHA256_BUILTIN 1\n");
178+
cfg.file("libgit2/src/util/hash/builtin.c");
179+
cfg.file("libgit2/src/util/hash/rfc6234/sha224-256.c");
180+
}
164181

165182
if let Some(path) = env::var_os("DEP_Z_INCLUDE") {
166183
cfg.include(path);

libgit2-sys/libgit2

Submodule libgit2 updated 87 files

0 commit comments

Comments
 (0)