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

[PATCH v2 0/3] Hot fixes from Git for Windows v2.49.0-rc0

From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
Date
Mar 6, 2025, 10:26 UTC
Message-ID
<pull.1867.v2.git.1741256780.gitgitgadget@gmail.com>
In-Reply-To
<pull.1867.git.1740671049.gitgitgadget@gmail.com>

I needed many patches to make Git for Windows v2.49.0-rc0 compile and run the many, many CI jobs successfully. These here patches even apply to upstream Git. (Technically, the Meson sorting patch is not required to compile, but it was the fall-out from many required adjustments to make the Meson jobs happy.)

Changes since v1:
 * I spent two hours investigating under which circumstances the (correct)
   compiler error about a non-writable pw_gecos field triggers, and
   augmented the commit message accordingly.
 * Since -rc1, another breaking change necessitated yet another hot fix,
   which I invites to this patch fest (and the patch series hence had to be
   rebased to the current tip of Git's main branch).
Johannes Schindelin (3):
  ident: stop assuming that `gw_gecos` is writable
  meson: fix sorting
  cmake: generalize the handling of the `CLAR_TEST_OBJS` list
 contrib/buildsystems/CMakeLists.txt | 12 ++++++++----
 ident.c                             |  2 +-
 meson.build                         |  2 +-
 3 files changed, 10 insertions(+), 6 deletions(-)
base-commit: e969bc875963a10890d61ba84eab3a460bd9e535
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1867%2Fdscho%2Fg4w-hot-fixes-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1867/dscho/g4w-hot-fixes-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/1867
Range-diff vs v1:
 1:  045c11dc1d5 ! 1:  3e9ccffc747 ident: stop assuming that `gw_gecos` is writable
     @@ Commit message
          writable in the first place), so let's switch the loop variable type to
          `const char *`.
      
     +    This is not a new problem, but what is new is the Meson build. While it
     +    does not trigger in CI builds, imitating the commands of
     +    `ci/run-build-and-tests.sh` in a regular Git for Windows SDK (`meson
     +    setup build . --fatal-meson-warnings --warnlevel 2 --werror --wrap-mode
     +    nofallback -Dfuzzers=true` followed by `meson compile -C build --`
     +    results in this beautiful error:
     +
     +      "cc" [...] -o libgit.a.p/ident.c.obj "-c" ../ident.c
     +      ../ident.c: In function 'copy_gecos':
     +      ../ident.c:68:18: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
     +         68 |         for (src = get_gecos(w); *src && *src != ','; src++) {
     +            |                  ^
     +      cc1.exe: all warnings being treated as errors
     +
     +    Now, why does this not trigger in CI? The answer is as simple as it is
     +    puzzling: The `win+Meson` job completely side-steps Git for Windows'
     +    development environment, opting instead to use the GCC that is on the
     +    `PATH` in GitHub-hosted `windows-latest` runners. That GCC is pinned to
     +    v12.2.0 and targets the UCRT (unlikely to change any time soon, see
     +    https://github.com/actions/runner-images/blob/win25/20250303.1/images/windows/toolsets/toolset-2022.json#L132-L141).
     +    That is in stark contrast to Git for Windows, which uses GCC v14.2.0 and
     +    targets MSVCRT. Git for Windows' `Makefile`-based build also obviously
     +    uses different compiler flags, otherwise this compile error would have
     +    had plenty of opportunity in almost 14 years to surface.
     +
     +    In other words, contrary to my expectations, the `win+Meson` job is
     +    ill-equipped to replace the `win build` job because it exercises a
     +    completely different tool version/compiler flags vector than what Git
     +    for Windows needs.
     +
     +    Nevertheless, there is currently this huge push, including breaking
     +    changes after -rc1 and all, for switching to Meson. Therefore, we need
     +    to make it work, somehow, even in Git for Windows' SDK, hence this
     +    patch, at this point in time.
     +
          Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
      
       ## ident.c ##
 2:  9d1faeae8a4 = 2:  4e9ab3e011f meson: fix sorting
 -:  ----------- > 3:  59a2e586e1a cmake: generalize the handling of the `CLAR_TEST_OBJS` list
-- 
gitgitgadget
Previous: Patrick SteinhardtNext: Johannes Schindelin via GitGitGadget
Message 6 of 14 in “Hot fixes from Git for Windows v2.49.0-rc0”
  1. 0/2 Hot fixes from Git for Windows v2.49.0-rc0Johannes Schindelin via GitGitGadget, Feb 27, 2025
  2. 1/2 ident: stop assuming that `gw_gecos` is writableJohannes Schindelin via GitGitGadget, Feb 27, 2025
  3. Junio C HamanoFeb 27, 2025
  4. 2/2 meson: fix sortingJohannes Schindelin via GitGitGadget, Feb 27, 2025
  5. Patrick SteinhardtFeb 28, 2025
  6. 0/3 Hot fixes from Git for Windows v2.49.0-rc0Johannes Schindelin via GitGitGadget, Mar 6, 2025
  7. 1/3 ident: stop assuming that `gw_gecos` is writableJohannes Schindelin via GitGitGadget, Mar 6, 2025
  8. Patrick SteinhardtMar 6, 2025
  9. Johannes SchindelinMar 6, 2025
  10. Junio C HamanoMar 6, 2025
  11. Patrick SteinhardtMar 7, 2025
  12. Junio C HamanoMar 7, 2025
  13. 2/3 meson: fix sortingJohannes Schindelin via GitGitGadget, Mar 6, 2025
  14. 3/3 cmake: generalize the handling of the `CLAR_TEST_OBJS` listJohannes Schindelin via GitGitGadget, Mar 6, 2025

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

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