* [PATCH 1/2] meson: wire up credential-wincred
2025-02-13 18:37 [PATCH 0/2] meson: wire up contrib/credential M Hickford via GitGitGadget
@ 2025-02-13 18:37 ` M Hickford via GitGitGadget
2025-02-13 18:37 ` [PATCH 2/2] meson: wire up credential-libsecret M Hickford via GitGitGadget
2025-02-14 4:53 ` [PATCH 0/2] meson: wire up contrib/credential Patrick Steinhardt
2 siblings, 0 replies; 4+ messages in thread
From: M Hickford via GitGitGadget @ 2025-02-13 18:37 UTC (permalink / raw)
To: git; +Cc: Patrick Steinhardt, M Hickford, M Hickford
From: M Hickford <mirth.hickford@gmail.com>
Fix an error when compiling with MSVC.
Signed-off-by: M Hickford <mirth.hickford@gmail.com>
---
contrib/credential/meson.build | 3 +++
contrib/credential/wincred/git-credential-wincred.c | 2 ++
contrib/credential/wincred/meson.build | 1 +
contrib/meson.build | 1 +
meson_options.txt | 2 ++
5 files changed, 9 insertions(+)
create mode 100644 contrib/credential/meson.build
create mode 100644 contrib/credential/wincred/meson.build
diff --git a/contrib/credential/meson.build b/contrib/credential/meson.build
new file mode 100644
index 00000000000..4017ae3fa88
--- /dev/null
+++ b/contrib/credential/meson.build
@@ -0,0 +1,3 @@
+if get_option('credential_wincred')
+ subdir('wincred')
+endif
diff --git a/contrib/credential/wincred/git-credential-wincred.c b/contrib/credential/wincred/git-credential-wincred.c
index 4be0d58cd89..04145b51183 100644
--- a/contrib/credential/wincred/git-credential-wincred.c
+++ b/contrib/credential/wincred/git-credential-wincred.c
@@ -12,7 +12,9 @@
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
+#ifndef _MSC_VER
__attribute__((format (printf, 1, 2)))
+#endif
static void die(const char *err, ...)
{
char msg[4096];
diff --git a/contrib/credential/wincred/meson.build b/contrib/credential/wincred/meson.build
new file mode 100644
index 00000000000..8c59d47174e
--- /dev/null
+++ b/contrib/credential/wincred/meson.build
@@ -0,0 +1 @@
+executable('git-credential-wincred', 'git-credential-wincred.c')
diff --git a/contrib/meson.build b/contrib/meson.build
index d74b64a5181..c414c98d5a7 100644
--- a/contrib/meson.build
+++ b/contrib/meson.build
@@ -1,3 +1,4 @@
foreach feature : get_option('contrib')
subdir(feature)
endforeach
+subdir('credential')
diff --git a/meson_options.txt b/meson_options.txt
index 5c12e9055e6..7554528482a 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -29,6 +29,8 @@ option('version', type: 'string', value: '',
# Features supported by Git.
option('contrib', type: 'array', value: [ 'completion' ], choices: [ 'completion', 'subtree' ],
description: 'Contributed features to include.')
+option('credential_wincred', type: 'boolean', value: false,
+ description: 'Build helper git-credential-wincred. Requires Windows SDK.')
option('curl', type: 'feature', value: 'enabled',
description: 'Build helpers used to access remotes with the HTTP transport.')
option('expat', type: 'feature', value: 'enabled',
--
gitgitgadget
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 2/2] meson: wire up credential-libsecret
2025-02-13 18:37 [PATCH 0/2] meson: wire up contrib/credential M Hickford via GitGitGadget
2025-02-13 18:37 ` [PATCH 1/2] meson: wire up credential-wincred M Hickford via GitGitGadget
@ 2025-02-13 18:37 ` M Hickford via GitGitGadget
2025-02-14 4:53 ` [PATCH 0/2] meson: wire up contrib/credential Patrick Steinhardt
2 siblings, 0 replies; 4+ messages in thread
From: M Hickford via GitGitGadget @ 2025-02-13 18:37 UTC (permalink / raw)
To: git; +Cc: Patrick Steinhardt, M Hickford, M Hickford
From: M Hickford <mirth.hickford@gmail.com>
Signed-off-by: M Hickford <mirth.hickford@gmail.com>
---
contrib/credential/libsecret/meson.build | 3 +++
contrib/credential/meson.build | 3 +++
meson_options.txt | 2 ++
3 files changed, 8 insertions(+)
create mode 100644 contrib/credential/libsecret/meson.build
diff --git a/contrib/credential/libsecret/meson.build b/contrib/credential/libsecret/meson.build
new file mode 100644
index 00000000000..92349be0ee8
--- /dev/null
+++ b/contrib/credential/libsecret/meson.build
@@ -0,0 +1,3 @@
+glib = dependency('glib-2.0')
+libsecret = dependency('libsecret-1')
+executable('git-credential-libsecret', 'git-credential-libsecret.c', dependencies: [glib, libsecret])
diff --git a/contrib/credential/meson.build b/contrib/credential/meson.build
index 4017ae3fa88..bedc76b96f2 100644
--- a/contrib/credential/meson.build
+++ b/contrib/credential/meson.build
@@ -1,3 +1,6 @@
if get_option('credential_wincred')
subdir('wincred')
endif
+if get_option('credential_libsecret')
+ subdir('libsecret')
+endif
diff --git a/meson_options.txt b/meson_options.txt
index 7554528482a..69e386afc2a 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -29,6 +29,8 @@ option('version', type: 'string', value: '',
# Features supported by Git.
option('contrib', type: 'array', value: [ 'completion' ], choices: [ 'completion', 'subtree' ],
description: 'Contributed features to include.')
+option('credential_libsecret', type: 'boolean', value: false,
+ description: 'Build helper git-credential-libsecret. Requires GLib and libsecret.')
option('credential_wincred', type: 'boolean', value: false,
description: 'Build helper git-credential-wincred. Requires Windows SDK.')
option('curl', type: 'feature', value: 'enabled',
--
gitgitgadget
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 0/2] meson: wire up contrib/credential
2025-02-13 18:37 [PATCH 0/2] meson: wire up contrib/credential M Hickford via GitGitGadget
2025-02-13 18:37 ` [PATCH 1/2] meson: wire up credential-wincred M Hickford via GitGitGadget
2025-02-13 18:37 ` [PATCH 2/2] meson: wire up credential-libsecret M Hickford via GitGitGadget
@ 2025-02-14 4:53 ` Patrick Steinhardt
2 siblings, 0 replies; 4+ messages in thread
From: Patrick Steinhardt @ 2025-02-14 4:53 UTC (permalink / raw)
To: M Hickford via GitGitGadget; +Cc: git, M Hickford
On Thu, Feb 13, 2025 at 06:37:37PM +0000, M Hickford via GitGitGadget wrote:
> It would be neat to also run test t0303-credential-external with
> GIT_TEST_CREDENTIAL_HELPER=wincred but I couldn't figure out how to do this.
Thanks for working on this! I have a patch series sitting locally for a
while that wires up all credential helpers and more, as well. It also
wires up netrc and fixes its tests to allow out-of-tree testing, which
doesn't work right now. What I don't have though is the patch for the
wincred helper.
The patch series is currently still blocked on [1], which is why I have
been holding back on it. Would you mind if I picked your patch to fix
wincred, but we then wait with wiring up remaining credential helpers
until my follow-up patch series is unblocked?
Meanwhile, I'd appreciate any feedback on [1] to help move it forward,
if you have the time :)
Patrick
[1]: <20250129-b4-pks-meson-improvements-v1-0-ab709f0be12c@pks.im>
^ permalink raw reply [flat|nested] 4+ messages in thread