Skip to content

FAILED: Rebase shears/seen (#29549369275)#313

Draft
gitforwindowshelper[bot] wants to merge 16 commits into
base/shears/seen-29549369275from
shears/seen-29549369275
Draft

FAILED: Rebase shears/seen (#29549369275)#313
gitforwindowshelper[bot] wants to merge 16 commits into
base/shears/seen-29549369275from
shears/seen-29549369275

Conversation

@gitforwindowshelper

Copy link
Copy Markdown

Workflow run failed to rebase shears/seen.

Rebase Summary: seen

From: 05faa940c3 (Merge tag 'v2.55.0.windows.3', 2026-07-16) (35f921a6c9..05faa940c3)

Resolved: a551cb2 (vcbuild: install ARM64 dependencies when building ARM64 binaries, 2020-01-31)

adapted ARM64 vcpkg_install.bat examples to use current compat/vcbuild/ path instead of lib/compat/vcbuild/

Range-diff
  • 1: a551cb2 ! 1: 50f49bc vcbuild: install ARM64 dependencies when building ARM64 binaries

    @@ Commit message
         Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
         Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
     
    - ## lib/compat/vcbuild/README ##
    -@@ lib/compat/vcbuild/README: The Steps to Build Git with VS2015 or VS2017 from the command line.
    + ## compat/vcbuild/README ##
    +@@ compat/vcbuild/README: The Steps to Build Git with VS2015 or VS2017 from the command line.
         Prompt or from an SDK bash window:
      
         $ cd <repo_root>
    --   $ ./lib/compat/vcbuild/vcpkg_install.bat
    -+   $ ./lib/compat/vcbuild/vcpkg_install.bat x64-windows
    +-   $ ./compat/vcbuild/vcpkg_install.bat
    ++   $ ./compat/vcbuild/vcpkg_install.bat x64-windows
     +
     +   or
     +
    -+   $ ./lib/compat/vcbuild/vcpkg_install.bat arm64-windows
    ++   $ ./compat/vcbuild/vcpkg_install.bat arm64-windows
      
         The vcpkg tools and all of the third-party sources will be installed
         in this folder:
     
    - ## lib/compat/vcbuild/vcpkg_copy_dlls.bat ##
    -@@ lib/compat/vcbuild/vcpkg_copy_dlls.bat: REM ================================================================
    + ## compat/vcbuild/vcpkg_copy_dlls.bat ##
    +@@ compat/vcbuild/vcpkg_copy_dlls.bat: REM ================================================================
      	@FOR /F "delims=" %%D IN ("%~dp0") DO @SET cwd=%%~fD
      	cd %cwd%
      
    @@ lib/compat/vcbuild/vcpkg_copy_dlls.bat: REM ====================================
      
      	IF [%1]==[release] (
     
    - ## lib/compat/vcbuild/vcpkg_install.bat ##
    -@@ lib/compat/vcbuild/vcpkg_install.bat: REM ================================================================
    + ## compat/vcbuild/vcpkg_install.bat ##
    +@@ compat/vcbuild/vcpkg_install.bat: REM ================================================================
      
      	SETLOCAL EnableDelayedExpansion
      
    @@ lib/compat/vcbuild/vcpkg_install.bat: REM ======================================
      	@FOR /F "delims=" %%D IN ("%~dp0") DO @SET cwd=%%~fD
      	cd %cwd%
      
    -@@ lib/compat/vcbuild/vcpkg_install.bat: REM ================================================================
    +@@ compat/vcbuild/vcpkg_install.bat: REM ================================================================
      	echo Successfully installed %cwd%vcpkg\vcpkg.exe
      
      :install_libraries

Resolved: 9bc9746 (cmake: allow building for Windows/ARM64, 2020-12-04)

adapted patch to use upstream's compat/vcbuild/ path (without lib/ prefix) while preserving the patch's ${VCPKG_ARCH} additions

Range-diff
  • 1: 9bc9746 ! 1: 7253c80 cmake: allow building for Windows/ARM64

    @@ Commit message
     
      ## contrib/buildsystems/CMakeLists.txt ##
     @@ contrib/buildsystems/CMakeLists.txt: if(USE_VCPKG)
    - 	set(VCPKG_DIR "${CMAKE_SOURCE_DIR}/lib/compat/vcbuild/vcpkg")
    + 	set(VCPKG_DIR "${CMAKE_SOURCE_DIR}/compat/vcbuild/vcpkg")
      	if(NOT EXISTS ${VCPKG_DIR})
      		message("Initializing vcpkg and building the Git's dependencies (this will take a while...)")
    --		execute_process(COMMAND ${CMAKE_SOURCE_DIR}/lib/compat/vcbuild/vcpkg_install.bat)
    -+		execute_process(COMMAND ${CMAKE_SOURCE_DIR}/lib/compat/vcbuild/vcpkg_install.bat ${VCPKG_ARCH})
    +-		execute_process(COMMAND ${CMAKE_SOURCE_DIR}/compat/vcbuild/vcpkg_install.bat)
    ++		execute_process(COMMAND ${CMAKE_SOURCE_DIR}/compat/vcbuild/vcpkg_install.bat ${VCPKG_ARCH})
      	endif()
     -	list(APPEND CMAKE_PREFIX_PATH "${VCPKG_DIR}/installed/x64-windows")
     +	list(APPEND CMAKE_PREFIX_PATH "${VCPKG_DIR}/installed/${VCPKG_ARCH}")
    @@ contrib/buildsystems/CMakeLists.txt: string(REPLACE "@USE_LIBPCRE2@" "" git_buil
      string(REPLACE "@WITH_BREAKING_CHANGES@" "" git_build_options "${git_build_options}")
      string(REPLACE "@X@" "${EXE_EXTENSION}" git_build_options "${git_build_options}")
      if(USE_VCPKG)
    --	string(APPEND git_build_options "PATH=\"$PATH:$TEST_DIRECTORY/../lib/compat/vcbuild/vcpkg/installed/x64-windows/bin\"\n")
    -+	string(APPEND git_build_options "PATH=\"$PATH:$TEST_DIRECTORY/../lib/compat/vcbuild/vcpkg/installed/${VCPKG_ARCH}/bin\"\n")
    +-	string(APPEND git_build_options "PATH=\"$PATH:$TEST_DIRECTORY/../compat/vcbuild/vcpkg/installed/x64-windows/bin\"\n")
    ++	string(APPEND git_build_options "PATH=\"$PATH:$TEST_DIRECTORY/../compat/vcbuild/vcpkg/installed/${VCPKG_ARCH}/bin\"\n")
      endif()
      file(WRITE ${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS ${git_build_options})
      

FAILED: 2873943 (ci(vs-build) also build Windows/ARM64 artifacts, 2020-11-29)

Unexpected AI decision: ''. Full output:

● Check REBASE_HEAD commit (shell)
  │ cd "/home/runner/work/git-for-windows-automation/git-for-windows-automation/git/rebase-worktree-
  │ seen" && git show --stat REBASE_HEAD && echo "---SUBJECT---" && git log -1 --format=%s
  │ REBASE_HEAD
  └ 17 lines…

● Check if upstreamed (shell)
  │ cd "/home/runner/work/git-for-windows-automation/git-for-windows-automation/git/rebase-worktree-
  │ seen" && git range-diff REBASE_HEAD^! REBASE_HEAD.. 2>&1 | head -20
  └ 21 lines…

No upstream correspondence found. Let me try with higher creation factor and examine the conflict.

● Find conflict markers (shell)
  │ cd "/home/runner/work/git-for-windows-automation/git-for-windows-automation/git/rebase-worktree-
  │ seen" && grep -n '<<<<<<<\|=======\|>>>>>>>' .github/workflows/main.yml
  └ 4 lines…

● See the patch (shell)
  │ cd "/home/runner/work/git-for-windows-automation/git-for-windows-automation/git/rebase-worktree-
  │ seen" && git show REBASE_HEAD -- .github/workflows/main.yml
  └ 69 lines…

● Try higher creation factor (shell)
  │ cd "/home/runner/work/git-for-windows-automation/git-for-windows-automation/git/rebase-worktree-
  │ seen" && git range-diff --creation-factor=200 REBASE_HEAD^! REBASE_HEAD.. 2>&1 | head -5
  └ 6 lines…

● Read main.yml
  │ ~/work/git-for-windows-automation/git-for-windows-automation/git/rebase-worktree-seen/.github/wo
  │ rkflows/main.yml
  └ L185:220 (36 lines read)

I see the conflict. Upstream moved paths from `lib\compat\vcbuild\` to `compat\vcbuild\` while the patch added `${{ matrix.arch }}` parameterization. I need to combine both: use upstream's paths (`compat\vcbuild\`) with the patch's arch parameterization.

● Edit main.yml +2 -11
  └ ~/work/git-for-windows-automation/git-for-windows-automation/git/rebase-worktree-seen/.github/wo
    rkflows/main.yml

● Verify no remaining conflict markers (shell)
  │ cd "/home/runner/work/git-for-windows-automation/git-for-windows-automation/git/rebase-worktree-
  │ seen" && grep -n '<<<<<<<\|=======\|>>>>>>>' .github/workflows/main.yml; echo "exit: $?"
  └ 2 lines…

No remaining conflict markers. Let me stage the file.

● Stage resolved file (shell)
  │ cd "/home/runner/work/git-for-windows-automation/git-for-windows-automation/git/rebase-worktree-
  │ seen" && git add .github/workflows/main.yml
  └ 1 line…

Resolved the conflict by combining upstream's path change (`compat\vcbuild\` instead of `lib\compat\vcbuild\`) with the patch's ARM64 arch parameterization (`${{ matrix.arch }}-windows`).

continue -- used upstream's compat\vcbuild\ paths with the patch's matrix.arch parameterization for ARM64 support



Changes    +2 -11
AI Credits 25 (42s)
Tokens     ↑ 194.1k (175.5k cached, 17.4k written) • ↓ 1.9k (88 reasoning)
Resume     copilot --resume=9b864ed3-18fc-4139-98d5-28687872f198

Truncated; see the full conflict report in the workflow run summary.

dscho and others added 16 commits July 17, 2026 02:13
On Windows, symbolic links come in two flavors: file symlinks and
directory symlinks.  Since Git was born on Linux where this distinction
does not exist, Git for Windows has to auto-detect the type by looking
at the target.  When the target does not yet exist at symlink creation
time, Git for Windows creates a "phantom" file symlink and later, once
checkout is complete, calls `CreateFileW()` on the target to check
whether it is actually a directory.

If the symlink target is a UNC path (e.g. `\\attacker\share`), this
auto-detection triggers an SMB connection to the remote host.  Windows
performs NTLM authentication by default for such connections, which
means a crafted repository can exfiltrate the cloning user's NTLMv2
hash to an attacker-controlled server without any user interaction
beyond `git clone -c core.symlinks=true <url>`.

There are ways to specify UNC paths that start with only a single
backslash (e.g. `\??\UNC\host\share`); All of them do start like
that, though, so let's use that as a tell-tale that we should skip
the auto-detection in `process_phantom_symlink()`. The symlink is
then left as a file symlink (the `mklink` default), and a warning is
emitted suggesting the user set the `symlink` gitattribute to `dir`
if a directory symlink is needed.  When the attribute is already set,
auto-detection is never invoked in the first place, so that code path
is unaffected.

This is the same class of vulnerability as CVE-2025-66413
(GHSA-hv9c-4jm9-jh3x)
and follows the same general mitigation pattern that MinTTY adopted for
ANSI escape sequences referencing network share paths
(GHSA-jf4m-m6rv-p6c5).

Note that there are legitimate paths starting with a single backslash
that are _not_ network paths: drive-less absolute paths are interpreted
as relative to the current working directory's drive. In practice, these
are highly uncommon (and brittle, just one working directory change
away from breaking). In any case, the only consequence is now that the
symlink type of those has to be specified via Git attributes, is all.

Reported-by: Justin Lee <jessdhoctor@gmail.com>
Addresses: CVE-2026-32631
Addresses: GHSA-9j5h-h4m7-85hx
Assisted-by: Claude Opus 4.6
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This merges the fix for CVE-2026-32631 into the v2.53.x release branch.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
When a Unix socket is initialized, the current directory's path is
stored so that the cleanup code can `chdir()` back to where it was
before exit.

If the path that needs to be stored exceeds the default size of the
`sun_path` attribute of `struct sockaddr_un` (which is defined as a
108-sized byte array on Linux), a larger buffer needs to be allocated so
that it can hold the path, and it is the responsibility of the
`unix_sockaddr_cleanup()` function to release that allocated memory.

In Git's CI, this stack allocation is not necessary because the code is
checked out to `/home/runner/work/git/git`. Concatenate the path
`t/trash directory.t0301-credential-cache/.cache/git/credential/socket`
and a terminating NUL, and you end up with 96 bytes, 12 shy of the
default `sun_path` size.

However, I use worktrees with slightly longer paths:
`/home/me/projects/git/yes/i/nest/worktrees/to/organize/them/` is more
in line with what I have. When I recently tried to locally reproduce a
failure of the `linux-leaks` CI job, this t0301 test failed (where it
had not failed in CI).

The reason: When `credential-cache` tries to reach its daemon initially
by calling `unix_sockaddr_init()`, it is expected that the daemon cannot
be reached (the idea is to spin up the daemon in that case and try
again). However, when this first call to `unix_sockaddr_init()` fails,
the code returns early from the `unix_stream_connect()` function
_without_ giving the cleanup code a chance to run, skipping the
deallocation of above-mentioned path.

The fix is easy: do not return early but instead go directly to the
cleanup code.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In some implementations, `regexec_buf()` assumes that it is fed lines;
Without `REG_NOTEOL` it thinks the end of the buffer is the end of a
line. Which makes sense, but trips up this case because we are not
feeding lines, but rather a whole buffer. So the final newline is not
the start of an empty line, but the true end of the buffer.

This causes an interesting bug:

  $ echo content >file.txt
  $ git grep --no-index -n '^$' file.txt
  file.txt:2:

This bug is fixed by making the end of the buffer consistently the end
of the final line.

The patch was applied from
https://lore.kernel.org/git/20250113062601.GD767856@coredump.intra.peff.net/

Reported-by: Olly Betts <olly@survex.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
These fixes have been sent to the Git mailing list but have not been
picked up by the Git project yet.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The `windows-latest` runner image migration that began on June 8, 2026
and completes on June 15, 2026 switches the default Visual Studio
install from VS 2022 (v17) to VS 2026 (v18), per
actions/runner-images#14017.

CMake 4.x picks up the new generator name "Visual Studio 18 2026"
automatically and, crucially, writes the solution file with the new
`.slnx` (XML) extension rather than `.sln`. See
https://github.com/Kitware/CMake/blob/v4.3.2/Source/cmGlobalVisualStudioGenerator.cxx#L1147-L1159
where `GetSLNFile()` appends an "x" to the filename when the generator
version is `VS18` or newer.

As a result, the `MSBuild` step in the `vs-build` job fails with

	MSBUILD : error MSB1009: Project file does not exist.
	Switch: git.sln

because the file CMake actually wrote is `git.slnx`. An example of the
failure can be seen at
https://github.com/git-for-windows/git/actions/runs/27264770241/job/80556419519.

Teach the step to prefer `git.slnx` and fall back to `git.sln` so that
it works on both the new image and any runner still on VS 2022 during
the week-long staggered rollout. The conditional is written in
PowerShell rather than bash so the step stays on the default shell:
`microsoft/setup-msbuild@v3` adds `msbuild` to the Windows `PATH` only,
and an MSYS2 bash spawned by the SDK does not pick it up (an earlier
attempt at this fix using `shell: bash` failed with
`msbuild: command not found`, see
https://github.com/git-for-windows/git/actions/runs/27290221733/job/80608493655).
Letting MSBuild itself discover the solution by omitting the project
argument is not an option here either: CMake emits all `*.vcxproj`
files (one per `add_executable`/`add_library`, e.g.
`git-daemon.vcxproj`, `common-main.vcxproj`, `ALL_BUILD.vcxproj`, ...)
into the same build root as the solution file, and MSBuild's
auto-discovery in
`ProcessProjectSwitch()` (`dotnet/msbuild`, `src/MSBuild/XMake.cs`)
rejects that combination as `AmbiguousProjectError` because it only
disambiguates the special case of exactly two projects where one has a
`.proj` extension.

Additionally, drop the `-property:PlatformToolset=v142` argument that
had been carried since 889cacb (ci: configure GitHub Actions for
CI/PR, 2020-04-11), when this job was first configured for VS 2019.
The VS 2026 install on `windows-latest` only ships the v144 toolset
along with a v143 compatibility component
(`Microsoft.VisualStudio.Component.VC.14.44.17.14.x86.x64`); v142 is
no longer present, so the explicit pin would now also fail in its own
right. Removing it lets MSBuild use whatever toolset CMake selected
during configuration (v143 on a VS 2022 runner, v144 on a VS 2026 one),
which keeps the configure and build steps consistent with each other
regardless of which image picked up the job.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Assisted-by: Opus 4.7
The vcpkg_install batch file depends on the availability of a
working Git on the CMD path. This may not be present if the user
has selected the 'bash only' option during Git-for-Windows install.

Detect and tell the user about their lack of a working Git in the CMD
window.

Fixes git-for-windows#2348.
A separate PR git-for-windows/build-extra#258
now highlights the recommended path setting during install.

Signed-off-by: Philip Oakley <philipoakley@iee.email>
The vcpkg downloads may not succeed. Warn careful readers of the time out.

A simple retry will usually resolve the issue.

Signed-off-by: Philip Oakley <philipoakley@iee.email>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Co-authored-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: Ian Bearman <ianb@microsoft.com>
Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In this context, a "feature" is a dependency combined with its own
dependencies.

Signed-off-by: Ian Bearman <ianb@microsoft.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@gitforwindowshelper

Copy link
Copy Markdown
Author

Artifacts: release assets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants