From f7142b5e4a9ce3f389f7851aac2fc98ce7bef764 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sun, 24 May 2015 18:38:47 +0200 Subject: [PATCH] cred: Declare GIT_CREDTYPE_SSH_MEMORY unconditionally Declare GIT_CREDTYPE_SSH_MEMORY to have consistent API independently of whether libgit2 was built with or without in-memory key passing support. Or rather, to have it at all since build-time definitions are not stored in headers. --- include/git2/transport.h | 2 -- src/transports/cred.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/include/git2/transport.h b/include/git2/transport.h index 4008615ab..2eeebd565 100644 --- a/include/git2/transport.h +++ b/include/git2/transport.h @@ -109,14 +109,12 @@ typedef enum { */ GIT_CREDTYPE_USERNAME = (1u << 5), -#ifdef GIT_SSH_MEMORY_CREDENTIALS /** * Credentials read from memory. * * Only available for libssh2+OpenSSL for now. */ GIT_CREDTYPE_SSH_MEMORY = (1u << 6), -#endif } git_credtype_t; /* The base structure for all credential types */ diff --git a/src/transports/cred.c b/src/transports/cred.c index c1f305d77..006cd2c52 100644 --- a/src/transports/cred.c +++ b/src/transports/cred.c @@ -39,9 +39,7 @@ const char *git_cred__username(git_cred *cred) return c->username; } case GIT_CREDTYPE_SSH_KEY: -#ifdef GIT_SSH_MEMORY_CREDENTIALS case GIT_CREDTYPE_SSH_MEMORY: -#endif { git_cred_ssh_key *c = (git_cred_ssh_key *) cred; return c->username;