дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-05 17:47:08 +02:00
A tracked file matched by an ignore rule is dropped when the sources are added to a new repository (source archive, fresh git add), as #8211 hit with crates/ide-ssh/src/target (fixed by #8215). scripts/gitignore.test.ts fails when any tracked file is ignored; it also removed fixtures/folding/.openidea/changelists.json, IDE state excluded by the fixture's own .openidea/.gitignore.
20 рядки
739 B
TypeScript
20 рядки
739 B
TypeScript
// @vitest-environment node
|
|
import { execFileSync } from "node:child_process";
|
|
import { dirname, resolve } from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
import { describe, expect, it } from "vitest";
|
|
|
|
const repo = resolve(dirname(fileURLToPath(import.meta.url)), "..");
|
|
|
|
describe("the .gitignore rules", () => {
|
|
// A tracked file that an ignore rule matches goes missing when the sources are added to a
|
|
// new repository (a source archive, a fresh `git add`).
|
|
it("match no tracked file", () => {
|
|
const tracked = execFileSync("git", ["ls-files", "--cached", "--ignored", "--exclude-standard"], {
|
|
cwd: repo,
|
|
encoding: "utf8",
|
|
});
|
|
expect(tracked.split("\n").filter(Boolean)).toEqual([]);
|
|
});
|
|
});
|