Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ssh_key_from_memory optional feature. #331

Merged
merged 2 commits into from
Jul 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ tempdir = "0.3"

[features]
unstable = []
default = ["ssh", "https", "curl"]
default = ["ssh", "https", "curl", "ssh_key_from_memory"]
ssh = ["libgit2-sys/ssh"]
https = ["libgit2-sys/https", "openssl-sys", "openssl-probe"]
curl = ["libgit2-sys/curl"]
ssh_key_from_memory = ["libgit2-sys/ssh_key_from_memory"]

[workspace]
members = ["systest", "git2-curl"]
1 change: 1 addition & 0 deletions libgit2-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ openssl-sys = { version = "0.9", optional = true }
ssh = ["libssh2-sys"]
https = ["openssl-sys"]
curl = ["curl-sys"]
ssh_key_from_memory = []
3 changes: 3 additions & 0 deletions libgit2-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ fn main() {
let msvc = target.contains("msvc");
let mut cfg = cmake::Config::new("libgit2");

#[cfg(feature = "ssh_key_from_memory")]
cfg.define("GIT_SSH_MEMORY_CREDENTIALS", "1");

if msvc {
// libgit2 passes the /GL flag to enable whole program optimization, but
// this requires that the /LTCG flag is passed to the linker later on,
Expand Down