feat(source-control): commit, push, pull, and sync actions in panel (#1211)
Co-authored-by: Orca <help@stably.ai> Co-authored-by: Alexander Saavedra <mralexsaavedra@gmail.com> Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com> Co-authored-by: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: brennanb2025 <brennankbenson@gmail.com>
This commit is contained in:
co-authored by
Orca
Neil
Brennan Benson
Jinjing
github-actions[bot]
brennanb2025
parent
5c7e5f2f1d
commit
9f8bf81c38
@@ -0,0 +1,22 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { isNoUpstreamError } from './git-remote-error'
|
||||
|
||||
describe('isNoUpstreamError', () => {
|
||||
it('treats a missing HEAD@{u} tracking ref as no upstream', () => {
|
||||
const error = new Error(
|
||||
"fatal: ambiguous argument 'HEAD@{u}': unknown revision or path not in the working tree.\n" +
|
||||
"Use '--' to separate paths from revisions, like this:\n" +
|
||||
"'git <command> [<revision>...] -- [<file>...]'"
|
||||
)
|
||||
|
||||
expect(isNoUpstreamError(error)).toBe(true)
|
||||
})
|
||||
|
||||
it('does not treat unrelated ambiguous refs as no upstream', () => {
|
||||
const error = new Error(
|
||||
"fatal: ambiguous argument 'feature': unknown revision or path not in the working tree."
|
||||
)
|
||||
|
||||
expect(isNoUpstreamError(error)).toBe(false)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user