| ... | @@ -620,6 +620,24 @@ it.layer(TestLayer)("GitVcsDriver core integration", (it) => { | ... | @@ -620,6 +620,24 @@ it.layer(TestLayer)("GitVcsDriver core integration", (it) => { |
| 620 | assert.notInclude(status, "a.txt"); | 620 | assert.notInclude(status, "a.txt"); |
| 621 | }), | 621 | }), |
| 622 | ); | 622 | ); |
| | 623 | |
| | 624 | it.effect("treats selected file paths literally", () => |
| | 625 | Effect.gen(function* () { |
| | 626 | const cwd = yield* makeTmpDir(); |
| | 627 | yield* initRepoWithCommit(cwd); |
| | 628 | const driver = yield* GitVcsDriver.GitVcsDriver; |
| | 629 | |
| | 630 | yield* writeTextFile(cwd, "selected[1].txt", "literal\n"); |
| | 631 | yield* writeTextFile(cwd, "selected1.txt", "pattern match\n"); |
| | 632 | |
| | 633 | yield* driver.prepareCommitContext(cwd, ["selected[1].txt"]); |
| | 634 | |
| | 635 | assert.equal(yield* git(cwd, ["diff", "--cached", "--name-only"]), "selected[1].txt"); |
| | 636 | |
| | 637 | const status = yield* git(cwd, ["status", "--porcelain"]); |
| | 638 | assert.include(status, "?? selected1.txt"); |
| | 639 | }), |
| | 640 | ); |
| 623 | }); | 641 | }); |
| 624 | | 642 | |
| 625 | describe("remote operations", () => { | 643 | describe("remote operations", () => { |