git pull fails updating ORIG_HEAD on Windows in 2.54.0.windows.1
### Existing issues matching what you're seeing
- [x] I was not able to find an open or closed issue matching what I'm seeing
### Git for Windows version
```shell
git version 2.54.0.windows.1
cpu: x86_64
built from commit: 2b8a3ab140826ac423c2845ef81d4c6ac4f7bf3c
sizeof-long: 4
sizeof-size_t: 8
shell-path: D:/git-sdk-64-build-installers/usr/bin/sh
rust: disabled
feature: fsmonitor--daemon
gettext: enabled
libcurl: 8.19.0
OpenSSL: OpenSSL 3.5.6 7 Apr 2026
zlib: 1.3.2
SHA-1: SHA1_DC
SHA-256: SHA256_BLK
default-ref-format: files
default-hash: sha1
```
### Windows version
Windows 11
### Windows CPU architecture
x86_64 (64-bit)
### Additional Windows version information
```shell
Microsoft Windows [Versión 10.0.26200.8457]
```
### Options set during installation
```shell
Editor Option: VIM
Custom Editor Path:
Default Branch Option:
Path Option: Cmd
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: OpenSSL
CRLF Option: CRLFAlways
Bash Terminal Option: MinTTY
Git Pull Behavior Option: Merge
Use Credential Manager: Enabled
Performance Tweaks FSCache: Enabled
Enable Symlinks: Disabled
Enable FSMonitor: Disabled
```
### Other interesting things
`git fsck --full` reports a healthy repository. `git fetch origin` succeeds. `git push --dry-run origin master` succeeds. `git update-ref ORIG_HEAD HEAD` fails with the same error. The persistent reproduction happened without a stale `ORIG_HEAD.lock` present. The issue also breaks VS Code Sync Changes.
### Terminal/shell
PowerShell 5.1 from VS Code
### Commands that trigger the issue
```shell
git pull --ff-only origin master
Also reproducible with:
git update-ref ORIG_HEAD HEAD
```
### Expected behaviour
`git pull --ff-only origin master` should succeed or report `Already up to date.` when there is nothing to merge. Updating `ORIG_HEAD` should not fail in this no-op or ahead-only case.
### Actual behaviour
Git fails with:
```text
fatal: update_ref failed for ref 'ORIG_HEAD': couldn't set 'ORIG_HEAD'
```
This also breaks VS Code Sync Changes because the pull step fails. `FETCH_HEAD` can be equal to or behind local `HEAD`, so there is no real merge/update work to do, yet the command still aborts on `ORIG_HEAD`.
### Repository
_No response_
1 条评论