Skip to content

[Bug]: commit-all commits unresolved UTF-16 merge markers #36816

Closed

Description

@StiensWout

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. In a Git repository, set README.md text working-tree-encoding=UTF-16 in .gitattributes, and commit a BOM-prefixed UTF-16LE README.
  2. Create two branches that change the same line differently. Merge them to leave README.md conflicted, with Git's unmerged index entries intact.
  3. Open that project in T3 Code and use Commit from the Git action menu. Leave all changed files selected, enter a commit message and submit.

Expected behavior

Refuse the commit until the conflict markers are resolved, preserving HEAD and the unresolved index entries.

Actual behavior

The merge succeeds and HEAD contains the unresolved <<<<<<<, ======= and >>>>>>> lines. Git detects the markers in its decoded view, but T3 rereads the working file as UTF-8 and misses them before staging all files.

Impact

Minor bug or occasional failure. Deterministic for this encoding and unresolved state; the result is an unintended commit containing merge markers.

Version or commit

main @ ee4ef06; reproduced again against refreshed main before filing.

Environment

Linux, Git, isolated web client with the free replay provider. BOM-prefixed UTF-16LE via working-tree-encoding=UTF-16. Other encoding variants are not claimed.

Logs or stack traces

The focused public GitVcsDriver.commit test fails on main because commit-all succeeds while README.md still contains conflict markers. The real-web paired scenario also commits on base and refuses on the fix.

Screenshots, recordings, or supporting files

Before: https://pub-b182a4071edc4521829926b34990540b.r2.dev/files/c7eb80de-5d57-4cd3-9c26-91a4f573cd1e/utf16-merge-base.png

Workaround

Resolve the markers manually before committing. The existing selected-file guard refuses in-progress merges, but all-files-selected uses commit-all.

Found by the maintainer bughunt and independently confirmed by Claude Opus 5.5. Related merged fixes #35132 and #35120 cover ordinary conflict markers and selected-file operation guards respectively; this report concerns encoded working files.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    vouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions