fix: address pull reconciliation policy errors (#5562)

This commit is contained in:
Jinjing
2026-06-16 20:13:46 -07:00
committed by GitHub
parent dda576b8c1
commit 5903b4a742
8 changed files with 304 additions and 8 deletions
+14
View File
@@ -19,6 +19,20 @@ describe('normalizeGitErrorMessage', () => {
"Submodule 'find-cmux-followers' has remote changes. Pull inside the submodule, then try again."
)
})
it('explains how to configure a pull policy for divergent branches', () => {
const error = new Error(
'Command failed: git pull\n' +
'hint: You have divergent branches and need to specify how to reconcile them.\n' +
'fatal: Need to specify how to reconcile divergent branches.'
)
expect(normalizeGitErrorMessage(error, 'pull')).toBe(
'Pull needs a Git pull policy for divergent branches. Configure one for this repository ' +
'or host, then try again: git config pull.rebase false (merge), ' +
'git config pull.rebase true (rebase), or git config pull.ff only (fast-forward only).'
)
})
})
describe('formatSubmodulePushFailureDetail', () => {