{"thread":{"id":"62948","subject":"[PATCH 0/2] meson: wire up contrib/credential","startedAt":"2025-02-13T18:37:42Z","lastAt":"2025-02-14T04:54:06Z","messageCount":4,"participants":["M Hickford via GitGitGadget","Patrick Steinhardt"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"512373","messageId":"pull.1859.git.1739471859.gitgitgadget@gmail.com","threadId":"62948","inReplyTo":null,"subject":"[PATCH 0/2] meson: wire up contrib/credential","fromName":"M Hickford via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-02-13T18:37:37Z","receivedAt":"2025-02-13T18:37:42Z","isPatch":true,"sender":{"key":"mirth.hickford@gmail.com","avatar":"https://avatars.githubusercontent.com/u/105314?v=4"},"body":"It would be neat to also run test t0303-credential-external with\nGIT_TEST_CREDENTIAL_HELPER=wincred but I couldn't figure out how to do this.\n\nM Hickford (2):\n  meson: wire up credential-wincred\n  meson: wire up credential-libsecret\n\n contrib/credential/libsecret/meson.build            | 3 +++\n contrib/credential/meson.build                      | 6 ++++++\n contrib/credential/wincred/git-credential-wincred.c | 2 ++\n contrib/credential/wincred/meson.build              | 1 +\n contrib/meson.build                                 | 1 +\n meson_options.txt                                   | 4 ++++\n 6 files changed, 17 insertions(+)\n create mode 100644 contrib/credential/libsecret/meson.build\n create mode 100644 contrib/credential/meson.build\n create mode 100644 contrib/credential/wincred/meson.build\n\n\nbase-commit: e2067b49ecaef9b7f51a17ce251f9207f72ef52d\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-1859%2Fhickford%2Fmeson-credential-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1859/hickford/meson-credential-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/1859\n-- \ngitgitgadget\n"},{"id":"512374","messageId":"7ac8aa63af94e94c30e0429d0e088f6e0f8e5cb4.1739471859.git.gitgitgadget@gmail.com","threadId":"62948","inReplyTo":"pull.1859.git.1739471859.gitgitgadget@gmail.com","subject":"[PATCH 1/2] meson: wire up credential-wincred","fromName":"M Hickford via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-02-13T18:37:38Z","receivedAt":"2025-02-13T18:37:42Z","isPatch":true,"sender":{"key":"mirth.hickford@gmail.com","avatar":"https://avatars.githubusercontent.com/u/105314?v=4"},"body":"From: M Hickford <mirth.hickford@gmail.com>\n\nFix an error when compiling with MSVC.\n\nSigned-off-by: M Hickford <mirth.hickford@gmail.com>\n---\n contrib/credential/meson.build                      | 3 +++\n contrib/credential/wincred/git-credential-wincred.c | 2 ++\n contrib/credential/wincred/meson.build              | 1 +\n contrib/meson.build                                 | 1 +\n meson_options.txt                                   | 2 ++\n 5 files changed, 9 insertions(+)\n create mode 100644 contrib/credential/meson.build\n create mode 100644 contrib/credential/wincred/meson.build\n\ndiff --git a/contrib/credential/meson.build b/contrib/credential/meson.build\nnew file mode 100644\nindex 00000000000..4017ae3fa88\n--- /dev/null\n+++ b/contrib/credential/meson.build\n@@ -0,0 +1,3 @@\n+if get_option('credential_wincred')\n+  subdir('wincred')\n+endif\ndiff --git a/contrib/credential/wincred/git-credential-wincred.c b/contrib/credential/wincred/git-credential-wincred.c\nindex 4be0d58cd89..04145b51183 100644\n--- a/contrib/credential/wincred/git-credential-wincred.c\n+++ b/contrib/credential/wincred/git-credential-wincred.c\n@@ -12,7 +12,9 @@\n \n #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))\n \n+#ifndef _MSC_VER\n __attribute__((format (printf, 1, 2)))\n+#endif\n static void die(const char *err, ...)\n {\n \tchar msg[4096];\ndiff --git a/contrib/credential/wincred/meson.build b/contrib/credential/wincred/meson.build\nnew file mode 100644\nindex 00000000000..8c59d47174e\n--- /dev/null\n+++ b/contrib/credential/wincred/meson.build\n@@ -0,0 +1 @@\n+executable('git-credential-wincred', 'git-credential-wincred.c')\ndiff --git a/contrib/meson.build b/contrib/meson.build\nindex d74b64a5181..c414c98d5a7 100644\n--- a/contrib/meson.build\n+++ b/contrib/meson.build\n@@ -1,3 +1,4 @@\n foreach feature : get_option('contrib')\n   subdir(feature)\n endforeach\n+subdir('credential')\ndiff --git a/meson_options.txt b/meson_options.txt\nindex 5c12e9055e6..7554528482a 100644\n--- a/meson_options.txt\n+++ b/meson_options.txt\n@@ -29,6 +29,8 @@ option('version', type: 'string', value: '',\n # Features supported by Git.\n option('contrib', type: 'array', value: [ 'completion' ], choices: [ 'completion', 'subtree' ],\n   description: 'Contributed features to include.')\n+option('credential_wincred', type: 'boolean', value: false,\n+  description: 'Build helper git-credential-wincred. Requires Windows SDK.')\n option('curl', type: 'feature', value: 'enabled',\n   description: 'Build helpers used to access remotes with the HTTP transport.')\n option('expat', type: 'feature', value: 'enabled',\n-- \ngitgitgadget\n\n"},{"id":"512375","messageId":"07ce068403072bf6933ddd00fdf1674dba6cb235.1739471859.git.gitgitgadget@gmail.com","threadId":"62948","inReplyTo":"pull.1859.git.1739471859.gitgitgadget@gmail.com","subject":"[PATCH 2/2] meson: wire up credential-libsecret","fromName":"M Hickford via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-02-13T18:37:39Z","receivedAt":"2025-02-13T18:37:43Z","isPatch":true,"sender":{"key":"mirth.hickford@gmail.com","avatar":"https://avatars.githubusercontent.com/u/105314?v=4"},"body":"From: M Hickford <mirth.hickford@gmail.com>\n\nSigned-off-by: M Hickford <mirth.hickford@gmail.com>\n---\n contrib/credential/libsecret/meson.build | 3 +++\n contrib/credential/meson.build           | 3 +++\n meson_options.txt                        | 2 ++\n 3 files changed, 8 insertions(+)\n create mode 100644 contrib/credential/libsecret/meson.build\n\ndiff --git a/contrib/credential/libsecret/meson.build b/contrib/credential/libsecret/meson.build\nnew file mode 100644\nindex 00000000000..92349be0ee8\n--- /dev/null\n+++ b/contrib/credential/libsecret/meson.build\n@@ -0,0 +1,3 @@\n+glib = dependency('glib-2.0')\n+libsecret = dependency('libsecret-1')\n+executable('git-credential-libsecret', 'git-credential-libsecret.c', dependencies: [glib, libsecret])\ndiff --git a/contrib/credential/meson.build b/contrib/credential/meson.build\nindex 4017ae3fa88..bedc76b96f2 100644\n--- a/contrib/credential/meson.build\n+++ b/contrib/credential/meson.build\n@@ -1,3 +1,6 @@\n if get_option('credential_wincred')\n   subdir('wincred')\n endif\n+if get_option('credential_libsecret')\n+  subdir('libsecret')\n+endif\ndiff --git a/meson_options.txt b/meson_options.txt\nindex 7554528482a..69e386afc2a 100644\n--- a/meson_options.txt\n+++ b/meson_options.txt\n@@ -29,6 +29,8 @@ option('version', type: 'string', value: '',\n # Features supported by Git.\n option('contrib', type: 'array', value: [ 'completion' ], choices: [ 'completion', 'subtree' ],\n   description: 'Contributed features to include.')\n+option('credential_libsecret', type: 'boolean', value: false,\n+  description: 'Build helper git-credential-libsecret. Requires GLib and libsecret.')\n option('credential_wincred', type: 'boolean', value: false,\n   description: 'Build helper git-credential-wincred. Requires Windows SDK.')\n option('curl', type: 'feature', value: 'enabled',\n-- \ngitgitgadget\n"},{"id":"512402","messageId":"Z67MZJbGr0EqOMqT@pks.im","threadId":"62948","inReplyTo":"pull.1859.git.1739471859.gitgitgadget@gmail.com","subject":"Re: [PATCH 0/2] meson: wire up contrib/credential","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-02-14T04:53:56Z","receivedAt":"2025-02-14T04:54:06Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Thu, Feb 13, 2025 at 06:37:37PM +0000, M Hickford via GitGitGadget wrote:\n> It would be neat to also run test t0303-credential-external with\n> GIT_TEST_CREDENTIAL_HELPER=wincred but I couldn't figure out how to do this.\n\nThanks for working on this! I have a patch series sitting locally for a\nwhile that wires up all credential helpers and more, as well. It also\nwires up netrc and fixes its tests to allow out-of-tree testing, which\ndoesn't work right now. What I don't have though is the patch for the\nwincred helper.\n\nThe patch series is currently still blocked on [1], which is why I have\nbeen holding back on it. Would you mind if I picked your patch to fix\nwincred, but we then wait with wiring up remaining credential helpers\nuntil my follow-up patch series is unblocked?\n\nMeanwhile, I'd appreciate any feedback on [1] to help move it forward,\nif you have the time :)\n\nPatrick\n\n[1]: <20250129-b4-pks-meson-improvements-v1-0-ab709f0be12c@pks.im>\n"}]}