Skip to content

armgit / orca

Public Imported from GitHub
0

Orca is the place for working with a fleet of agents (e.g. Grok Bot, Claude Code). Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

fix(git): omit commit subjects from branch-cleanup cherry check (#35390)

OrcaWinc610633ed019
diff --git a/src/main/git/remove-worktree-branch-cleanup.test.ts b/src/main/git/remove-worktree-branch-cleanup.test.ts
index 5314f8c4b03..f339d4de7bf 100644
--- a/src/main/git/remove-worktree-branch-cleanup.test.ts
+++ b/src/main/git/remove-worktree-branch-cleanup.test.ts
@@ -378,8 +378,8 @@ branch refs/heads/main
'git rev-list --right-only --merges --count base123...refs/heads/feature/test': {
stdout: '0\n'
},
- 'git cherry -v base123 refs/heads/feature/test': {
- stdout: '- def456 fix: already squash-merged\n'
+ 'git cherry base123 refs/heads/feature/test': {
+ stdout: '- def456\n'
},
'git rev-parse --verify --quiet HEAD^{commit}': { stdout: 'base123\n' },
'git merge-base base123 refs/heads/feature/test': { stdout: 'base000\n' },
diff --git a/src/shared/git-branch-cleanup.test.ts b/src/shared/git-branch-cleanup.test.ts
index 9c4b5ce5499..f16a74a5561 100644
--- a/src/shared/git-branch-cleanup.test.ts
+++ b/src/shared/git-branch-cleanup.test.ts
@@ -169,7 +169,7 @@ describe('branchHasNoUnmergedChangesOnAnyTarget', () => {
expect(runGit).toHaveBeenCalledWith(['patch-id', '--stable'], { stdin: 'branch-diff' })
expect(runGit).toHaveBeenCalledWith(['patch-id', '--stable'], { stdin: 'squash-diff' })
- expect(runGit).not.toHaveBeenCalledWith(['cherry', '-v', 'target', 'refs/heads/feature/test'])
+ expect(runGit).not.toHaveBeenCalledWith(['cherry', 'target', 'refs/heads/feature/test'])
// Only merge-tree's throwaway tree writes go to a scratch object store.
const discarding = vi
.mocked(runGit)
@@ -300,7 +300,7 @@ describe('branchHasNoUnmergedChangesOnAnyTarget', () => {
const runGit = baseProofResponses({
'merge-tree --write-tree target refs/heads/feature/test': unsupported,
'rev-list --right-only --merges --count target...refs/heads/feature/test': '0\n',
- 'cherry -v target refs/heads/feature/test': '+ branch-only commit\n'
+ 'cherry target refs/heads/feature/test': '+ branch-only\n'
})
const capabilities = new GitCapabilityCache()
diff --git a/src/shared/git-branch-cleanup.ts b/src/shared/git-branch-cleanup.ts
index 4b7d75b208a..e441cf5716a 100644
--- a/src/shared/git-branch-cleanup.ts
+++ b/src/shared/git-branch-cleanup.ts
@@ -147,7 +147,7 @@ async function branchOnlyCommitsArePatchEquivalent(
targetOid: string,
branchRef: string
): Promise<boolean> {
- const stdout = await readOptionalGitStdout(runGit, ['cherry', '-v', targetOid, branchRef])
+ const stdout = await readOptionalGitStdout(runGit, ['cherry', targetOid, branchRef])
if (stdout === null) {
return false
}