History

Add JJ VCS driver support

- Detect and route jj repositories alongside git - Thread VCS kind through status and UI labels - Add jj driver contract coverage and shared freshness helper

Julius Marminge committed 6 months ago

Commit c31beca1 parent 128b43230 files · +838 −44Browse files

Showing the changes to packages/shared/src (2 of 30 files). Show all

Unified · Split

2 files
  1. packages/shared/src/git.test.ts +2 −0
  2. packages/shared/src/git.ts +2 −0
packages/shared/src/git.test.ts+2−0
@@ -81,6 +81,7 @@ describe("applyGitStatusStreamEvent", () => { · 80 unmodified lines
8181 };
8282
8383 expect(applyGitStatusStreamEvent(null, { _tag: "remoteUpdated", remote })).toEqual({
84+ kind: "unknown",
8485 isRepo: true,
8586 hasPrimaryRemote: false,
8687 isDefaultRef: false,
@@ -96,6 +97,7 @@ describe("applyGitStatusStreamEvent", () => { · 9 unmodified lines
9697
9798 it("preserves local-only fields when applying a remote update", () => {
9899 const current: VcsStatusResult = {
100+ kind: "git",
99101 isRepo: true,
100102 sourceControlProvider: {
101103 kind: "github",
packages/shared/src/git.ts+2−0
@@ -226,6 +226,7 @@ function toRemoteStatusPart(status: VcsStatusResult): VcsStatusRemoteResult { · 225 unmodified lines
226226
227227 function toLocalStatusPart(status: VcsStatusResult): VcsStatusLocalResult {
228228 return {
229+ kind: status.kind,
229230 isRepo: status.isRepo,
230231 ...(status.sourceControlProvider
231232 ? { sourceControlProvider: status.sourceControlProvider }
@@ -251,6 +252,7 @@ export function applyGitStatusStreamEvent( · 19 unmodified lines
251252 if (current === null) {
252253 return mergeGitStatusParts(
253254 {
255+ kind: "unknown",
254256 isRepo: true,
255257 hasPrimaryRemote: false,
256258 isDefaultRef: false,