Skip to content

[Bug]: Commit goes through with conflict markers still in the file #35095

Closed

Description

@only21mil

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. Make a merge that conflicts in one file and leave the conflict unresolved:
    git init -b main sample-merge && cd sample-merge
    echo "greeting = hello" > notes.txt && git add notes.txt && git commit -m "Add notes"
    git switch -c feature && echo "greeting = hi from feature" > notes.txt && git commit -am "Feature greeting"
    git switch main && echo "greeting = hi from main" > notes.txt && git commit -am "Main greeting"
    git merge feature   # CONFLICT (content): Merge conflict in notes.txt
  2. Add the folder as a project in T3 Code and open a new thread in it.
  3. In the thread details panel open Git action options > Commit, type a message and click Commit.
  4. Run git show HEAD:notes.txt.

Expected behavior

T3 Code tells me notes.txt still has an unresolved conflict and does not commit it, as plain git commit does in the same state ("Committing is not possible because you have unmerged files").

Actual behavior

The commit dialog lists notes.txt as an ordinary +4 / -0 change with no warning. Commit goes through ("Committed 5b2afa1"), the merge is concluded as a two-parent commit, and the committed file still has the <<<<<<<, ======= and >>>>>>> lines:

$ git show HEAD:notes.txt
<<<<<<< HEAD
greeting = hi from main
=======
greeting = hi from feature
>>>>>>> feature

Impact

Minor bug or occasional failure

Version or commit

main, commit b68aedf

Environment

Linux, web client in Chromium, dev server from source with a fresh home, Node 26.12.1, git 2.53.

Logs or stack traces

Screenshots, recordings, or supporting files

main b68aedf: with the merge conflict unresolved, the panel reads "Committed 5b2afa1"
main b68aedf: with the merge conflict unresolved, the panel reads "Committed 5b2afa1"

Workaround

Resolve every conflict before committing from T3 Code, or commit the merge from a terminal.

A fix is in #33115.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions