{"thread":{"id":"62967","subject":"[PATCH 00/12] meson: wire up bits and pieces from \"contrib/\"","startedAt":"2025-02-18T07:46:07Z","lastAt":"2025-03-31T06:55:07Z","messageCount":37,"participants":["Patrick Steinhardt","M Hickford","Junio C Hamano","Johannes Sixt","Ramsay Jones"],"isPatch":true,"patchVersion":1,"patchTotal":12},"messages":[{"id":"512551","messageId":"20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im","threadId":"62967","inReplyTo":null,"subject":"[PATCH 00/12] meson: wire up bits and pieces from \"contrib/\"","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-02-18T07:45:48Z","receivedAt":"2025-02-18T07:46:07Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"Hi,\n\nthis patch series wires up a couple more bits and pieces, mostly from\n\"contrib/\". Included are:\n\n  - The \"libsecret\", \"netrc\", \"osxkeychain\" and \"wincred\" credential\n    helpers.\n\n  - The git-contact(1) script.\n\n  - Coccinelle via a new \"coccicheck\" target that generates the semantic\n    check.\n\n  - The \"gitk\" graphical repository browser.\n\nNot a lot of stuff is missing after this small patch series, as far as I\nam aware. Omissions that I know of include \"git-gui\", \"sparse\" and perf\ntests.\n\nThis patch series supersedes Mirth's patch series at [1]. I have picked\nthe compilation fix for MSVC from that series and retained authorship,\nbut with an amended commit message. I've also forged the SOB -- Mirth,\nplease let me know whether you're okay with this.\n\nThanks!\n\nPatrick\n\n[1]: <pull.1859.git.1739471859.gitgitgadget@gmail.com>\n\n---\nM Hickford (1):\n      contrib/credential: fix compilation of wincred helper with MSVC\n\nPatrick Steinhardt (11):\n      GIT-BUILD-OPTIONS: propagate project's source directory\n      contrib/credential: fix \"netrc\" tests with out-of-tree builds\n      contrib/credential: fix compiling \"libsecret\" helper\n      contrib/credential: fix compilation of \"osxkeychain\" helper\n      meson: wire up credential helpers\n      meson: wire up git-contacts(1)\n      meson: wire up static analysis via Coccinelle\n      gitk: extract script to build Gitk\n      meson: wire up Gitk\n      ci: fix propagating UTF-8 test locale in musl-based Meson job\n      ci: exercise credential helpers\n\n .github/workflows/main.yml                         |  2 +-\n .gitlab-ci.yml                                     |  2 +-\n GIT-BUILD-OPTIONS.in                               |  3 +-\n Makefile                                           |  3 +-\n ci/install-dependencies.sh                         |  2 +-\n ci/lib.sh                                          | 10 ++-\n contrib/buildsystems/CMakeLists.txt                |  3 +-\n contrib/coccinelle/meson.build                     | 89 ++++++++++++++++++++++\n contrib/contacts/meson.build                       | 55 +++++++++++++\n .../libsecret/git-credential-libsecret.c           | 10 +--\n contrib/credential/libsecret/meson.build           |  9 +++\n contrib/credential/meson.build                     |  3 +\n contrib/credential/netrc/meson.build               | 20 +++++\n contrib/credential/netrc/t-git-credential-netrc.sh |  2 +-\n contrib/credential/netrc/test.pl                   |  7 +-\n .../osxkeychain/git-credential-osxkeychain.c       |  2 +-\n contrib/credential/osxkeychain/meson.build         |  9 +++\n .../credential/wincred/git-credential-wincred.c    |  2 +\n contrib/credential/wincred/meson.build             |  5 ++\n contrib/meson.build                                |  3 +\n gitk-git/Makefile                                  |  7 +-\n gitk-git/generate-tcl.sh                           | 11 +++\n gitk-git/meson.build                               | 28 +++++++\n gitk-git/po/meson.build                            | 19 +++++\n meson.build                                        |  7 +-\n meson_options.txt                                  |  8 +-\n t/lib-gettext.sh                                   |  2 +-\n t/t7609-mergetool--lib.sh                          |  2 +-\n 28 files changed, 294 insertions(+), 31 deletions(-)\n\n\n---\nbase-commit: 03944513488db4a81fdb4c21c3b515e4cb260b05\nchange-id: 20250206-b4-pks-meson-contrib-5d9b3a5d0830\n\n"},{"id":"512552","messageId":"20250218-b4-pks-meson-contrib-v1-1-c3edd292beb8@pks.im","threadId":"62967","inReplyTo":"20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im","subject":"[PATCH 01/12] GIT-BUILD-OPTIONS: propagate project's source directory","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-02-18T07:45:49Z","receivedAt":"2025-02-18T07:46:08Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"A couple of our tests require knowledge around where to find the\nproject's source directory in order to locate files required for the\ntest itself. Until now we have been wiring these up ad-hoc via new,\nspecialized variables catered to the specific usecase. This is quite\nawkward though, as every test that potentially needs to locate paths\nrelative to the source directory needs to grow another variable.\n\nIntroduce a new \"GIT_SOURCE_DIR\" variable into GIT-BUILD-OPTIONS to stop\nthis proliferation. Remove existing variables that can be derived from\nit.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n GIT-BUILD-OPTIONS.in                | 3 +--\n Makefile                            | 3 +--\n contrib/buildsystems/CMakeLists.txt | 3 +--\n meson.build                         | 3 +--\n t/lib-gettext.sh                    | 2 +-\n t/t7609-mergetool--lib.sh           | 2 +-\n 6 files changed, 6 insertions(+), 10 deletions(-)\n\ndiff --git a/GIT-BUILD-OPTIONS.in b/GIT-BUILD-OPTIONS.in\nindex ada575fbcb7..0a9884e0ade 100644\n--- a/GIT-BUILD-OPTIONS.in\n+++ b/GIT-BUILD-OPTIONS.in\n@@ -9,14 +9,13 @@ GIT_PERF_MAKE_COMMAND=@GIT_PERF_MAKE_COMMAND@\n GIT_PERF_MAKE_OPTS=@GIT_PERF_MAKE_OPTS@\n GIT_PERF_REPEAT_COUNT=@GIT_PERF_REPEAT_COUNT@\n GIT_PERF_REPO=@GIT_PERF_REPO@\n+GIT_SOURCE_DIR=@GIT_SOURCE_DIR@\n GIT_TEST_CMP=@GIT_TEST_CMP@\n GIT_TEST_CMP_USE_COPIED_CONTEXT=@GIT_TEST_CMP_USE_COPIED_CONTEXT@\n GIT_TEST_GITPERLLIB=@GIT_TEST_GITPERLLIB@\n GIT_TEST_INDEX_VERSION=@GIT_TEST_INDEX_VERSION@\n-GIT_TEST_MERGE_TOOLS_DIR=@GIT_TEST_MERGE_TOOLS_DIR@\n GIT_TEST_OPTS=@GIT_TEST_OPTS@\n GIT_TEST_PERL_FATAL_WARNINGS=@GIT_TEST_PERL_FATAL_WARNINGS@\n-GIT_TEST_POPATH=@GIT_TEST_POPATH@\n GIT_TEST_TEMPLATE_DIR=@GIT_TEST_TEMPLATE_DIR@\n GIT_TEST_TEXTDOMAINDIR=@GIT_TEST_TEXTDOMAINDIR@\n GIT_TEST_UTF8_LOCALE=@GIT_TEST_UTF8_LOCALE@\ndiff --git a/Makefile b/Makefile\nindex cd0806e1e69..a3483e15c4a 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -3192,14 +3192,13 @@ GIT-BUILD-OPTIONS: FORCE\n \t\t-e \"s|@GIT_PERF_MAKE_OPTS@|\\'$(GIT_PERF_MAKE_OPTS)\\'|\" \\\n \t\t-e \"s|@GIT_PERF_REPEAT_COUNT@|\\'$(GIT_PERF_REPEAT_COUNT)\\'|\" \\\n \t\t-e \"s|@GIT_PERF_REPO@|\\'$(GIT_PERF_REPO)\\'|\" \\\n+\t\t-e \"s|@GIT_SOURCE_DIR@|\\'$(shell pwd)\\'|\" \\\n \t\t-e \"s|@GIT_TEST_CMP@|\\'$(GIT_TEST_CMP)\\'|\" \\\n \t\t-e \"s|@GIT_TEST_CMP_USE_COPIED_CONTEXT@|\\'$(GIT_TEST_CMP_USE_COPIED_CONTEXT)\\'|\" \\\n \t\t-e \"s|@GIT_TEST_GITPERLLIB@|\\'$(shell pwd)/perl/build/lib\\'|\" \\\n \t\t-e \"s|@GIT_TEST_INDEX_VERSION@|\\'$(GIT_TEST_INDEX_VERSION)\\'|\" \\\n-\t\t-e \"s|@GIT_TEST_MERGE_TOOLS_DIR@|\\'$(shell pwd)/mergetools\\'|\" \\\n \t\t-e \"s|@GIT_TEST_OPTS@|\\'$(GIT_TEST_OPTS)\\'|\" \\\n \t\t-e \"s|@GIT_TEST_PERL_FATAL_WARNINGS@|\\'$(GIT_TEST_PERL_FATAL_WARNINGS)\\'|\" \\\n-\t\t-e \"s|@GIT_TEST_POPATH@|\\'$(shell pwd)/po\\'|\" \\\n \t\t-e \"s|@GIT_TEST_TEMPLATE_DIR@|\\'$(shell pwd)/templates/blt\\'|\" \\\n \t\t-e \"s|@GIT_TEST_TEXTDOMAINDIR@|\\'$(shell pwd)/po/build/locale\\'|\" \\\n \t\t-e \"s|@GIT_TEST_UTF8_LOCALE@|\\'$(GIT_TEST_UTF8_LOCALE)\\'|\" \\\ndiff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt\nindex 3179e7ff7a3..c6fbd57e158 100644\n--- a/contrib/buildsystems/CMakeLists.txt\n+++ b/contrib/buildsystems/CMakeLists.txt\n@@ -1169,14 +1169,13 @@ string(REPLACE \"@GIT_PERF_MAKE_COMMAND@\" \"\" git_build_options \"${git_build_optio\n string(REPLACE \"@GIT_PERF_MAKE_OPTS@\" \"\" git_build_options \"${git_build_options}\")\n string(REPLACE \"@GIT_PERF_REPEAT_COUNT@\" \"\" git_build_options \"${git_build_options}\")\n string(REPLACE \"@GIT_PERF_REPO@\" \"\" git_build_options \"${git_build_options}\")\n+string(REPLACE \"@GIT_SOURCE_DIR@\" \"${CMAKE_SOURCE_DIR}\" git_build_options \"${git_build_options}\")\n string(REPLACE \"@GIT_TEST_CMP@\" \"\" git_build_options \"${git_build_options}\")\n string(REPLACE \"@GIT_TEST_CMP_USE_COPIED_CONTEXT@\" \"\" git_build_options \"${git_build_options}\")\n string(REPLACE \"@GIT_TEST_GITPERLLIB@\" \"'${CMAKE_BINARY_DIR}/perl/build/lib'\" git_build_options \"${git_build_options}\")\n string(REPLACE \"@GIT_TEST_INDEX_VERSION@\" \"\" git_build_options \"${git_build_options}\")\n-string(REPLACE \"@GIT_TEST_MERGE_TOOLS_DIR@\" \"'${CMAKE_BINARY_DIR}/mergetools'\" git_build_options \"${git_build_options}\")\n string(REPLACE \"@GIT_TEST_OPTS@\" \"\" git_build_options \"${git_build_options}\")\n string(REPLACE \"@GIT_TEST_PERL_FATAL_WARNINGS@\" \"\" git_build_options \"${git_build_options}\")\n-string(REPLACE \"@GIT_TEST_POPATH@\" \"'${CMAKE_BINARY_DIR}/po'\" git_build_options \"${git_build_options}\")\n string(REPLACE \"@GIT_TEST_TEMPLATE_DIR@\" \"'${CMAKE_BINARY_DIR}/templates/blt'\" git_build_options \"${git_build_options}\")\n string(REPLACE \"@GIT_TEST_TEXTDOMAINDIR@\" \"'${CMAKE_BINARY_DIR}/po/build/locale'\" git_build_options \"${git_build_options}\")\n string(REPLACE \"@GIT_TEST_UTF8_LOCALE@\" \"\" git_build_options \"${git_build_options}\")\ndiff --git a/meson.build b/meson.build\nindex 0df3872c6ad..d77d7b6b603 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -1960,10 +1960,9 @@ subdir('contrib')\n \n foreach key, value : {\n   'DIFF': diff.full_path(),\n+  'GIT_SOURCE_DIR': meson.project_source_root(),\n   'GIT_TEST_CMP': diff.full_path() + ' -u',\n   'GIT_TEST_GITPERLLIB': meson.project_build_root() / 'perl',\n-  'GIT_TEST_MERGE_TOOLS_DIR': meson.project_source_root() / 'mergetools',\n-  'GIT_TEST_POPATH': meson.project_source_root() / 'po',\n   'GIT_TEST_TEMPLATE_DIR': meson.project_build_root() / 'templates',\n   'GIT_TEST_TEXTDOMAINDIR': meson.project_build_root() / 'po',\n   'PAGER_ENV': get_option('pager_environment'),\ndiff --git a/t/lib-gettext.sh b/t/lib-gettext.sh\nindex 7a734c6973e..b3dd68b0b95 100644\n--- a/t/lib-gettext.sh\n+++ b/t/lib-gettext.sh\n@@ -7,7 +7,7 @@\n . ./test-lib.sh\n \n GIT_TEXTDOMAINDIR=\"$GIT_TEST_TEXTDOMAINDIR\"\n-GIT_PO_PATH=\"$GIT_TEST_POPATH\"\n+GIT_PO_PATH=\"$GIT_SOURCE_DIR/po\"\n export GIT_TEXTDOMAINDIR GIT_PO_PATH\n \n if test -n \"$GIT_TEST_INSTALLED\"\ndiff --git a/t/t7609-mergetool--lib.sh b/t/t7609-mergetool--lib.sh\nindex e8e205707e4..af3ad284eed 100755\n--- a/t/t7609-mergetool--lib.sh\n+++ b/t/t7609-mergetool--lib.sh\n@@ -7,7 +7,7 @@ Testing basic merge tools options'\n . ./test-lib.sh\n \n test_expect_success 'mergetool --tool=vimdiff creates the expected layout' '\n-\t. \"$GIT_TEST_MERGE_TOOLS_DIR\"/vimdiff &&\n+\t. \"$GIT_SOURCE_DIR\"/mergetools/vimdiff &&\n \trun_unit_tests\n '\n \n\n-- \n2.48.1.666.gff9fcf71b7.dirty\n\n"},{"id":"512553","messageId":"20250218-b4-pks-meson-contrib-v1-2-c3edd292beb8@pks.im","threadId":"62967","inReplyTo":"20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im","subject":"[PATCH 02/12] contrib/credential: fix \"netrc\" tests with out-of-tree builds","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-02-18T07:45:50Z","receivedAt":"2025-02-18T07:46:09Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"Tests of the \"netrc\" credential helper aren't prepared to handle\nout-of-tree builds:\n\n  - They expect the \"test.pl\" script to be located relative to the build\n    directory, even though it is located in the source directory.\n\n  - They expect the built \"git-credential-netrc\" helper to be located\n    relative to the \"test.pl\" file, evne though it is loated in the\n    build directory.\n\nThis works alright as long as source and build directories are the same,\nbut starts to break apart with Meson.\n\nFix these first issue by using the new \"GIT_SOURCE_DIR\" variable to\nlocate the test script itself. And fix the second issue by introducing a\nnew environment variable \"CREDENTIAL_NETRC_PATH\" that can be set for\nout-of-tree builds to locate the built credential helper.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n contrib/credential/netrc/t-git-credential-netrc.sh | 2 +-\n contrib/credential/netrc/test.pl                   | 7 ++++---\n 2 files changed, 5 insertions(+), 4 deletions(-)\n\ndiff --git a/contrib/credential/netrc/t-git-credential-netrc.sh b/contrib/credential/netrc/t-git-credential-netrc.sh\nindex bf2777308a5..1b7b8b3a9aa 100755\n--- a/contrib/credential/netrc/t-git-credential-netrc.sh\n+++ b/contrib/credential/netrc/t-git-credential-netrc.sh\n@@ -15,7 +15,7 @@\n \n \texport PERL5LIB=\"$GITPERLLIB\"\n \ttest_expect_success 'git-credential-netrc' '\n-\t\tperl \"$GIT_BUILD_DIR\"/contrib/credential/netrc/test.pl\n+\t\tperl \"$GIT_SOURCE_DIR\"/contrib/credential/netrc/test.pl\n \t'\n \n \ttest_done\ndiff --git a/contrib/credential/netrc/test.pl b/contrib/credential/netrc/test.pl\nindex c0fb3718b28..67a0ede5644 100755\n--- a/contrib/credential/netrc/test.pl\n+++ b/contrib/credential/netrc/test.pl\n@@ -15,10 +15,11 @@ BEGIN\n \n my @global_credential_args = @ARGV;\n my $scriptDir = dirname rel2abs $0;\n-my ($netrc, $netrcGpg, $gcNetrc) = map { catfile $scriptDir, $_; }\n+my ($netrc, $netrcGpg) = map { catfile $scriptDir, $_; }\n                                        qw(test.netrc\n-                                          test.netrc.gpg\n-                                          git-credential-netrc);\n+                                          test.netrc.gpg);\n+my $gcNetrc = $ENV{CREDENTIAL_NETRC_PATH} || catfile $scriptDir, qw(git-credential-netrc);\n+\n local $ENV{PATH} = join ':'\n                       , $scriptDir\n                       , $ENV{PATH}\n\n-- \n2.48.1.666.gff9fcf71b7.dirty\n\n"},{"id":"512556","messageId":"20250218-b4-pks-meson-contrib-v1-3-c3edd292beb8@pks.im","threadId":"62967","inReplyTo":"20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im","subject":"[PATCH 03/12] contrib/credential: fix compilation of wincred helper with MSVC","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-02-18T07:45:51Z","receivedAt":"2025-02-18T07:46:09Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"From: M Hickford <mirth.hickford@gmail.com>\n\nThe git-credential-wincred helper does not compile on Windows with\nMicrosoft Visual Studio because of our use of `__attribute__()`, which\nits compiler doesn't support. While the rest of our codebase would know\nto handle this because we redefine the macro in \"compat/msvc.h\", this\nstub isn't available here because we don't include \"git-compat-util.h\"\nin the first place.\n\nFix the issue by making the attribute depend on the `_MSC_VER`\npreprocessor macro.\n\nSigned-off-by: M Hickford <mirth.hickford@gmail.com>\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n contrib/credential/wincred/git-credential-wincred.c | 2 ++\n 1 file changed, 2 insertions(+)\n\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];\n\n-- \n2.48.1.666.gff9fcf71b7.dirty\n\n"},{"id":"512554","messageId":"20250218-b4-pks-meson-contrib-v1-5-c3edd292beb8@pks.im","threadId":"62967","inReplyTo":"20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im","subject":"[PATCH 05/12] contrib/credential: fix compilation of \"osxkeychain\" helper","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-02-18T07:45:53Z","receivedAt":"2025-02-18T07:46:10Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"The \"osxkeychain\" helper does not compile due to a warning generated by\nthe unused `argc` parameter. Fix the warning by checking for the minimum\nnumber of required arguments explicitly in the least restrictive way\npossible.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n contrib/credential/osxkeychain/git-credential-osxkeychain.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/contrib/credential/osxkeychain/git-credential-osxkeychain.c b/contrib/credential/osxkeychain/git-credential-osxkeychain.c\nindex 1c8310d7fef..611c9798b3a 100644\n--- a/contrib/credential/osxkeychain/git-credential-osxkeychain.c\n+++ b/contrib/credential/osxkeychain/git-credential-osxkeychain.c\n@@ -422,7 +422,7 @@ int main(int argc, const char **argv)\n \tconst char *usage =\n \t\t\"usage: git credential-osxkeychain <get|store|erase>\";\n \n-\tif (!argv[1])\n+\tif (argc < 2 || !*argv[1])\n \t\tdie(\"%s\", usage);\n \n \tif (open(argv[0], O_RDONLY | O_EXLOCK) == -1)\n\n-- \n2.48.1.666.gff9fcf71b7.dirty\n\n"},{"id":"512555","messageId":"20250218-b4-pks-meson-contrib-v1-4-c3edd292beb8@pks.im","threadId":"62967","inReplyTo":"20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im","subject":"[PATCH 04/12] contrib/credential: fix compiling \"libsecret\" helper","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-02-18T07:45:52Z","receivedAt":"2025-02-18T07:46:10Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"The \"libsecret\" credential helper does not compile when developer\nwarnings are enabled due to three warnings:\n\n    - contrib/credential/libsecret/git-credential-libsecret.c:78:1:\n      missing initializer for field ‘reserved’ of ‘SecretSchema’\n      [-Werror=missing-field-initializers]. This issue is fixed by using\n      designated initializers.\n\n    - contrib/credential/libsecret/git-credential-libsecret.c:171:43:\n      comparison of integer expressions of different signedness: ‘int’\n      and ‘guint’ {aka ‘unsigned int’} [-Werror=sign-compare]. This\n      issue is fixed by using an unsigned variable to iterate through\n      the string vector.\n\n    - contrib/credential/libsecret/git-credential-libsecret.c:420:14:\n      unused parameter ‘argc’ [-Werror=unused-parameter]. This issue is\n      fixed by checking the number of arguments, but in the least\n      restrictive way possible.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n contrib/credential/libsecret/git-credential-libsecret.c | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)\n\ndiff --git a/contrib/credential/libsecret/git-credential-libsecret.c b/contrib/credential/libsecret/git-credential-libsecret.c\nindex 90034d0cf1e..941b2afd5ee 100644\n--- a/contrib/credential/libsecret/git-credential-libsecret.c\n+++ b/contrib/credential/libsecret/git-credential-libsecret.c\n@@ -59,10 +59,10 @@ static void credential_clear(struct credential *c);\n /* ----------------- Secret Service functions ----------------- */\n \n static const SecretSchema schema = {\n-\t\"org.git.Password\",\n+\t.name = \"org.git.Password\",\n \t/* Ignore schema name during search for backwards compatibility */\n-\tSECRET_SCHEMA_DONT_MATCH_NAME,\n-\t{\n+\t.flags = SECRET_SCHEMA_DONT_MATCH_NAME,\n+\t.attributes = {\n \t\t/*\n \t\t * libsecret assumes attribute values are non-confidential and\n \t\t * unchanging, so we can't include oauth_refresh_token or\n@@ -168,7 +168,7 @@ static int keyring_get(struct credential *c)\n \t\t\t\tg_free(c->password);\n \t\t\t\tc->password = g_strdup(\"\");\n \t\t\t}\n-\t\t\tfor (int i = 1; i < g_strv_length(parts); i++) {\n+\t\t\tfor (guint i = 1; i < g_strv_length(parts); i++) {\n \t\t\t\tif (g_str_has_prefix(parts[i], \"password_expiry_utc=\")) {\n \t\t\t\t\tg_free(c->password_expiry_utc);\n \t\t\t\t\tc->password_expiry_utc = g_strdup(&parts[i][20]);\n@@ -424,7 +424,7 @@ int main(int argc, char *argv[])\n \tstruct credential_operation const *try_op = credential_helper_ops;\n \tstruct credential cred = CREDENTIAL_INIT;\n \n-\tif (!argv[1]) {\n+\tif (argc < 2 || !*argv[1]) {\n \t\tusage(argv[0]);\n \t\texit(EXIT_FAILURE);\n \t}\n\n-- \n2.48.1.666.gff9fcf71b7.dirty\n\n"},{"id":"512557","messageId":"20250218-b4-pks-meson-contrib-v1-6-c3edd292beb8@pks.im","threadId":"62967","inReplyTo":"20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im","subject":"[PATCH 06/12] meson: wire up credential helpers","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-02-18T07:45:54Z","receivedAt":"2025-02-18T07:46:11Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"We've got a couple of credential helpers in \"contrib/credential\", all\nof which aren't yet wired up via Meson. Do so.\n\nNote that ideally, we'd also wire up t0303 to be executed with each of\nthe credential helpers to verify their functionality. Unfortunately\nthough, none of them pass the test suite right now, so this is left for\na future change.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n contrib/credential/libsecret/meson.build   |  9 +++++++++\n contrib/credential/meson.build             |  3 +++\n contrib/credential/netrc/meson.build       | 20 ++++++++++++++++++++\n contrib/credential/osxkeychain/meson.build |  9 +++++++++\n contrib/credential/wincred/meson.build     |  5 +++++\n contrib/meson.build                        |  2 ++\n meson.build                                |  2 +-\n meson_options.txt                          |  2 ++\n 8 files changed, 51 insertions(+), 1 deletion(-)\n\ndiff --git a/contrib/credential/libsecret/meson.build b/contrib/credential/libsecret/meson.build\nnew file mode 100644\nindex 00000000000..0137660fe02\n--- /dev/null\n+++ b/contrib/credential/libsecret/meson.build\n@@ -0,0 +1,9 @@\n+executable('git-credential-libsecret',\n+  sources: 'git-credential-libsecret.c',\n+  dependencies: [\n+    dependency('glib-2.0'),\n+    dependency('libsecret-1'),\n+  ],\n+  install: true,\n+  install_dir: get_option('libexecdir') / 'git-core',\n+)\ndiff --git a/contrib/credential/meson.build b/contrib/credential/meson.build\nnew file mode 100644\nindex 00000000000..4216296ae05\n--- /dev/null\n+++ b/contrib/credential/meson.build\n@@ -0,0 +1,3 @@\n+foreach helper : get_option('credential_helpers')\n+  subdir(helper)\n+endforeach\ndiff --git a/contrib/credential/netrc/meson.build b/contrib/credential/netrc/meson.build\nnew file mode 100644\nindex 00000000000..a990dbb86da\n--- /dev/null\n+++ b/contrib/credential/netrc/meson.build\n@@ -0,0 +1,20 @@\n+credential_netrc = custom_target(\n+  input: 'git-credential-netrc.perl',\n+  output: 'git-credential-netrc',\n+  command: generate_perl_command,\n+  depends: [git_version_file],\n+  install: true,\n+  install_dir: get_option('libexecdir') / 'git-core',\n+)\n+\n+credential_netrc_testenv = test_environment\n+credential_netrc_testenv.set('CREDENTIAL_NETRC_PATH', credential_netrc.full_path())\n+\n+test('t-git-credential-netrc',\n+  shell,\n+  args: [ meson.current_source_dir() / 't-git-credential-netrc.sh' ],\n+  workdir: meson.current_source_dir(),\n+  env: credential_netrc_testenv,\n+  depends: test_dependencies + bin_wrappers + [credential_netrc],\n+  timeout: 0,\n+)\ndiff --git a/contrib/credential/osxkeychain/meson.build b/contrib/credential/osxkeychain/meson.build\nnew file mode 100644\nindex 00000000000..3c7677f736c\n--- /dev/null\n+++ b/contrib/credential/osxkeychain/meson.build\n@@ -0,0 +1,9 @@\n+executable('git-credential-osxkeychain',\n+  sources: 'git-credential-osxkeychain.c',\n+  dependencies: [\n+    dependency('CoreFoundation'),\n+    dependency('Security'),\n+  ],\n+  install: true,\n+  install_dir: get_option('libexecdir') / 'git-core',\n+)\ndiff --git a/contrib/credential/wincred/meson.build b/contrib/credential/wincred/meson.build\nnew file mode 100644\nindex 00000000000..6de23ca17d4\n--- /dev/null\n+++ b/contrib/credential/wincred/meson.build\n@@ -0,0 +1,5 @@\n+executable('git-credential-wincred',\n+  sources: 'git-credential-wincred.c',\n+  install: true,\n+  install_dir: get_option('libexecdir') / 'git-core',\n+)\ndiff --git a/contrib/meson.build b/contrib/meson.build\nindex d74b64a5181..569c23ee768 100644\n--- a/contrib/meson.build\n+++ b/contrib/meson.build\n@@ -1,3 +1,5 @@\n foreach feature : get_option('contrib')\n   subdir(feature)\n endforeach\n+\n+subdir('credential')\ndiff --git a/meson.build b/meson.build\nindex d77d7b6b603..20159cef83d 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -771,7 +771,7 @@ endif\n # features. It is optional if you want to neither execute tests nor use any of\n # these optional features.\n perl_required = get_option('perl')\n-if get_option('tests') or get_option('gitweb').enabled()\n+if get_option('tests') or get_option('gitweb').enabled() or 'netrc' in get_option('credential_helpers')\n   perl_required = true\n endif\n \ndiff --git a/meson_options.txt b/meson_options.txt\nindex 5c12e9055e6..0b0708dd0ed 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_helpers', type: 'array', value: [ ], choices: [ 'libsecret', 'netrc', 'osxkeychain', 'wincred' ],\n+  description: 'Contributed features to include.')\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\n-- \n2.48.1.666.gff9fcf71b7.dirty\n\n"},{"id":"512558","messageId":"20250218-b4-pks-meson-contrib-v1-7-c3edd292beb8@pks.im","threadId":"62967","inReplyTo":"20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im","subject":"[PATCH 07/12] meson: wire up git-contacts(1)","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-02-18T07:45:55Z","receivedAt":"2025-02-18T07:46:12Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"Wire up the build for git-contacts(1) in Meson.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n contrib/contacts/meson.build | 55 ++++++++++++++++++++++++++++++++++++++++++++\n meson_options.txt            |  2 +-\n 2 files changed, 56 insertions(+), 1 deletion(-)\n\ndiff --git a/contrib/contacts/meson.build b/contrib/contacts/meson.build\nnew file mode 100644\nindex 00000000000..6ec92f47c43\n--- /dev/null\n+++ b/contrib/contacts/meson.build\n@@ -0,0 +1,55 @@\n+custom_target(\n+  input: 'git-contacts',\n+  output: 'git-contacts',\n+  command: generate_perl_command,\n+  depends: [git_version_file],\n+  install: true,\n+  install_dir: get_option('libexecdir') / 'git-core',\n+)\n+\n+if get_option('docs').contains('man')\n+  contacts_xml = custom_target(\n+    command: asciidoc_common_options + [\n+      '--backend=' + asciidoc_docbook,\n+      '--doctype=manpage',\n+      '--out-file=@OUTPUT@',\n+      '@INPUT@',\n+    ],\n+    depends: documentation_deps,\n+    input: 'git-contacts.txt',\n+    output: 'git-contacts.xml',\n+  )\n+\n+  custom_target(\n+    command: [\n+      xmlto,\n+      '-m', '@INPUT@',\n+      'man',\n+      contacts_xml,\n+      '-o',\n+      meson.current_build_dir(),\n+    ] + xmlto_extra,\n+    input: [\n+      '../../Documentation/manpage-normal.xsl',\n+    ],\n+    output: 'git-contacts.1',\n+    install: true,\n+    install_dir: get_option('mandir') / 'man1',\n+  )\n+endif\n+\n+if get_option('docs').contains('html')\n+  custom_target(\n+    command: asciidoc_common_options + [\n+      '--backend=' + asciidoc_html,\n+      '--doctype=manpage',\n+      '--out-file=@OUTPUT@',\n+      '@INPUT@',\n+    ],\n+    depends: documentation_deps,\n+    input: 'git-contacts.txt',\n+    output: 'git-contacts.html',\n+    install: true,\n+    install_dir: get_option('datadir') / 'doc/git-doc',\n+  )\n+endif\ndiff --git a/meson_options.txt b/meson_options.txt\nindex 0b0708dd0ed..c51ba88d853 100644\n--- a/meson_options.txt\n+++ b/meson_options.txt\n@@ -27,7 +27,7 @@ option('version', type: 'string', value: '',\n   description: 'Version string reported by git-version(1) and other tools.')\n \n # Features supported by Git.\n-option('contrib', type: 'array', value: [ 'completion' ], choices: [ 'completion', 'subtree' ],\n+option('contrib', type: 'array', value: [ 'completion' ], choices: [ 'completion', 'contacts', 'subtree' ],\n   description: 'Contributed features to include.')\n option('credential_helpers', type: 'array', value: [ ], choices: [ 'libsecret', 'netrc', 'osxkeychain', 'wincred' ],\n   description: 'Contributed features to include.')\n\n-- \n2.48.1.666.gff9fcf71b7.dirty\n\n"},{"id":"512559","messageId":"20250218-b4-pks-meson-contrib-v1-8-c3edd292beb8@pks.im","threadId":"62967","inReplyTo":"20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im","subject":"[PATCH 08/12] meson: wire up static analysis via Coccinelle","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-02-18T07:45:56Z","receivedAt":"2025-02-18T07:46:13Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"Wire up static analysis via Coccinelle via a new test target\n\"coccicheck\". This target can be executed via `meson compile coccicheck`\nand generates the semantic patch for us.\n\nNote that we don't hardcode the list of source and header files that\nshall be analyzed, and instead use git-ls-files(1) to find them for us.\nThis is because we also want to analyze files that may not get built on\nthe current platform, so finding all sources at configure time is easier\nthan introducing a new variable that tracks all sources, including those\nwhich aren't being built.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n contrib/coccinelle/meson.build | 89 ++++++++++++++++++++++++++++++++++++++++++\n contrib/meson.build            |  1 +\n meson_options.txt              |  2 +\n 3 files changed, 92 insertions(+)\n\ndiff --git a/contrib/coccinelle/meson.build b/contrib/coccinelle/meson.build\nnew file mode 100644\nindex 00000000000..5d76a7fee6f\n--- /dev/null\n+++ b/contrib/coccinelle/meson.build\n@@ -0,0 +1,89 @@\n+spatch = find_program('spatch', required: get_option('coccinelle'))\n+if not spatch.found()\n+  subdir_done()\n+endif\n+\n+third_party_sources = [\n+  ':!contrib',\n+  ':!compat/inet_ntop.c',\n+  ':!compat/inet_pton.c',\n+  ':!compat/nedmalloc',\n+  ':!compat/obstack.*',\n+  ':!compat/poll',\n+  ':!compat/regex',\n+  ':!sha1collisiondetection',\n+  ':!sha1dc',\n+  ':!t/unit-tests/clar',\n+  ':!t/unit-tests/clar',\n+  ':!t/t[0-9][0-9][0-9][0-9]*',\n+]\n+\n+rules = [\n+  'array.cocci',\n+  'commit.cocci',\n+  'config_fn_ctx.pending.cocci',\n+  'equals-null.cocci',\n+  'flex_alloc.cocci',\n+  'free.cocci',\n+  'git_config_number.cocci',\n+  'hashmap.cocci',\n+  'index-compatibility.cocci',\n+  'object_id.cocci',\n+  'preincr.cocci',\n+  'qsort.cocci',\n+  'refs.cocci',\n+  'strbuf.cocci',\n+  'swap.cocci',\n+  'the_repository.cocci',\n+  'xcalloc.cocci',\n+  'xopen.cocci',\n+  'xstrdup_or_null.cocci',\n+  'xstrncmpz.cocci',\n+]\n+\n+concatenated_rules = custom_target(\n+  command: [\n+    'cat', '@INPUT@',\n+  ],\n+  input: rules,\n+  output: 'rules.cocci',\n+  capture: true,\n+)\n+\n+sources = [ ]\n+foreach source : run_command(git, '-C', meson.project_source_root(), 'ls-files', '--deduplicate', '*.c', third_party_sources, check: true).stdout().split()\n+  sources += source\n+endforeach\n+\n+headers = [ ]\n+foreach header : run_command(git, '-C', meson.project_source_root(), 'ls-files', '--deduplicate', '*.h', third_party_sources, check: true).stdout().split()\n+  headers += meson.project_source_root() / header\n+endforeach\n+\n+patches = [ ]\n+foreach source : sources\n+  patches += custom_target(\n+    command: [\n+      spatch,\n+      '--all-includes',\n+      '--sp-file', concatenated_rules,\n+      '--patch', meson.project_source_root(),\n+      '@INPUT@',\n+    ],\n+    input: meson.project_source_root() / source,\n+    output: source.underscorify() + '.patch',\n+    capture: true,\n+    depend_files: headers,\n+  )\n+endforeach\n+\n+concatenated_patch = custom_target(\n+  command: [\n+    'cat', '@INPUT@',\n+  ],\n+  input: patches,\n+  output: 'cocci.patch',\n+  capture: true,\n+)\n+\n+alias_target('coccicheck', concatenated_patch)\ndiff --git a/contrib/meson.build b/contrib/meson.build\nindex 569c23ee768..a88c5dfe09e 100644\n--- a/contrib/meson.build\n+++ b/contrib/meson.build\n@@ -2,4 +2,5 @@ foreach feature : get_option('contrib')\n   subdir(feature)\n endforeach\n \n+subdir('coccinelle')\n subdir('credential')\ndiff --git a/meson_options.txt b/meson_options.txt\nindex c51ba88d853..afa908d6c53 100644\n--- a/meson_options.txt\n+++ b/meson_options.txt\n@@ -101,6 +101,8 @@ option('docs_backend', type: 'combo', choices: ['asciidoc', 'asciidoctor', 'auto\n   description: 'Which backend to use to generate documentation.')\n \n # Testing.\n+option('coccinelle', type: 'feature', value: 'auto',\n+  description: 'Provide a coccicheck target that generates a Coccinelle patch.')\n option('tests', type: 'boolean', value: true,\n   description: 'Enable building tests. This requires Perl, but is separate from the \"perl\" option such that you can build tests without Perl features enabled.')\n option('test_output_directory', type: 'string',\n\n-- \n2.48.1.666.gff9fcf71b7.dirty\n\n"},{"id":"512560","messageId":"20250218-b4-pks-meson-contrib-v1-9-c3edd292beb8@pks.im","threadId":"62967","inReplyTo":"20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im","subject":"[PATCH 09/12] gitk: extract script to build Gitk","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-02-18T07:45:57Z","receivedAt":"2025-02-18T07:46:14Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"Extract the script that \"builds\" Gitk from our Makefile so that we can\nreuse it in Meson.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n gitk-git/Makefile        |  7 +++----\n gitk-git/generate-tcl.sh | 11 +++++++++++\n 2 files changed, 14 insertions(+), 4 deletions(-)\n\ndiff --git a/gitk-git/Makefile b/gitk-git/Makefile\nindex e1f0aff4a19..a396eef581e 100644\n--- a/gitk-git/Makefile\n+++ b/gitk-git/Makefile\n@@ -8,6 +8,7 @@ gitk_libdir   ?= $(sharedir)/gitk/lib\n msgsdir    ?= $(gitk_libdir)/msgs\n msgsdir_SQ  = $(subst ','\\'',$(msgsdir))\n \n+SHELL_PATH ?= /bin/sh\n TCL_PATH ?= tclsh\n TCLTK_PATH ?= wish\n INSTALL ?= install\n@@ -63,10 +64,8 @@ clean::\n \t$(RM) gitk-wish po/*.msg GIT-TCLTK-VARS\n \n gitk-wish: gitk GIT-TCLTK-VARS\n-\t$(QUIET_GEN)$(RM) $@ $@+ && \\\n-\tsed -e '1,3s|^exec .* \"$$0\"|exec $(subst |,'\\|',$(TCLTK_PATH_SQ)) \"$$0\"|' <gitk >$@+ && \\\n-\tchmod +x $@+ && \\\n-\tmv -f $@+ $@\n+\t$(QUIET_GEN)$(RM) $@ $@+\n+\t$(QUIET_GEN)$(SHELL_PATH) ./generate-tcl.sh \"$(TCLTK_PATH_SQ)\" \"$<\" \"$@\"\n \n $(PO_TEMPLATE): gitk\n \t$(XGETTEXT) -kmc -LTcl -o $@ gitk\ndiff --git a/gitk-git/generate-tcl.sh b/gitk-git/generate-tcl.sh\nnew file mode 100755\nindex 00000000000..46bba6d2464\n--- /dev/null\n+++ b/gitk-git/generate-tcl.sh\n@@ -0,0 +1,11 @@\n+#!/bin/sh\n+\n+set -e\n+\n+WISH=$(echo \"$1\" | sed 's/|/\\\\|/g')\n+INPUT=\"$2\"\n+OUTPUT=\"$3\"\n+\n+sed -e \"1,3s|^exec .* \\\"\\$0\\\"|exec $WISH \\\"\\$0\\\"|\" \"$INPUT\" >\"$OUTPUT\"+\n+chmod a+x \"$OUTPUT\"+\n+mv \"$OUTPUT\"+ \"$OUTPUT\"\n\n-- \n2.48.1.666.gff9fcf71b7.dirty\n\n"},{"id":"512562","messageId":"20250218-b4-pks-meson-contrib-v1-10-c3edd292beb8@pks.im","threadId":"62967","inReplyTo":"20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im","subject":"[PATCH 10/12] meson: wire up Gitk","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-02-18T07:45:58Z","receivedAt":"2025-02-18T07:46:15Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"Wire up the Gitk graphical repository browser in Meson.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n gitk-git/meson.build    | 28 ++++++++++++++++++++++++++++\n gitk-git/po/meson.build | 19 +++++++++++++++++++\n meson.build             |  2 ++\n meson_options.txt       |  2 ++\n 4 files changed, 51 insertions(+)\n\ndiff --git a/gitk-git/meson.build b/gitk-git/meson.build\nnew file mode 100644\nindex 00000000000..7b16cd3c4d3\n--- /dev/null\n+++ b/gitk-git/meson.build\n@@ -0,0 +1,28 @@\n+wish = find_program('wish', required: get_option('gitk'))\n+gitk_enabled = wish.found()\n+\n+if not gitk_enabled\n+  subdir_done()\n+endif\n+\n+custom_target(\n+  command: [\n+    shell,\n+    meson.current_source_dir() / 'generate-tcl.sh',\n+    wish.full_path(),\n+    '@INPUT@',\n+    '@OUTPUT@',\n+  ],\n+  input: 'gitk',\n+  output: 'gitk',\n+  depend_files: [\n+    'generate-tcl.sh',\n+  ],\n+  env: script_environment,\n+  install: true,\n+  install_dir: get_option('bindir'),\n+)\n+\n+if intl.found()\n+  subdir('po')\n+endif\ndiff --git a/gitk-git/po/meson.build b/gitk-git/po/meson.build\nnew file mode 100644\nindex 00000000000..b1ed0198285\n--- /dev/null\n+++ b/gitk-git/po/meson.build\n@@ -0,0 +1,19 @@\n+import('i18n').gettext('gitk',\n+  languages: [\n+    'bg',\n+    'ca',\n+    'de',\n+    'es',\n+    'fr',\n+    'hu',\n+    'it',\n+    'ja',\n+    'pt_br',\n+    'pt_pt',\n+    'ru',\n+    'sv',\n+    'vi',\n+    'zh_cn',\n+  ],\n+  install: true,\n+)\ndiff --git a/meson.build b/meson.build\nindex 20159cef83d..5f2db6b0419 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -1957,6 +1957,7 @@ if get_option('docs') != []\n endif\n \n subdir('contrib')\n+subdir('gitk-git')\n \n foreach key, value : {\n   'DIFF': diff.full_path(),\n@@ -2010,6 +2011,7 @@ summary({\n   'curl': curl.found(),\n   'expat': expat.found(),\n   'gettext': intl.found(),\n+  'gitk': gitk_enabled,\n   'gitweb': gitweb_option.allowed(),\n   'https': https_backend,\n   'iconv': iconv.found(),\ndiff --git a/meson_options.txt b/meson_options.txt\nindex afa908d6c53..4cce8a81154 100644\n--- a/meson_options.txt\n+++ b/meson_options.txt\n@@ -41,6 +41,8 @@ option('gitweb', type: 'feature', value: 'auto',\n   description: 'Build Git web interface. Requires Perl.')\n option('iconv', type: 'feature', value: 'auto',\n   description: 'Support reencoding strings with different encodings.')\n+option('gitk', type: 'feature', value: 'auto',\n+  description: 'Build and install gitk(1), which requires Tcl.')\n option('pcre2', type: 'feature', value: 'enabled',\n   description: 'Support Perl-compatible regular expressions in e.g. git-grep(1).')\n option('perl', type: 'feature', value: 'auto',\n\n-- \n2.48.1.666.gff9fcf71b7.dirty\n\n"},{"id":"512563","messageId":"20250218-b4-pks-meson-contrib-v1-11-c3edd292beb8@pks.im","threadId":"62967","inReplyTo":"20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im","subject":"[PATCH 11/12] ci: fix propagating UTF-8 test locale in musl-based Meson job","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-02-18T07:45:59Z","receivedAt":"2025-02-18T07:46:16Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"The musl-based Meson job is supposed to explicitly specify the UTF-8\nlocale used for testing, which has been introduced with 84bb5eeace7 (ci:\nswitch linux-musl to use Meson, 2025-01-28). That commit had two issues\nthough:\n\n  - We continue to refer to \"linux-musl\", even though the job has been\n    renamed in the same commit to \"linux-musl-meson\".\n\n  - We use the wrong option name to specify the locale. This was not\n    noticed though due to the first issue.\n\nFix both of these issues by fixing both the job and option naems.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n ci/lib.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/ci/lib.sh b/ci/lib.sh\nindex 028fea0e7b5..84d11452650 100755\n--- a/ci/lib.sh\n+++ b/ci/lib.sh\n@@ -348,8 +348,8 @@ case \"$jobname\" in\n linux32)\n \tCC=gcc\n \t;;\n-linux-musl)\n-\tMESONFLAGS=\"$MESONFLAGS -DGIT_TEST_UTF8_LOCALE=C.UTF-8\"\n+linux-musl-meson)\n+\tMESONFLAGS=\"$MESONFLAGS -Dtest_utf8_locale=C.UTF-8\"\n \t;;\n linux-leaks|linux-reftable-leaks)\n \texport SANITIZE=leak\n\n-- \n2.48.1.666.gff9fcf71b7.dirty\n\n"},{"id":"512561","messageId":"20250218-b4-pks-meson-contrib-v1-12-c3edd292beb8@pks.im","threadId":"62967","inReplyTo":"20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im","subject":"[PATCH 12/12] ci: exercise credential helpers","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-02-18T07:46:00Z","receivedAt":"2025-02-18T07:46:17Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"Wire up credential helpers in our CI runs so that we can rest assured\nthat they compile and (if tests are available) function correctly.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n .github/workflows/main.yml | 2 +-\n .gitlab-ci.yml             | 2 +-\n ci/install-dependencies.sh | 2 +-\n ci/lib.sh                  | 6 ++++++\n 4 files changed, 9 insertions(+), 3 deletions(-)\n\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex 5f756dfc2e2..9959b61ece2 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -265,7 +265,7 @@ jobs:\n       run: pip install meson ninja\n     - name: Setup\n       shell: pwsh\n-      run: meson setup build -Dperl=disabled\n+      run: meson setup build -Dperl=disabled -Dcredential_helpers=wincred\n     - name: Compile\n       shell: pwsh\n       run: meson compile -C build\ndiff --git a/.gitlab-ci.yml b/.gitlab-ci.yml\nindex 3f29181708f..bb7d0c9ef1c 100644\n--- a/.gitlab-ci.yml\n+++ b/.gitlab-ci.yml\n@@ -164,7 +164,7 @@ build:msvc-meson:\n   extends: .msvc-meson\n   stage: build\n   script:\n-    - meson setup build -Dperl=disabled\n+    - meson setup build -Dperl=disabled -Dcredential_helpers=wincred\n     - meson compile -C build\n   artifacts:\n     paths:\ndiff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh\nindex 332ba960039..0df74610d06 100755\n--- a/ci/install-dependencies.sh\n+++ b/ci/install-dependencies.sh\n@@ -58,7 +58,7 @@ ubuntu-*|i386/ubuntu-*|debian-*)\n \t\tmake libssl-dev libcurl4-openssl-dev libexpat-dev wget sudo default-jre \\\n \t\ttcl tk gettext zlib1g-dev perl-modules liberror-perl libauthen-sasl-perl \\\n \t\tlibemail-valid-perl libio-pty-perl libio-socket-ssl-perl libnet-smtp-ssl-perl libdbd-sqlite3-perl libcgi-pm-perl \\\n-\t\tlibpcre2-dev meson ninja-build pkg-config \\\n+\t\tlibsecret-1-dev libpcre2-dev meson ninja-build pkg-config \\\n \t\t${CC_PACKAGE:-${CC:-gcc}} $PYTHON_PACKAGE\n \n \tcase \"$distro\" in\ndiff --git a/ci/lib.sh b/ci/lib.sh\nindex 84d11452650..f561884d401 100755\n--- a/ci/lib.sh\n+++ b/ci/lib.sh\n@@ -348,6 +348,9 @@ case \"$jobname\" in\n linux32)\n \tCC=gcc\n \t;;\n+linux-meson)\n+\tMESONFLAGS=\"$MESONFLAGS -Dcredential_helpers=libsecret,netrc\"\n+\t;;\n linux-musl-meson)\n \tMESONFLAGS=\"$MESONFLAGS -Dtest_utf8_locale=C.UTF-8\"\n \t;;\n@@ -359,6 +362,9 @@ linux-asan-ubsan)\n \texport NO_SVN_TESTS=LetsSaveSomeTime\n \tMAKEFLAGS=\"$MAKEFLAGS NO_PYTHON=YepBecauseP4FlakesTooOften\"\n \t;;\n+osx-meson)\n+\tMESONFLAGS=\"$MESONFLAGS -Dcredential_helpers=osxkeychain\"\n+\t;;\n esac\n \n MAKEFLAGS=\"$MAKEFLAGS CC=${CC:-cc}\"\n\n-- \n2.48.1.666.gff9fcf71b7.dirty\n\n"},{"id":"512586","messageId":"CAGJzqsnvbe8cf6_CN-CY3D0NmtDy1sMEOztH4pCqEjyA6qvf=w@mail.gmail.com","threadId":"62967","inReplyTo":"20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im","subject":"Re: [PATCH 00/12] meson: wire up bits and pieces from \"contrib/\"","fromName":"M Hickford","fromEmail":"mirth.hickford@gmail.com","sentAt":"2025-02-18T10:10:05Z","receivedAt":"2025-02-18T10:10:55Z","isPatch":true,"sender":{"key":"mirth.hickford@gmail.com","avatar":"https://avatars.githubusercontent.com/u/105314?v=4"},"body":"> This patch series supersedes Mirth's patch series at [1]. I have picked\n> the compilation fix for MSVC from that series and retained authorship,\n> but with an amended commit message. I've also forged the SOB -- Mirth,\n> please let me know whether you're okay with this.\n\nGreat work, thanks Patrick\n"},{"id":"512587","messageId":"CAGJzqs=+mL_GyXfR44iQ6o6L+gb=D7DWm2Bq4eW19XhuEFuHew@mail.gmail.com","threadId":"62967","inReplyTo":"20250218-b4-pks-meson-contrib-v1-6-c3edd292beb8@pks.im","subject":"Re: [PATCH 06/12] meson: wire up credential helpers","fromName":"M Hickford","fromEmail":"mirth.hickford@gmail.com","sentAt":"2025-02-18T10:11:23Z","receivedAt":"2025-02-18T10:12:18Z","isPatch":true,"sender":{"key":"mirth.hickford@gmail.com","avatar":"https://avatars.githubusercontent.com/u/105314?v=4"},"body":"> Note that ideally, we'd also wire up t0303 to be executed with each of\n> the credential helpers to verify their functionality. Unfortunately\n> though, none of them pass the test suite right now, so this is left for\n> a future change.\n\nOut of curiosity, which tests failed?\n"},{"id":"512588","messageId":"Z7RrbZqq9VrTg-Bz@pks.im","threadId":"62967","inReplyTo":"CAGJzqs=+mL_GyXfR44iQ6o6L+gb=D7DWm2Bq4eW19XhuEFuHew@mail.gmail.com","subject":"Re: [PATCH 06/12] meson: wire up credential helpers","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-02-18T11:13:49Z","receivedAt":"2025-02-18T11:13:59Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Tue, Feb 18, 2025 at 10:11:23AM +0000, M Hickford wrote:\n> > Note that ideally, we'd also wire up t0303 to be executed with each of\n> > the credential helpers to verify their functionality. Unfortunately\n> > though, none of them pass the test suite right now, so this is left for\n> > a future change.\n> \n> Out of curiosity, which tests failed?\n\nBasically all of them. I originally had the patch at the bottom of this\nemail. With that in place, we re-run t0303 for every configured\ncredential helper, where `GIT_TEST_CREDENTIAL_HELPER` is set to the\nrespective credential helper under test. We have to disable parallel\ntests there because the test state directories would otherwise conflict\nwith one another.\n\nNow you can for example:\n\n    $ meson setup build -Dcredential_helpers=libsecret,netrc\n    $ meson test -C build t0303-*\n\nAnd that shows failures like:\n\n    --- expect-stderr\t2025-02-18 11:09:33.323668205 +0000\n    +++ stderr\t2025-02-18 11:09:33.347668278 +0000\n    @@ -1,2 +1,4 @@\n    +\n    +** (process:75536): CRITICAL **: 11:09:33.339: lookup failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.secrets was not provided by any .service files\n     askpass: Username for 'https://example.com':\n     askpass: Password for 'https://askpass-username@example.com':\n    error: last command exited with $?=1\n    not ok 1 - helper (/home/pks/Development/git/build/contrib/credential/libsecret/git-credential-libsecret) has no existing data\n\nI might be missing how exactly to set all of this up so that things\nactually work. Maybe I have to do something specific for each of the\nhelpers via `GIT_TEST_CREDENTIAL_HELPER_SETUP`. But t0303 isn't wired up\nvia our Makefiles for any of the helpers, as far as I can see, so I'm\nunable to figure out what such a setup would look like.\n\nAny hints would be welcome.\n\nPatrick\n\n--- >8 ---\n\ndiff --git a/contrib/credential/libsecret/meson.build b/contrib/credential/libsecret/meson.build\nindex 0137660fe02..cb5f7280823 100644\n--- a/contrib/credential/libsecret/meson.build\n+++ b/contrib/credential/libsecret/meson.build\n@@ -1,4 +1,4 @@\n-executable('git-credential-libsecret',\n+credential_helpers += executable('git-credential-libsecret',\n   sources: 'git-credential-libsecret.c',\n   dependencies: [\n     dependency('glib-2.0'),\ndiff --git a/contrib/credential/meson.build b/contrib/credential/meson.build\nindex 4216296ae05..f04525b728e 100644\n--- a/contrib/credential/meson.build\n+++ b/contrib/credential/meson.build\n@@ -1,3 +1,20 @@\n+credential_helpers = []\n+\n foreach helper : get_option('credential_helpers')\n   subdir(helper)\n endforeach\n+\n+foreach helper : credential_helpers\n+  helper_test_environment = test_environment\n+  helper_test_environment.set('GIT_TEST_CREDENTIAL_HELPER', helper.full_path())\n+\n+  test('t0303-credential-external-' + fs.stem(helper.full_path()),\n+    shell,\n+    args: [ meson.project_source_root() / 't/t0303-credential-external.sh' ],\n+    workdir: meson.project_source_root() / 't',\n+    env: helper_test_environment,\n+    depends: test_dependencies + bin_wrappers + helper,\n+    timeout: 0,\n+    is_parallel: false,\n+  )\n+endforeach\ndiff --git a/contrib/credential/netrc/meson.build b/contrib/credential/netrc/meson.build\nindex a990dbb86da..110eac8f2f8 100644\n--- a/contrib/credential/netrc/meson.build\n+++ b/contrib/credential/netrc/meson.build\n@@ -6,6 +6,7 @@ credential_netrc = custom_target(\n   install: true,\n   install_dir: get_option('libexecdir') / 'git-core',\n )\n+credential_helpers += credential_netrc\n \n credential_netrc_testenv = test_environment\n credential_netrc_testenv.set('CREDENTIAL_NETRC_PATH', credential_netrc.full_path())\ndiff --git a/contrib/credential/osxkeychain/meson.build b/contrib/credential/osxkeychain/meson.build\nindex 3c7677f736c..545a8a25b4b 100644\n--- a/contrib/credential/osxkeychain/meson.build\n+++ b/contrib/credential/osxkeychain/meson.build\n@@ -1,4 +1,4 @@\n-executable('git-credential-osxkeychain',\n+credential_helpers += executable('git-credential-osxkeychain',\n   sources: 'git-credential-osxkeychain.c',\n   dependencies: [\n     dependency('CoreFoundation'),\ndiff --git a/contrib/credential/wincred/meson.build b/contrib/credential/wincred/meson.build\nindex 6de23ca17d4..fa669f038fe 100644\n--- a/contrib/credential/wincred/meson.build\n+++ b/contrib/credential/wincred/meson.build\n@@ -1,4 +1,4 @@\n-executable('git-credential-wincred',\n+credential_helpers += executable('git-credential-wincred',\n   sources: 'git-credential-wincred.c',\n   install: true,\n   install_dir: get_option('libexecdir') / 'git-core',\n"},{"id":"512644","messageId":"xmqqeczuj3fc.fsf@gitster.g","threadId":"62967","inReplyTo":"20250218-b4-pks-meson-contrib-v1-9-c3edd292beb8@pks.im","subject":"Re: [PATCH 09/12] gitk: extract script to build Gitk","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-02-18T22:25:43Z","receivedAt":"2025-02-18T22:25:46Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Patrick Steinhardt <ps@pks.im> writes:\n\n> Extract the script that \"builds\" Gitk from our Makefile so that we can\n> reuse it in Meson.\n>\n> Signed-off-by: Patrick Steinhardt <ps@pks.im>\n> ---\n>  gitk-git/Makefile        |  7 +++----\n>  gitk-git/generate-tcl.sh | 11 +++++++++++\n>  2 files changed, 14 insertions(+), 4 deletions(-)\n\nYou would want to coordinate this with Johannes Sixt, who may still\nwant to maintain the subtree arrangement.\n\nThanks.\n\n\n> diff --git a/gitk-git/Makefile b/gitk-git/Makefile\n> index e1f0aff4a19..a396eef581e 100644\n> --- a/gitk-git/Makefile\n> +++ b/gitk-git/Makefile\n> @@ -8,6 +8,7 @@ gitk_libdir   ?= $(sharedir)/gitk/lib\n>  msgsdir    ?= $(gitk_libdir)/msgs\n>  msgsdir_SQ  = $(subst ','\\'',$(msgsdir))\n>  \n> +SHELL_PATH ?= /bin/sh\n>  TCL_PATH ?= tclsh\n>  TCLTK_PATH ?= wish\n>  INSTALL ?= install\n> @@ -63,10 +64,8 @@ clean::\n>  \t$(RM) gitk-wish po/*.msg GIT-TCLTK-VARS\n>  \n>  gitk-wish: gitk GIT-TCLTK-VARS\n> -\t$(QUIET_GEN)$(RM) $@ $@+ && \\\n> -\tsed -e '1,3s|^exec .* \"$$0\"|exec $(subst |,'\\|',$(TCLTK_PATH_SQ)) \"$$0\"|' <gitk >$@+ && \\\n> -\tchmod +x $@+ && \\\n> -\tmv -f $@+ $@\n> +\t$(QUIET_GEN)$(RM) $@ $@+\n> +\t$(QUIET_GEN)$(SHELL_PATH) ./generate-tcl.sh \"$(TCLTK_PATH_SQ)\" \"$<\" \"$@\"\n>  \n>  $(PO_TEMPLATE): gitk\n>  \t$(XGETTEXT) -kmc -LTcl -o $@ gitk\n> diff --git a/gitk-git/generate-tcl.sh b/gitk-git/generate-tcl.sh\n> new file mode 100755\n> index 00000000000..46bba6d2464\n> --- /dev/null\n> +++ b/gitk-git/generate-tcl.sh\n> @@ -0,0 +1,11 @@\n> +#!/bin/sh\n> +\n> +set -e\n> +\n> +WISH=$(echo \"$1\" | sed 's/|/\\\\|/g')\n> +INPUT=\"$2\"\n> +OUTPUT=\"$3\"\n> +\n> +sed -e \"1,3s|^exec .* \\\"\\$0\\\"|exec $WISH \\\"\\$0\\\"|\" \"$INPUT\" >\"$OUTPUT\"+\n> +chmod a+x \"$OUTPUT\"+\n> +mv \"$OUTPUT\"+ \"$OUTPUT\"\n"},{"id":"512653","messageId":"Z7Vxx_yQSMlXfteX@pks.im","threadId":"62967","inReplyTo":"xmqqeczuj3fc.fsf@gitster.g","subject":"Re: [PATCH 09/12] gitk: extract script to build Gitk","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-02-19T05:53:11Z","receivedAt":"2025-02-19T05:53:21Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Tue, Feb 18, 2025 at 02:25:43PM -0800, Junio C Hamano wrote:\n> Patrick Steinhardt <ps@pks.im> writes:\n> \n> > Extract the script that \"builds\" Gitk from our Makefile so that we can\n> > reuse it in Meson.\n> >\n> > Signed-off-by: Patrick Steinhardt <ps@pks.im>\n> > ---\n> >  gitk-git/Makefile        |  7 +++----\n> >  gitk-git/generate-tcl.sh | 11 +++++++++++\n> >  2 files changed, 14 insertions(+), 4 deletions(-)\n> \n> You would want to coordinate this with Johannes Sixt, who may still\n> want to maintain the subtree arrangement.\n\nOh, I had him in mind when writing the patch series, but thought that he\nonly maintained git-gui, not gitk. Must have been misremembering.\n\nAnyway, Johannes, I'm happy to evict these changes from this patch\nseries and create them as a pull request against your tree. We should\nthen also be including the project as a `subproject()` so that it can be\nused standalone.\n\nPatrick\n"},{"id":"512661","messageId":"67441cc0-ff56-4159-b080-868161605bf6@kdbg.org","threadId":"62967","inReplyTo":"Z7Vxx_yQSMlXfteX@pks.im","subject":"Re: [PATCH 09/12] gitk: extract script to build Gitk","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2025-02-19T11:42:44Z","receivedAt":"2025-02-19T11:42:53Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 19.02.25 um 06:53 schrieb Patrick Steinhardt:\n> On Tue, Feb 18, 2025 at 02:25:43PM -0800, Junio C Hamano wrote:\n>> You would want to coordinate this with Johannes Sixt, who may still\n>> want to maintain the subtree arrangement.\n> \n> Anyway, Johannes, I'm happy to evict these changes from this patch\n> series and create them as a pull request against your tree. We should\n> then also be including the project as a `subproject()` so that it can be\n> used standalone.\n\nWe can do that.\n\nBut there will be a time frame where the Git repository already knows\nhow to (and wants to) build Gitk as subproject, but the Gitk repository\nhas not been pulled, yet, and is missing the corresponding Meson\ninstructions. Will this work, or should we wait until Gitk's part has\nbeen integrated in the Git repository?\n\n-- Hannes\n\n"},{"id":"512662","messageId":"Z7XFrDmcUVIaotqC@pks.im","threadId":"62967","inReplyTo":"67441cc0-ff56-4159-b080-868161605bf6@kdbg.org","subject":"Re: [PATCH 09/12] gitk: extract script to build Gitk","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-02-19T11:51:08Z","receivedAt":"2025-02-19T11:51:14Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Wed, Feb 19, 2025 at 12:42:44PM +0100, Johannes Sixt wrote:\n> Am 19.02.25 um 06:53 schrieb Patrick Steinhardt:\n> > On Tue, Feb 18, 2025 at 02:25:43PM -0800, Junio C Hamano wrote:\n> >> You would want to coordinate this with Johannes Sixt, who may still\n> >> want to maintain the subtree arrangement.\n> > \n> > Anyway, Johannes, I'm happy to evict these changes from this patch\n> > series and create them as a pull request against your tree. We should\n> > then also be including the project as a `subproject()` so that it can be\n> > used standalone.\n> \n> We can do that.\n> \n> But there will be a time frame where the Git repository already knows\n> how to (and wants to) build Gitk as subproject, but the Gitk repository\n> has not been pulled, yet, and is missing the corresponding Meson\n> instructions. Will this work, or should we wait until Gitk's part has\n> been integrated in the Git repository?\n\nI guess the easiest way is to land the Meson support in gitk first,\npull those changes into Git and then I'll create a follow-up patch\nwhere we start to use gitk as a subproject. Does that work for you?\n\nPatrick\n"},{"id":"512670","messageId":"20250219-b4-pks-meson-contrib-v2-0-1ba5d7fde0b9@pks.im","threadId":"62967","inReplyTo":"20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im","subject":"[PATCH v2 00/10] meson: wire up bits and pieces from \"contrib/\"","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-02-19T13:13:40Z","receivedAt":"2025-02-19T13:14:00Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"Hi,\n\nthis patch series wires up a couple more bits and pieces, mostly from\n\"contrib/\". Included are:\n\n  - The \"libsecret\", \"netrc\", \"osxkeychain\" and \"wincred\" credential\n    helpers.\n\n  - The git-contact(1) script.\n\n  - Coccinelle via a new \"coccicheck\" target that generates the semantic\n    check.\n\nNot a lot of stuff is missing after this small patch series, as far as I\nam aware. Omissions that I know of include \"git-gui\", \"sparse\" and perf\ntests.\n\nThis patch series supersedes Mirth's patch series at [1]. I have picked\nthe compilation fix for MSVC from that series and retained authorship,\nbut with an amended commit message. I've also forged the SOB -- Mirth,\nplease let me know whether you're okay with this.\n\nChanges in v2:\n  - Dropped the gitk-related parts. I have instead created a pull\n    request for gitk at https://github.com/j6t/gitk/pull/8.\n  - Link to v1: https://lore.kernel.org/r/20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im\n\nThanks!\n\nPatrick\n\n[1]: <pull.1859.git.1739471859.gitgitgadget@gmail.com>\n\n---\nM Hickford (1):\n      contrib/credential: fix compilation of wincred helper with MSVC\n\nPatrick Steinhardt (9):\n      GIT-BUILD-OPTIONS: propagate project's source directory\n      contrib/credential: fix \"netrc\" tests with out-of-tree builds\n      contrib/credential: fix compiling \"libsecret\" helper\n      contrib/credential: fix compilation of \"osxkeychain\" helper\n      meson: wire up credential helpers\n      meson: wire up git-contacts(1)\n      meson: wire up static analysis via Coccinelle\n      ci: fix propagating UTF-8 test locale in musl-based Meson job\n      ci: exercise credential helpers\n\n .github/workflows/main.yml                         |  2 +-\n .gitlab-ci.yml                                     |  2 +-\n GIT-BUILD-OPTIONS.in                               |  3 +-\n Makefile                                           |  3 +-\n ci/install-dependencies.sh                         |  2 +-\n ci/lib.sh                                          | 10 ++-\n contrib/buildsystems/CMakeLists.txt                |  3 +-\n contrib/coccinelle/meson.build                     | 89 ++++++++++++++++++++++\n contrib/contacts/meson.build                       | 55 +++++++++++++\n .../libsecret/git-credential-libsecret.c           | 10 +--\n contrib/credential/libsecret/meson.build           |  9 +++\n contrib/credential/meson.build                     |  3 +\n contrib/credential/netrc/meson.build               | 20 +++++\n contrib/credential/netrc/t-git-credential-netrc.sh |  2 +-\n contrib/credential/netrc/test.pl                   |  7 +-\n .../osxkeychain/git-credential-osxkeychain.c       |  2 +-\n contrib/credential/osxkeychain/meson.build         |  9 +++\n .../credential/wincred/git-credential-wincred.c    |  2 +\n contrib/credential/wincred/meson.build             |  5 ++\n contrib/meson.build                                |  3 +\n meson.build                                        |  5 +-\n meson_options.txt                                  |  6 +-\n t/lib-gettext.sh                                   |  2 +-\n t/t7609-mergetool--lib.sh                          |  2 +-\n 24 files changed, 229 insertions(+), 27 deletions(-)\n\nRange-diff versus v1:\n\n 1:  f038c1b6a45 =  1:  1cbc7a0a2e3 GIT-BUILD-OPTIONS: propagate project's source directory\n 2:  493714b2599 =  2:  7b280db6c74 contrib/credential: fix \"netrc\" tests with out-of-tree builds\n 3:  6ca34876222 =  3:  63932bfaca2 contrib/credential: fix compilation of wincred helper with MSVC\n 4:  f8004e550e3 =  4:  6f8bdb62e00 contrib/credential: fix compiling \"libsecret\" helper\n 5:  56eaee681fb =  5:  cd01c7cdb28 contrib/credential: fix compilation of \"osxkeychain\" helper\n 6:  fb06e907359 =  6:  2827ed818cc meson: wire up credential helpers\n 7:  1720a22498c =  7:  84d5d994674 meson: wire up git-contacts(1)\n 8:  d35fe9c7f1f =  8:  9a1a44e9db8 meson: wire up static analysis via Coccinelle\n 9:  f3756bea4d2 <  -:  ----------- gitk: extract script to build Gitk\n10:  091def75331 <  -:  ----------- meson: wire up Gitk\n11:  5a6adc0c756 =  9:  05b11300b60 ci: fix propagating UTF-8 test locale in musl-based Meson job\n12:  fdf80deb16a = 10:  92fa0c76c2b ci: exercise credential helpers\n\n---\nbase-commit: 03944513488db4a81fdb4c21c3b515e4cb260b05\nchange-id: 20250206-b4-pks-meson-contrib-5d9b3a5d0830\n\n"},{"id":"512674","messageId":"20250219-b4-pks-meson-contrib-v2-1-1ba5d7fde0b9@pks.im","threadId":"62967","inReplyTo":"20250219-b4-pks-meson-contrib-v2-0-1ba5d7fde0b9@pks.im","subject":"[PATCH v2 01/10] GIT-BUILD-OPTIONS: propagate project's source directory","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-02-19T13:13:41Z","receivedAt":"2025-02-19T13:14:02Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"A couple of our tests require knowledge around where to find the\nproject's source directory in order to locate files required for the\ntest itself. Until now we have been wiring these up ad-hoc via new,\nspecialized variables catered to the specific usecase. This is quite\nawkward though, as every test that potentially needs to locate paths\nrelative to the source directory needs to grow another variable.\n\nIntroduce a new \"GIT_SOURCE_DIR\" variable into GIT-BUILD-OPTIONS to stop\nthis proliferation. Remove existing variables that can be derived from\nit.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n GIT-BUILD-OPTIONS.in                | 3 +--\n Makefile                            | 3 +--\n contrib/buildsystems/CMakeLists.txt | 3 +--\n meson.build                         | 3 +--\n t/lib-gettext.sh                    | 2 +-\n t/t7609-mergetool--lib.sh           | 2 +-\n 6 files changed, 6 insertions(+), 10 deletions(-)\n\ndiff --git a/GIT-BUILD-OPTIONS.in b/GIT-BUILD-OPTIONS.in\nindex ada575fbcb7..0a9884e0ade 100644\n--- a/GIT-BUILD-OPTIONS.in\n+++ b/GIT-BUILD-OPTIONS.in\n@@ -9,14 +9,13 @@ GIT_PERF_MAKE_COMMAND=@GIT_PERF_MAKE_COMMAND@\n GIT_PERF_MAKE_OPTS=@GIT_PERF_MAKE_OPTS@\n GIT_PERF_REPEAT_COUNT=@GIT_PERF_REPEAT_COUNT@\n GIT_PERF_REPO=@GIT_PERF_REPO@\n+GIT_SOURCE_DIR=@GIT_SOURCE_DIR@\n GIT_TEST_CMP=@GIT_TEST_CMP@\n GIT_TEST_CMP_USE_COPIED_CONTEXT=@GIT_TEST_CMP_USE_COPIED_CONTEXT@\n GIT_TEST_GITPERLLIB=@GIT_TEST_GITPERLLIB@\n GIT_TEST_INDEX_VERSION=@GIT_TEST_INDEX_VERSION@\n-GIT_TEST_MERGE_TOOLS_DIR=@GIT_TEST_MERGE_TOOLS_DIR@\n GIT_TEST_OPTS=@GIT_TEST_OPTS@\n GIT_TEST_PERL_FATAL_WARNINGS=@GIT_TEST_PERL_FATAL_WARNINGS@\n-GIT_TEST_POPATH=@GIT_TEST_POPATH@\n GIT_TEST_TEMPLATE_DIR=@GIT_TEST_TEMPLATE_DIR@\n GIT_TEST_TEXTDOMAINDIR=@GIT_TEST_TEXTDOMAINDIR@\n GIT_TEST_UTF8_LOCALE=@GIT_TEST_UTF8_LOCALE@\ndiff --git a/Makefile b/Makefile\nindex cd0806e1e69..a3483e15c4a 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -3192,14 +3192,13 @@ GIT-BUILD-OPTIONS: FORCE\n \t\t-e \"s|@GIT_PERF_MAKE_OPTS@|\\'$(GIT_PERF_MAKE_OPTS)\\'|\" \\\n \t\t-e \"s|@GIT_PERF_REPEAT_COUNT@|\\'$(GIT_PERF_REPEAT_COUNT)\\'|\" \\\n \t\t-e \"s|@GIT_PERF_REPO@|\\'$(GIT_PERF_REPO)\\'|\" \\\n+\t\t-e \"s|@GIT_SOURCE_DIR@|\\'$(shell pwd)\\'|\" \\\n \t\t-e \"s|@GIT_TEST_CMP@|\\'$(GIT_TEST_CMP)\\'|\" \\\n \t\t-e \"s|@GIT_TEST_CMP_USE_COPIED_CONTEXT@|\\'$(GIT_TEST_CMP_USE_COPIED_CONTEXT)\\'|\" \\\n \t\t-e \"s|@GIT_TEST_GITPERLLIB@|\\'$(shell pwd)/perl/build/lib\\'|\" \\\n \t\t-e \"s|@GIT_TEST_INDEX_VERSION@|\\'$(GIT_TEST_INDEX_VERSION)\\'|\" \\\n-\t\t-e \"s|@GIT_TEST_MERGE_TOOLS_DIR@|\\'$(shell pwd)/mergetools\\'|\" \\\n \t\t-e \"s|@GIT_TEST_OPTS@|\\'$(GIT_TEST_OPTS)\\'|\" \\\n \t\t-e \"s|@GIT_TEST_PERL_FATAL_WARNINGS@|\\'$(GIT_TEST_PERL_FATAL_WARNINGS)\\'|\" \\\n-\t\t-e \"s|@GIT_TEST_POPATH@|\\'$(shell pwd)/po\\'|\" \\\n \t\t-e \"s|@GIT_TEST_TEMPLATE_DIR@|\\'$(shell pwd)/templates/blt\\'|\" \\\n \t\t-e \"s|@GIT_TEST_TEXTDOMAINDIR@|\\'$(shell pwd)/po/build/locale\\'|\" \\\n \t\t-e \"s|@GIT_TEST_UTF8_LOCALE@|\\'$(GIT_TEST_UTF8_LOCALE)\\'|\" \\\ndiff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt\nindex 3179e7ff7a3..c6fbd57e158 100644\n--- a/contrib/buildsystems/CMakeLists.txt\n+++ b/contrib/buildsystems/CMakeLists.txt\n@@ -1169,14 +1169,13 @@ string(REPLACE \"@GIT_PERF_MAKE_COMMAND@\" \"\" git_build_options \"${git_build_optio\n string(REPLACE \"@GIT_PERF_MAKE_OPTS@\" \"\" git_build_options \"${git_build_options}\")\n string(REPLACE \"@GIT_PERF_REPEAT_COUNT@\" \"\" git_build_options \"${git_build_options}\")\n string(REPLACE \"@GIT_PERF_REPO@\" \"\" git_build_options \"${git_build_options}\")\n+string(REPLACE \"@GIT_SOURCE_DIR@\" \"${CMAKE_SOURCE_DIR}\" git_build_options \"${git_build_options}\")\n string(REPLACE \"@GIT_TEST_CMP@\" \"\" git_build_options \"${git_build_options}\")\n string(REPLACE \"@GIT_TEST_CMP_USE_COPIED_CONTEXT@\" \"\" git_build_options \"${git_build_options}\")\n string(REPLACE \"@GIT_TEST_GITPERLLIB@\" \"'${CMAKE_BINARY_DIR}/perl/build/lib'\" git_build_options \"${git_build_options}\")\n string(REPLACE \"@GIT_TEST_INDEX_VERSION@\" \"\" git_build_options \"${git_build_options}\")\n-string(REPLACE \"@GIT_TEST_MERGE_TOOLS_DIR@\" \"'${CMAKE_BINARY_DIR}/mergetools'\" git_build_options \"${git_build_options}\")\n string(REPLACE \"@GIT_TEST_OPTS@\" \"\" git_build_options \"${git_build_options}\")\n string(REPLACE \"@GIT_TEST_PERL_FATAL_WARNINGS@\" \"\" git_build_options \"${git_build_options}\")\n-string(REPLACE \"@GIT_TEST_POPATH@\" \"'${CMAKE_BINARY_DIR}/po'\" git_build_options \"${git_build_options}\")\n string(REPLACE \"@GIT_TEST_TEMPLATE_DIR@\" \"'${CMAKE_BINARY_DIR}/templates/blt'\" git_build_options \"${git_build_options}\")\n string(REPLACE \"@GIT_TEST_TEXTDOMAINDIR@\" \"'${CMAKE_BINARY_DIR}/po/build/locale'\" git_build_options \"${git_build_options}\")\n string(REPLACE \"@GIT_TEST_UTF8_LOCALE@\" \"\" git_build_options \"${git_build_options}\")\ndiff --git a/meson.build b/meson.build\nindex 0df3872c6ad..d77d7b6b603 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -1960,10 +1960,9 @@ subdir('contrib')\n \n foreach key, value : {\n   'DIFF': diff.full_path(),\n+  'GIT_SOURCE_DIR': meson.project_source_root(),\n   'GIT_TEST_CMP': diff.full_path() + ' -u',\n   'GIT_TEST_GITPERLLIB': meson.project_build_root() / 'perl',\n-  'GIT_TEST_MERGE_TOOLS_DIR': meson.project_source_root() / 'mergetools',\n-  'GIT_TEST_POPATH': meson.project_source_root() / 'po',\n   'GIT_TEST_TEMPLATE_DIR': meson.project_build_root() / 'templates',\n   'GIT_TEST_TEXTDOMAINDIR': meson.project_build_root() / 'po',\n   'PAGER_ENV': get_option('pager_environment'),\ndiff --git a/t/lib-gettext.sh b/t/lib-gettext.sh\nindex 7a734c6973e..b3dd68b0b95 100644\n--- a/t/lib-gettext.sh\n+++ b/t/lib-gettext.sh\n@@ -7,7 +7,7 @@\n . ./test-lib.sh\n \n GIT_TEXTDOMAINDIR=\"$GIT_TEST_TEXTDOMAINDIR\"\n-GIT_PO_PATH=\"$GIT_TEST_POPATH\"\n+GIT_PO_PATH=\"$GIT_SOURCE_DIR/po\"\n export GIT_TEXTDOMAINDIR GIT_PO_PATH\n \n if test -n \"$GIT_TEST_INSTALLED\"\ndiff --git a/t/t7609-mergetool--lib.sh b/t/t7609-mergetool--lib.sh\nindex e8e205707e4..af3ad284eed 100755\n--- a/t/t7609-mergetool--lib.sh\n+++ b/t/t7609-mergetool--lib.sh\n@@ -7,7 +7,7 @@ Testing basic merge tools options'\n . ./test-lib.sh\n \n test_expect_success 'mergetool --tool=vimdiff creates the expected layout' '\n-\t. \"$GIT_TEST_MERGE_TOOLS_DIR\"/vimdiff &&\n+\t. \"$GIT_SOURCE_DIR\"/mergetools/vimdiff &&\n \trun_unit_tests\n '\n \n\n-- \n2.48.1.666.gff9fcf71b7.dirty\n\n"},{"id":"512671","messageId":"20250219-b4-pks-meson-contrib-v2-2-1ba5d7fde0b9@pks.im","threadId":"62967","inReplyTo":"20250219-b4-pks-meson-contrib-v2-0-1ba5d7fde0b9@pks.im","subject":"[PATCH v2 02/10] contrib/credential: fix \"netrc\" tests with out-of-tree builds","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-02-19T13:13:42Z","receivedAt":"2025-02-19T13:14:03Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"Tests of the \"netrc\" credential helper aren't prepared to handle\nout-of-tree builds:\n\n  - They expect the \"test.pl\" script to be located relative to the build\n    directory, even though it is located in the source directory.\n\n  - They expect the built \"git-credential-netrc\" helper to be located\n    relative to the \"test.pl\" file, evne though it is loated in the\n    build directory.\n\nThis works alright as long as source and build directories are the same,\nbut starts to break apart with Meson.\n\nFix these first issue by using the new \"GIT_SOURCE_DIR\" variable to\nlocate the test script itself. And fix the second issue by introducing a\nnew environment variable \"CREDENTIAL_NETRC_PATH\" that can be set for\nout-of-tree builds to locate the built credential helper.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n contrib/credential/netrc/t-git-credential-netrc.sh | 2 +-\n contrib/credential/netrc/test.pl                   | 7 ++++---\n 2 files changed, 5 insertions(+), 4 deletions(-)\n\ndiff --git a/contrib/credential/netrc/t-git-credential-netrc.sh b/contrib/credential/netrc/t-git-credential-netrc.sh\nindex bf2777308a5..1b7b8b3a9aa 100755\n--- a/contrib/credential/netrc/t-git-credential-netrc.sh\n+++ b/contrib/credential/netrc/t-git-credential-netrc.sh\n@@ -15,7 +15,7 @@\n \n \texport PERL5LIB=\"$GITPERLLIB\"\n \ttest_expect_success 'git-credential-netrc' '\n-\t\tperl \"$GIT_BUILD_DIR\"/contrib/credential/netrc/test.pl\n+\t\tperl \"$GIT_SOURCE_DIR\"/contrib/credential/netrc/test.pl\n \t'\n \n \ttest_done\ndiff --git a/contrib/credential/netrc/test.pl b/contrib/credential/netrc/test.pl\nindex c0fb3718b28..67a0ede5644 100755\n--- a/contrib/credential/netrc/test.pl\n+++ b/contrib/credential/netrc/test.pl\n@@ -15,10 +15,11 @@ BEGIN\n \n my @global_credential_args = @ARGV;\n my $scriptDir = dirname rel2abs $0;\n-my ($netrc, $netrcGpg, $gcNetrc) = map { catfile $scriptDir, $_; }\n+my ($netrc, $netrcGpg) = map { catfile $scriptDir, $_; }\n                                        qw(test.netrc\n-                                          test.netrc.gpg\n-                                          git-credential-netrc);\n+                                          test.netrc.gpg);\n+my $gcNetrc = $ENV{CREDENTIAL_NETRC_PATH} || catfile $scriptDir, qw(git-credential-netrc);\n+\n local $ENV{PATH} = join ':'\n                       , $scriptDir\n                       , $ENV{PATH}\n\n-- \n2.48.1.666.gff9fcf71b7.dirty\n\n"},{"id":"512672","messageId":"20250219-b4-pks-meson-contrib-v2-3-1ba5d7fde0b9@pks.im","threadId":"62967","inReplyTo":"20250219-b4-pks-meson-contrib-v2-0-1ba5d7fde0b9@pks.im","subject":"[PATCH v2 03/10] contrib/credential: fix compilation of wincred helper with MSVC","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-02-19T13:13:43Z","receivedAt":"2025-02-19T13:14:04Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"From: M Hickford <mirth.hickford@gmail.com>\n\nThe git-credential-wincred helper does not compile on Windows with\nMicrosoft Visual Studio because of our use of `__attribute__()`, which\nits compiler doesn't support. While the rest of our codebase would know\nto handle this because we redefine the macro in \"compat/msvc.h\", this\nstub isn't available here because we don't include \"git-compat-util.h\"\nin the first place.\n\nFix the issue by making the attribute depend on the `_MSC_VER`\npreprocessor macro.\n\nSigned-off-by: M Hickford <mirth.hickford@gmail.com>\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n contrib/credential/wincred/git-credential-wincred.c | 2 ++\n 1 file changed, 2 insertions(+)\n\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];\n\n-- \n2.48.1.666.gff9fcf71b7.dirty\n\n"},{"id":"512673","messageId":"20250219-b4-pks-meson-contrib-v2-5-1ba5d7fde0b9@pks.im","threadId":"62967","inReplyTo":"20250219-b4-pks-meson-contrib-v2-0-1ba5d7fde0b9@pks.im","subject":"[PATCH v2 05/10] contrib/credential: fix compilation of \"osxkeychain\" helper","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-02-19T13:13:45Z","receivedAt":"2025-02-19T13:14:05Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"The \"osxkeychain\" helper does not compile due to a warning generated by\nthe unused `argc` parameter. Fix the warning by checking for the minimum\nnumber of required arguments explicitly in the least restrictive way\npossible.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n contrib/credential/osxkeychain/git-credential-osxkeychain.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/contrib/credential/osxkeychain/git-credential-osxkeychain.c b/contrib/credential/osxkeychain/git-credential-osxkeychain.c\nindex 1c8310d7fef..611c9798b3a 100644\n--- a/contrib/credential/osxkeychain/git-credential-osxkeychain.c\n+++ b/contrib/credential/osxkeychain/git-credential-osxkeychain.c\n@@ -422,7 +422,7 @@ int main(int argc, const char **argv)\n \tconst char *usage =\n \t\t\"usage: git credential-osxkeychain <get|store|erase>\";\n \n-\tif (!argv[1])\n+\tif (argc < 2 || !*argv[1])\n \t\tdie(\"%s\", usage);\n \n \tif (open(argv[0], O_RDONLY | O_EXLOCK) == -1)\n\n-- \n2.48.1.666.gff9fcf71b7.dirty\n\n"},{"id":"512675","messageId":"20250219-b4-pks-meson-contrib-v2-4-1ba5d7fde0b9@pks.im","threadId":"62967","inReplyTo":"20250219-b4-pks-meson-contrib-v2-0-1ba5d7fde0b9@pks.im","subject":"[PATCH v2 04/10] contrib/credential: fix compiling \"libsecret\" helper","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-02-19T13:13:44Z","receivedAt":"2025-02-19T13:14:05Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"The \"libsecret\" credential helper does not compile when developer\nwarnings are enabled due to three warnings:\n\n    - contrib/credential/libsecret/git-credential-libsecret.c:78:1:\n      missing initializer for field ‘reserved’ of ‘SecretSchema’\n      [-Werror=missing-field-initializers]. This issue is fixed by using\n      designated initializers.\n\n    - contrib/credential/libsecret/git-credential-libsecret.c:171:43:\n      comparison of integer expressions of different signedness: ‘int’\n      and ‘guint’ {aka ‘unsigned int’} [-Werror=sign-compare]. This\n      issue is fixed by using an unsigned variable to iterate through\n      the string vector.\n\n    - contrib/credential/libsecret/git-credential-libsecret.c:420:14:\n      unused parameter ‘argc’ [-Werror=unused-parameter]. This issue is\n      fixed by checking the number of arguments, but in the least\n      restrictive way possible.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n contrib/credential/libsecret/git-credential-libsecret.c | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)\n\ndiff --git a/contrib/credential/libsecret/git-credential-libsecret.c b/contrib/credential/libsecret/git-credential-libsecret.c\nindex 90034d0cf1e..941b2afd5ee 100644\n--- a/contrib/credential/libsecret/git-credential-libsecret.c\n+++ b/contrib/credential/libsecret/git-credential-libsecret.c\n@@ -59,10 +59,10 @@ static void credential_clear(struct credential *c);\n /* ----------------- Secret Service functions ----------------- */\n \n static const SecretSchema schema = {\n-\t\"org.git.Password\",\n+\t.name = \"org.git.Password\",\n \t/* Ignore schema name during search for backwards compatibility */\n-\tSECRET_SCHEMA_DONT_MATCH_NAME,\n-\t{\n+\t.flags = SECRET_SCHEMA_DONT_MATCH_NAME,\n+\t.attributes = {\n \t\t/*\n \t\t * libsecret assumes attribute values are non-confidential and\n \t\t * unchanging, so we can't include oauth_refresh_token or\n@@ -168,7 +168,7 @@ static int keyring_get(struct credential *c)\n \t\t\t\tg_free(c->password);\n \t\t\t\tc->password = g_strdup(\"\");\n \t\t\t}\n-\t\t\tfor (int i = 1; i < g_strv_length(parts); i++) {\n+\t\t\tfor (guint i = 1; i < g_strv_length(parts); i++) {\n \t\t\t\tif (g_str_has_prefix(parts[i], \"password_expiry_utc=\")) {\n \t\t\t\t\tg_free(c->password_expiry_utc);\n \t\t\t\t\tc->password_expiry_utc = g_strdup(&parts[i][20]);\n@@ -424,7 +424,7 @@ int main(int argc, char *argv[])\n \tstruct credential_operation const *try_op = credential_helper_ops;\n \tstruct credential cred = CREDENTIAL_INIT;\n \n-\tif (!argv[1]) {\n+\tif (argc < 2 || !*argv[1]) {\n \t\tusage(argv[0]);\n \t\texit(EXIT_FAILURE);\n \t}\n\n-- \n2.48.1.666.gff9fcf71b7.dirty\n\n"},{"id":"512676","messageId":"20250219-b4-pks-meson-contrib-v2-6-1ba5d7fde0b9@pks.im","threadId":"62967","inReplyTo":"20250219-b4-pks-meson-contrib-v2-0-1ba5d7fde0b9@pks.im","subject":"[PATCH v2 06/10] meson: wire up credential helpers","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-02-19T13:13:46Z","receivedAt":"2025-02-19T13:14:06Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"We've got a couple of credential helpers in \"contrib/credential\", all\nof which aren't yet wired up via Meson. Do so.\n\nNote that ideally, we'd also wire up t0303 to be executed with each of\nthe credential helpers to verify their functionality. Unfortunately\nthough, none of them pass the test suite right now, so this is left for\na future change.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n contrib/credential/libsecret/meson.build   |  9 +++++++++\n contrib/credential/meson.build             |  3 +++\n contrib/credential/netrc/meson.build       | 20 ++++++++++++++++++++\n contrib/credential/osxkeychain/meson.build |  9 +++++++++\n contrib/credential/wincred/meson.build     |  5 +++++\n contrib/meson.build                        |  2 ++\n meson.build                                |  2 +-\n meson_options.txt                          |  2 ++\n 8 files changed, 51 insertions(+), 1 deletion(-)\n\ndiff --git a/contrib/credential/libsecret/meson.build b/contrib/credential/libsecret/meson.build\nnew file mode 100644\nindex 00000000000..0137660fe02\n--- /dev/null\n+++ b/contrib/credential/libsecret/meson.build\n@@ -0,0 +1,9 @@\n+executable('git-credential-libsecret',\n+  sources: 'git-credential-libsecret.c',\n+  dependencies: [\n+    dependency('glib-2.0'),\n+    dependency('libsecret-1'),\n+  ],\n+  install: true,\n+  install_dir: get_option('libexecdir') / 'git-core',\n+)\ndiff --git a/contrib/credential/meson.build b/contrib/credential/meson.build\nnew file mode 100644\nindex 00000000000..4216296ae05\n--- /dev/null\n+++ b/contrib/credential/meson.build\n@@ -0,0 +1,3 @@\n+foreach helper : get_option('credential_helpers')\n+  subdir(helper)\n+endforeach\ndiff --git a/contrib/credential/netrc/meson.build b/contrib/credential/netrc/meson.build\nnew file mode 100644\nindex 00000000000..a990dbb86da\n--- /dev/null\n+++ b/contrib/credential/netrc/meson.build\n@@ -0,0 +1,20 @@\n+credential_netrc = custom_target(\n+  input: 'git-credential-netrc.perl',\n+  output: 'git-credential-netrc',\n+  command: generate_perl_command,\n+  depends: [git_version_file],\n+  install: true,\n+  install_dir: get_option('libexecdir') / 'git-core',\n+)\n+\n+credential_netrc_testenv = test_environment\n+credential_netrc_testenv.set('CREDENTIAL_NETRC_PATH', credential_netrc.full_path())\n+\n+test('t-git-credential-netrc',\n+  shell,\n+  args: [ meson.current_source_dir() / 't-git-credential-netrc.sh' ],\n+  workdir: meson.current_source_dir(),\n+  env: credential_netrc_testenv,\n+  depends: test_dependencies + bin_wrappers + [credential_netrc],\n+  timeout: 0,\n+)\ndiff --git a/contrib/credential/osxkeychain/meson.build b/contrib/credential/osxkeychain/meson.build\nnew file mode 100644\nindex 00000000000..3c7677f736c\n--- /dev/null\n+++ b/contrib/credential/osxkeychain/meson.build\n@@ -0,0 +1,9 @@\n+executable('git-credential-osxkeychain',\n+  sources: 'git-credential-osxkeychain.c',\n+  dependencies: [\n+    dependency('CoreFoundation'),\n+    dependency('Security'),\n+  ],\n+  install: true,\n+  install_dir: get_option('libexecdir') / 'git-core',\n+)\ndiff --git a/contrib/credential/wincred/meson.build b/contrib/credential/wincred/meson.build\nnew file mode 100644\nindex 00000000000..6de23ca17d4\n--- /dev/null\n+++ b/contrib/credential/wincred/meson.build\n@@ -0,0 +1,5 @@\n+executable('git-credential-wincred',\n+  sources: 'git-credential-wincred.c',\n+  install: true,\n+  install_dir: get_option('libexecdir') / 'git-core',\n+)\ndiff --git a/contrib/meson.build b/contrib/meson.build\nindex d74b64a5181..569c23ee768 100644\n--- a/contrib/meson.build\n+++ b/contrib/meson.build\n@@ -1,3 +1,5 @@\n foreach feature : get_option('contrib')\n   subdir(feature)\n endforeach\n+\n+subdir('credential')\ndiff --git a/meson.build b/meson.build\nindex d77d7b6b603..20159cef83d 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -771,7 +771,7 @@ endif\n # features. It is optional if you want to neither execute tests nor use any of\n # these optional features.\n perl_required = get_option('perl')\n-if get_option('tests') or get_option('gitweb').enabled()\n+if get_option('tests') or get_option('gitweb').enabled() or 'netrc' in get_option('credential_helpers')\n   perl_required = true\n endif\n \ndiff --git a/meson_options.txt b/meson_options.txt\nindex 5c12e9055e6..0b0708dd0ed 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_helpers', type: 'array', value: [ ], choices: [ 'libsecret', 'netrc', 'osxkeychain', 'wincred' ],\n+  description: 'Contributed features to include.')\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\n-- \n2.48.1.666.gff9fcf71b7.dirty\n\n"},{"id":"512677","messageId":"20250219-b4-pks-meson-contrib-v2-7-1ba5d7fde0b9@pks.im","threadId":"62967","inReplyTo":"20250219-b4-pks-meson-contrib-v2-0-1ba5d7fde0b9@pks.im","subject":"[PATCH v2 07/10] meson: wire up git-contacts(1)","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-02-19T13:13:47Z","receivedAt":"2025-02-19T13:14:07Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"Wire up the build for git-contacts(1) in Meson.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n contrib/contacts/meson.build | 55 ++++++++++++++++++++++++++++++++++++++++++++\n meson_options.txt            |  2 +-\n 2 files changed, 56 insertions(+), 1 deletion(-)\n\ndiff --git a/contrib/contacts/meson.build b/contrib/contacts/meson.build\nnew file mode 100644\nindex 00000000000..6ec92f47c43\n--- /dev/null\n+++ b/contrib/contacts/meson.build\n@@ -0,0 +1,55 @@\n+custom_target(\n+  input: 'git-contacts',\n+  output: 'git-contacts',\n+  command: generate_perl_command,\n+  depends: [git_version_file],\n+  install: true,\n+  install_dir: get_option('libexecdir') / 'git-core',\n+)\n+\n+if get_option('docs').contains('man')\n+  contacts_xml = custom_target(\n+    command: asciidoc_common_options + [\n+      '--backend=' + asciidoc_docbook,\n+      '--doctype=manpage',\n+      '--out-file=@OUTPUT@',\n+      '@INPUT@',\n+    ],\n+    depends: documentation_deps,\n+    input: 'git-contacts.txt',\n+    output: 'git-contacts.xml',\n+  )\n+\n+  custom_target(\n+    command: [\n+      xmlto,\n+      '-m', '@INPUT@',\n+      'man',\n+      contacts_xml,\n+      '-o',\n+      meson.current_build_dir(),\n+    ] + xmlto_extra,\n+    input: [\n+      '../../Documentation/manpage-normal.xsl',\n+    ],\n+    output: 'git-contacts.1',\n+    install: true,\n+    install_dir: get_option('mandir') / 'man1',\n+  )\n+endif\n+\n+if get_option('docs').contains('html')\n+  custom_target(\n+    command: asciidoc_common_options + [\n+      '--backend=' + asciidoc_html,\n+      '--doctype=manpage',\n+      '--out-file=@OUTPUT@',\n+      '@INPUT@',\n+    ],\n+    depends: documentation_deps,\n+    input: 'git-contacts.txt',\n+    output: 'git-contacts.html',\n+    install: true,\n+    install_dir: get_option('datadir') / 'doc/git-doc',\n+  )\n+endif\ndiff --git a/meson_options.txt b/meson_options.txt\nindex 0b0708dd0ed..c51ba88d853 100644\n--- a/meson_options.txt\n+++ b/meson_options.txt\n@@ -27,7 +27,7 @@ option('version', type: 'string', value: '',\n   description: 'Version string reported by git-version(1) and other tools.')\n \n # Features supported by Git.\n-option('contrib', type: 'array', value: [ 'completion' ], choices: [ 'completion', 'subtree' ],\n+option('contrib', type: 'array', value: [ 'completion' ], choices: [ 'completion', 'contacts', 'subtree' ],\n   description: 'Contributed features to include.')\n option('credential_helpers', type: 'array', value: [ ], choices: [ 'libsecret', 'netrc', 'osxkeychain', 'wincred' ],\n   description: 'Contributed features to include.')\n\n-- \n2.48.1.666.gff9fcf71b7.dirty\n\n"},{"id":"512678","messageId":"20250219-b4-pks-meson-contrib-v2-8-1ba5d7fde0b9@pks.im","threadId":"62967","inReplyTo":"20250219-b4-pks-meson-contrib-v2-0-1ba5d7fde0b9@pks.im","subject":"[PATCH v2 08/10] meson: wire up static analysis via Coccinelle","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-02-19T13:13:48Z","receivedAt":"2025-02-19T13:14:08Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"Wire up static analysis via Coccinelle via a new test target\n\"coccicheck\". This target can be executed via `meson compile coccicheck`\nand generates the semantic patch for us.\n\nNote that we don't hardcode the list of source and header files that\nshall be analyzed, and instead use git-ls-files(1) to find them for us.\nThis is because we also want to analyze files that may not get built on\nthe current platform, so finding all sources at configure time is easier\nthan introducing a new variable that tracks all sources, including those\nwhich aren't being built.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n contrib/coccinelle/meson.build | 89 ++++++++++++++++++++++++++++++++++++++++++\n contrib/meson.build            |  1 +\n meson_options.txt              |  2 +\n 3 files changed, 92 insertions(+)\n\ndiff --git a/contrib/coccinelle/meson.build b/contrib/coccinelle/meson.build\nnew file mode 100644\nindex 00000000000..5d76a7fee6f\n--- /dev/null\n+++ b/contrib/coccinelle/meson.build\n@@ -0,0 +1,89 @@\n+spatch = find_program('spatch', required: get_option('coccinelle'))\n+if not spatch.found()\n+  subdir_done()\n+endif\n+\n+third_party_sources = [\n+  ':!contrib',\n+  ':!compat/inet_ntop.c',\n+  ':!compat/inet_pton.c',\n+  ':!compat/nedmalloc',\n+  ':!compat/obstack.*',\n+  ':!compat/poll',\n+  ':!compat/regex',\n+  ':!sha1collisiondetection',\n+  ':!sha1dc',\n+  ':!t/unit-tests/clar',\n+  ':!t/unit-tests/clar',\n+  ':!t/t[0-9][0-9][0-9][0-9]*',\n+]\n+\n+rules = [\n+  'array.cocci',\n+  'commit.cocci',\n+  'config_fn_ctx.pending.cocci',\n+  'equals-null.cocci',\n+  'flex_alloc.cocci',\n+  'free.cocci',\n+  'git_config_number.cocci',\n+  'hashmap.cocci',\n+  'index-compatibility.cocci',\n+  'object_id.cocci',\n+  'preincr.cocci',\n+  'qsort.cocci',\n+  'refs.cocci',\n+  'strbuf.cocci',\n+  'swap.cocci',\n+  'the_repository.cocci',\n+  'xcalloc.cocci',\n+  'xopen.cocci',\n+  'xstrdup_or_null.cocci',\n+  'xstrncmpz.cocci',\n+]\n+\n+concatenated_rules = custom_target(\n+  command: [\n+    'cat', '@INPUT@',\n+  ],\n+  input: rules,\n+  output: 'rules.cocci',\n+  capture: true,\n+)\n+\n+sources = [ ]\n+foreach source : run_command(git, '-C', meson.project_source_root(), 'ls-files', '--deduplicate', '*.c', third_party_sources, check: true).stdout().split()\n+  sources += source\n+endforeach\n+\n+headers = [ ]\n+foreach header : run_command(git, '-C', meson.project_source_root(), 'ls-files', '--deduplicate', '*.h', third_party_sources, check: true).stdout().split()\n+  headers += meson.project_source_root() / header\n+endforeach\n+\n+patches = [ ]\n+foreach source : sources\n+  patches += custom_target(\n+    command: [\n+      spatch,\n+      '--all-includes',\n+      '--sp-file', concatenated_rules,\n+      '--patch', meson.project_source_root(),\n+      '@INPUT@',\n+    ],\n+    input: meson.project_source_root() / source,\n+    output: source.underscorify() + '.patch',\n+    capture: true,\n+    depend_files: headers,\n+  )\n+endforeach\n+\n+concatenated_patch = custom_target(\n+  command: [\n+    'cat', '@INPUT@',\n+  ],\n+  input: patches,\n+  output: 'cocci.patch',\n+  capture: true,\n+)\n+\n+alias_target('coccicheck', concatenated_patch)\ndiff --git a/contrib/meson.build b/contrib/meson.build\nindex 569c23ee768..a88c5dfe09e 100644\n--- a/contrib/meson.build\n+++ b/contrib/meson.build\n@@ -2,4 +2,5 @@ foreach feature : get_option('contrib')\n   subdir(feature)\n endforeach\n \n+subdir('coccinelle')\n subdir('credential')\ndiff --git a/meson_options.txt b/meson_options.txt\nindex c51ba88d853..afa908d6c53 100644\n--- a/meson_options.txt\n+++ b/meson_options.txt\n@@ -101,6 +101,8 @@ option('docs_backend', type: 'combo', choices: ['asciidoc', 'asciidoctor', 'auto\n   description: 'Which backend to use to generate documentation.')\n \n # Testing.\n+option('coccinelle', type: 'feature', value: 'auto',\n+  description: 'Provide a coccicheck target that generates a Coccinelle patch.')\n option('tests', type: 'boolean', value: true,\n   description: 'Enable building tests. This requires Perl, but is separate from the \"perl\" option such that you can build tests without Perl features enabled.')\n option('test_output_directory', type: 'string',\n\n-- \n2.48.1.666.gff9fcf71b7.dirty\n\n"},{"id":"512680","messageId":"20250219-b4-pks-meson-contrib-v2-9-1ba5d7fde0b9@pks.im","threadId":"62967","inReplyTo":"20250219-b4-pks-meson-contrib-v2-0-1ba5d7fde0b9@pks.im","subject":"[PATCH v2 09/10] ci: fix propagating UTF-8 test locale in musl-based Meson job","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-02-19T13:13:49Z","receivedAt":"2025-02-19T13:14:08Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"The musl-based Meson job is supposed to explicitly specify the UTF-8\nlocale used for testing, which has been introduced with 84bb5eeace7 (ci:\nswitch linux-musl to use Meson, 2025-01-28). That commit had two issues\nthough:\n\n  - We continue to refer to \"linux-musl\", even though the job has been\n    renamed in the same commit to \"linux-musl-meson\".\n\n  - We use the wrong option name to specify the locale. This was not\n    noticed though due to the first issue.\n\nFix both of these issues by fixing both the job and option naems.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n ci/lib.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/ci/lib.sh b/ci/lib.sh\nindex 028fea0e7b5..84d11452650 100755\n--- a/ci/lib.sh\n+++ b/ci/lib.sh\n@@ -348,8 +348,8 @@ case \"$jobname\" in\n linux32)\n \tCC=gcc\n \t;;\n-linux-musl)\n-\tMESONFLAGS=\"$MESONFLAGS -DGIT_TEST_UTF8_LOCALE=C.UTF-8\"\n+linux-musl-meson)\n+\tMESONFLAGS=\"$MESONFLAGS -Dtest_utf8_locale=C.UTF-8\"\n \t;;\n linux-leaks|linux-reftable-leaks)\n \texport SANITIZE=leak\n\n-- \n2.48.1.666.gff9fcf71b7.dirty\n\n"},{"id":"512679","messageId":"20250219-b4-pks-meson-contrib-v2-10-1ba5d7fde0b9@pks.im","threadId":"62967","inReplyTo":"20250219-b4-pks-meson-contrib-v2-0-1ba5d7fde0b9@pks.im","subject":"[PATCH v2 10/10] ci: exercise credential helpers","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-02-19T13:13:50Z","receivedAt":"2025-02-19T13:14:10Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"Wire up credential helpers in our CI runs so that we can rest assured\nthat they compile and (if tests are available) function correctly.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n .github/workflows/main.yml | 2 +-\n .gitlab-ci.yml             | 2 +-\n ci/install-dependencies.sh | 2 +-\n ci/lib.sh                  | 6 ++++++\n 4 files changed, 9 insertions(+), 3 deletions(-)\n\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex 5f756dfc2e2..9959b61ece2 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -265,7 +265,7 @@ jobs:\n       run: pip install meson ninja\n     - name: Setup\n       shell: pwsh\n-      run: meson setup build -Dperl=disabled\n+      run: meson setup build -Dperl=disabled -Dcredential_helpers=wincred\n     - name: Compile\n       shell: pwsh\n       run: meson compile -C build\ndiff --git a/.gitlab-ci.yml b/.gitlab-ci.yml\nindex 3f29181708f..bb7d0c9ef1c 100644\n--- a/.gitlab-ci.yml\n+++ b/.gitlab-ci.yml\n@@ -164,7 +164,7 @@ build:msvc-meson:\n   extends: .msvc-meson\n   stage: build\n   script:\n-    - meson setup build -Dperl=disabled\n+    - meson setup build -Dperl=disabled -Dcredential_helpers=wincred\n     - meson compile -C build\n   artifacts:\n     paths:\ndiff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh\nindex 332ba960039..0df74610d06 100755\n--- a/ci/install-dependencies.sh\n+++ b/ci/install-dependencies.sh\n@@ -58,7 +58,7 @@ ubuntu-*|i386/ubuntu-*|debian-*)\n \t\tmake libssl-dev libcurl4-openssl-dev libexpat-dev wget sudo default-jre \\\n \t\ttcl tk gettext zlib1g-dev perl-modules liberror-perl libauthen-sasl-perl \\\n \t\tlibemail-valid-perl libio-pty-perl libio-socket-ssl-perl libnet-smtp-ssl-perl libdbd-sqlite3-perl libcgi-pm-perl \\\n-\t\tlibpcre2-dev meson ninja-build pkg-config \\\n+\t\tlibsecret-1-dev libpcre2-dev meson ninja-build pkg-config \\\n \t\t${CC_PACKAGE:-${CC:-gcc}} $PYTHON_PACKAGE\n \n \tcase \"$distro\" in\ndiff --git a/ci/lib.sh b/ci/lib.sh\nindex 84d11452650..f561884d401 100755\n--- a/ci/lib.sh\n+++ b/ci/lib.sh\n@@ -348,6 +348,9 @@ case \"$jobname\" in\n linux32)\n \tCC=gcc\n \t;;\n+linux-meson)\n+\tMESONFLAGS=\"$MESONFLAGS -Dcredential_helpers=libsecret,netrc\"\n+\t;;\n linux-musl-meson)\n \tMESONFLAGS=\"$MESONFLAGS -Dtest_utf8_locale=C.UTF-8\"\n \t;;\n@@ -359,6 +362,9 @@ linux-asan-ubsan)\n \texport NO_SVN_TESTS=LetsSaveSomeTime\n \tMAKEFLAGS=\"$MAKEFLAGS NO_PYTHON=YepBecauseP4FlakesTooOften\"\n \t;;\n+osx-meson)\n+\tMESONFLAGS=\"$MESONFLAGS -Dcredential_helpers=osxkeychain\"\n+\t;;\n esac\n \n MAKEFLAGS=\"$MAKEFLAGS CC=${CC:-cc}\"\n\n-- \n2.48.1.666.gff9fcf71b7.dirty\n\n"},{"id":"512725","messageId":"a901c673-ad55-4e48-b580-c48ff6eb138c@kdbg.org","threadId":"62967","inReplyTo":"Z7XFrDmcUVIaotqC@pks.im","subject":"Re: [PATCH 09/12] gitk: extract script to build Gitk","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2025-02-19T17:32:19Z","receivedAt":"2025-02-19T18:15:05Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 19.02.25 um 12:51 schrieb Patrick Steinhardt:\n> I guess the easiest way is to land the Meson support in gitk first,\n> pull those changes into Git and then I'll create a follow-up patch\n> where we start to use gitk as a subproject. Does that work for you?\n\nSure, let's do that.\n\n-- Hannes\n\n"},{"id":"512753","messageId":"390a138a-fc0d-4011-93d6-71efcb19e863@ramsayjones.plus.com","threadId":"62967","inReplyTo":"20250219-b4-pks-meson-contrib-v2-0-1ba5d7fde0b9@pks.im","subject":"Re: [-SPAM-] [PATCH v2 00/10] meson: wire up bits and pieces from \"contrib/\"","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2025-02-20T01:25:59Z","receivedAt":"2025-02-20T01:29:11Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\n\nOn 19/02/2025 13:13, Patrick Steinhardt wrote:\n> Hi,\n> \n> this patch series wires up a couple more bits and pieces, mostly from\n> \"contrib/\". Included are:\n> \n>   - The \"libsecret\", \"netrc\", \"osxkeychain\" and \"wincred\" credential\n>     helpers.\n> \n>   - The git-contact(1) script.\n> \n>   - Coccinelle via a new \"coccicheck\" target that generates the semantic\n>     check.\n> \n> Not a lot of stuff is missing after this small patch series, as far as I\n> am aware. Omissions that I know of include \"git-gui\", \"sparse\" and perf\n> tests.\n\nI regularly do 'make sparse' and 'make hdr-check' as part of my routine.\n\nNote that ci/run-static-analysis.sh uses several targets:\n\n  ci/run-static-analysis.sh:8:make coccicheck\n  ci/run-static-analysis.sh:29:make hdr-check ||\n  ci/run-static-analysis.sh:32:make check-pot\n\n  ... and ci/test-documentation.sh some more:\n\n  ci/test-documentation.sh:18:make check-builtins\n  ci/test-documentation.sh:19:make check-docs\n\n  ... and then there are some coverage targets like 'coverage-test' and\n'coverage-report' (I haven't actually used them in decades ... ;) ).\n\nATB,\nRamsay Jones\n\n\n\n"},{"id":"512755","messageId":"Z7bK8jDhJT4qRxvI@pks.im","threadId":"62967","inReplyTo":"390a138a-fc0d-4011-93d6-71efcb19e863@ramsayjones.plus.com","subject":"Re: [-SPAM-] [PATCH v2 00/10] meson: wire up bits and pieces from \"contrib/\"","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-02-20T06:25:54Z","receivedAt":"2025-02-20T06:26:00Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Thu, Feb 20, 2025 at 01:25:59AM +0000, Ramsay Jones wrote:\n> \n> \n> On 19/02/2025 13:13, Patrick Steinhardt wrote:\n> > Hi,\n> > \n> > this patch series wires up a couple more bits and pieces, mostly from\n> > \"contrib/\". Included are:\n> > \n> >   - The \"libsecret\", \"netrc\", \"osxkeychain\" and \"wincred\" credential\n> >     helpers.\n> > \n> >   - The git-contact(1) script.\n> > \n> >   - Coccinelle via a new \"coccicheck\" target that generates the semantic\n> >     check.\n> > \n> > Not a lot of stuff is missing after this small patch series, as far as I\n> > am aware. Omissions that I know of include \"git-gui\", \"sparse\" and perf\n> > tests.\n> \n> I regularly do 'make sparse' and 'make hdr-check' as part of my routine.\n> \n> Note that ci/run-static-analysis.sh uses several targets:\n> \n>   ci/run-static-analysis.sh:8:make coccicheck\n>   ci/run-static-analysis.sh:29:make hdr-check ||\n>   ci/run-static-analysis.sh:32:make check-pot\n> \n>   ... and ci/test-documentation.sh some more:\n> \n>   ci/test-documentation.sh:18:make check-builtins\n>   ci/test-documentation.sh:19:make check-docs\n> \n>   ... and then there are some coverage targets like 'coverage-test' and\n> 'coverage-report' (I haven't actually used them in decades ... ;) ).\n\nAh, `make hdr-check` is something I forgot about indeed, yes. I guess\nintroducing those two targets will be one of the next patch series then\nonce the current patch series both land.\n\nCoverage reports are something that Meson already does natively:\n\n    meson setup build -Db_coverage=true\n    meson compile -C build\n    meson test -C build\n    ninja -C build coverage-html\n\nPatrick\n"},{"id":"512853","messageId":"8bfd177a-8f31-4331-bb84-b60e3461adb3@ramsayjones.plus.com","threadId":"62967","inReplyTo":"Z7bK8jDhJT4qRxvI@pks.im","subject":"Re: [-SPAM-] [PATCH v2 00/10] meson: wire up bits and pieces from \"contrib/\"","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2025-02-21T19:50:55Z","receivedAt":"2025-02-21T19:54:07Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\n\nOn 20/02/2025 06:25, Patrick Steinhardt wrote:\n[snip]\n> Coverage reports are something that Meson already does natively:\n> \n>     meson setup build -Db_coverage=true\n>     meson compile -C build\n>     meson test -C build\n>     ninja -C build coverage-html\n\nI just tried this (I had to install 'gcovr' first) and the results\nlook pretty good:\n\n  ...\n\n  $ ninja -C build coverage-html\n  ninja: Entering directory `build'\n  [1/1] Generates HTML coverage report\n  Ubuntu LLVM version 18.1.3\n    Optimized build.\n  (INFO) Reading coverage data...\n  (INFO) Writing coverage report...\n  lines: 85.2% (144103 out of 169233)\n  functions: 93.3% (10404 out of 11151)\n  branches: 76.0% (78627 out of 103419)\n\n  Html coverage report can be found at file:///home/ramsay/git/build/meson-logs/coveragereport/index.html\n  $ \n\n:)\n\n[Although I have worked on projects where some of those numbers would have\nbeen considered too low! :( ]\n\n\nATB,\nRamsay Jones\n\n\n"},{"id":"515264","messageId":"CAGJzqsm4c7b+mO=Gya-zzaUsQ0c5CSrtG08Wgshu7-6epH6J3Q@mail.gmail.com","threadId":"62967","inReplyTo":"Z7RrbZqq9VrTg-Bz@pks.im","subject":"Re: [PATCH 06/12] meson: wire up credential helpers","fromName":"M Hickford","fromEmail":"mirth.hickford@gmail.com","sentAt":"2025-03-29T07:15:00Z","receivedAt":"2025-03-29T07:16:28Z","isPatch":true,"sender":{"key":"mirth.hickford@gmail.com","avatar":"https://avatars.githubusercontent.com/u/105314?v=4"},"body":"On Tue, 18 Feb 2025 at 11:14, Patrick Steinhardt <ps@pks.im> wrote:\n>\n> On Tue, Feb 18, 2025 at 10:11:23AM +0000, M Hickford wrote:\n> > > Note that ideally, we'd also wire up t0303 to be executed with each of\n> > > the credential helpers to verify their functionality. Unfortunately\n> > > though, none of them pass the test suite right now, so this is left for\n> > > a future change.\n> >\n> > Out of curiosity, which tests failed?\n>\n> Basically all of them. I originally had the patch at the bottom of this\n> email. With that in place, we re-run t0303 for every configured\n> credential helper, where `GIT_TEST_CREDENTIAL_HELPER` is set to the\n> respective credential helper under test. We have to disable parallel\n> tests there because the test state directories would otherwise conflict\n> with one another.\n>\n> Now you can for example:\n>\n>     $ meson setup build -Dcredential_helpers=libsecret,netrc\n>     $ meson test -C build t0303-*\n>\n> And that shows failures like:\n>\n>     --- expect-stderr   2025-02-18 11:09:33.323668205 +0000\n>     +++ stderr  2025-02-18 11:09:33.347668278 +0000\n>     @@ -1,2 +1,4 @@\n>     +\n>     +** (process:75536): CRITICAL **: 11:09:33.339: lookup failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.secrets was not provided by any .service files\n>      askpass: Username for 'https://example.com':\n>      askpass: Password for 'https://askpass-username@example.com':\n>     error: last command exited with $?=1\n>     not ok 1 - helper (/home/pks/Development/git/build/contrib/credential/libsecret/git-credential-libsecret) has no existing data\n>\n> I might be missing how exactly to set all of this up so that things\n> actually work. Maybe I have to do something specific for each of the\n> helpers via `GIT_TEST_CREDENTIAL_HELPER_SETUP`. But t0303 isn't wired up\n> via our Makefiles for any of the helpers, as far as I can see, so I'm\n> unable to figure out what such a setup would look like.\n>\n> Any hints would be welcome.\n\nBefore you can use git-credential-libsecret, you'd need to install\ngnome-keyring, run gnome-keyring-daemon, and create a keyring\n(choosing a password, can be empty).\nhttps://unix.stackexchange.com/a/548005/7732\n"},{"id":"515321","messageId":"Z-o8Rwkp5zy-eXPP@pks.im","threadId":"62967","inReplyTo":"CAGJzqsm4c7b+mO=Gya-zzaUsQ0c5CSrtG08Wgshu7-6epH6J3Q@mail.gmail.com","subject":"Re: [PATCH 06/12] meson: wire up credential helpers","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-03-31T06:55:03Z","receivedAt":"2025-03-31T06:55:07Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Sat, Mar 29, 2025 at 07:15:00AM +0000, M Hickford wrote:\n> On Tue, 18 Feb 2025 at 11:14, Patrick Steinhardt <ps@pks.im> wrote:\n> >\n> > On Tue, Feb 18, 2025 at 10:11:23AM +0000, M Hickford wrote:\n> > > > Note that ideally, we'd also wire up t0303 to be executed with each of\n> > > > the credential helpers to verify their functionality. Unfortunately\n> > > > though, none of them pass the test suite right now, so this is left for\n> > > > a future change.\n> > >\n> > > Out of curiosity, which tests failed?\n> >\n> > Basically all of them. I originally had the patch at the bottom of this\n> > email. With that in place, we re-run t0303 for every configured\n> > credential helper, where `GIT_TEST_CREDENTIAL_HELPER` is set to the\n> > respective credential helper under test. We have to disable parallel\n> > tests there because the test state directories would otherwise conflict\n> > with one another.\n> >\n> > Now you can for example:\n> >\n> >     $ meson setup build -Dcredential_helpers=libsecret,netrc\n> >     $ meson test -C build t0303-*\n> >\n> > And that shows failures like:\n> >\n> >     --- expect-stderr   2025-02-18 11:09:33.323668205 +0000\n> >     +++ stderr  2025-02-18 11:09:33.347668278 +0000\n> >     @@ -1,2 +1,4 @@\n> >     +\n> >     +** (process:75536): CRITICAL **: 11:09:33.339: lookup failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.secrets was not provided by any .service files\n> >      askpass: Username for 'https://example.com':\n> >      askpass: Password for 'https://askpass-username@example.com':\n> >     error: last command exited with $?=1\n> >     not ok 1 - helper (/home/pks/Development/git/build/contrib/credential/libsecret/git-credential-libsecret) has no existing data\n> >\n> > I might be missing how exactly to set all of this up so that things\n> > actually work. Maybe I have to do something specific for each of the\n> > helpers via `GIT_TEST_CREDENTIAL_HELPER_SETUP`. But t0303 isn't wired up\n> > via our Makefiles for any of the helpers, as far as I can see, so I'm\n> > unable to figure out what such a setup would look like.\n> >\n> > Any hints would be welcome.\n> \n> Before you can use git-credential-libsecret, you'd need to install\n> gnome-keyring, run gnome-keyring-daemon, and create a keyring\n> (choosing a password, can be empty).\n> https://unix.stackexchange.com/a/548005/7732\n\nHm, okay. Ideally, the test setup should take care of all of this and\nalso depend on gnome-keyring being available in the first place. Anyway,\nthis seems like a preexisitng issue that would also be the case with our\nMakefile. As such it's not specific to the setup via Meson and I'm going\nto leave it at that. #leftoverbits\n\nThanks for the hint!\n\nPatrick\n"}]}