You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Committing selected files during a cherry-pick ends the cherry-pick and credits me as the author #35096
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
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.mdprintf"# Sample pick\nLine from main.\nLine from the other branch.\n"> README.md
git add README.md
Add the folder as a project in T3 Code and open a new thread in it.
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.
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")
Activity