git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/2] meson: wire up credential-wincred

From
M Hickford via GitGitGadget <gitgitgadget@gmail.com>
Date
Feb 13, 2025, 18:37 UTC
Message-ID
<7ac8aa63af94e94c30e0429d0e088f6e0f8e5cb4.1739471859.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.1859.git.1739471859.gitgitgadget@gmail.com>
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
Previous: M Hickford via GitGitGadgetNext: M Hickford via GitGitGadget
Message 2 of 4 in “meson: wire up contrib/credential”
  1. 0/2 meson: wire up contrib/credentialM Hickford via GitGitGadget, Feb 13, 2025
  2. 1/2 meson: wire up credential-wincredM Hickford via GitGitGadget, Feb 13, 2025
  3. 2/2 meson: wire up credential-libsecretM Hickford via GitGitGadget, Feb 13, 2025
  4. Patrick SteinhardtFeb 14, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.