Skip to content

[Bug]: Committing selected files during a cherry-pick ends the cherry-pick and credits me as the author #35096

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. Cherry-pick another author's commit so it stops on a conflict, then resolve and stage the conflict:
    git init -b main sample-pick && cd sample-pick
    echo "# Sample pick" > README.md && git add README.md && git commit -m "Initial commit"
    git switch -c other
    printf "# Sample pick\nLine from the other branch.\n" > README.md
    echo "picked content" > picked.txt
    git add README.md picked.txt
    git -c user.name="Sample Author" -c user.email=author@example.com commit -m "Add picked file and README line"
    git switch main
    printf "# Sample pick\nLine from main.\n" > README.md && git commit -am "Main README line"
    git cherry-pick other   # CONFLICT (content): Merge conflict in README.md
    printf "# Sample pick\nLine from main.\nLine from the other branch.\n" > README.md
    git add README.md
  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. Click Edit, clear the checkbox for README.md so only picked.txt is selected, type a message and click Commit.
  4. Run git log -1 --format='%an %s' and git status.

Expected behavior

T3 Code refuses and the cherry-pick stays in progress, as git commit -m "Add picked file" -- picked.txt does in the same state ("fatal: cannot do a partial commit during a cherry-pick.").

Actual behavior

The commit goes through ("Committed fe037d1") with me as the author instead of Sample Author. The cherry-pick is gone (git status no longer shows it and .git/CHERRY_PICK_HEAD is removed), and the resolved README.md change is left behind as an unstaged edit:

$ git log -1 --format='%an %s'
Test User Add picked file
$ git status
On branch main
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   README.md

no changes added to commit (use "git add" and/or "git commit -a")

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: after committing only picked.txt during the cherry-pick, the panel reads "Committed fe037d1" with one uncommitted change left
main b68aedf: after committing only picked.txt during the cherry-pick, the panel reads "Committed fe037d1" with one uncommitted change left

Workaround

Finish the cherry-pick with git cherry-pick --continue in a terminal instead of committing selected files from T3 Code.

A fix is in #28912.

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