| ... | ... | @@ -47,6 +47,12 @@ const RANGE_DIFF_SUMMARY_MAX_OUTPUT_BYTES = 19_000; |
| 47 | 47 | const RANGE_DIFF_PATCH_MAX_OUTPUT_BYTES = 59_000; |
| 48 | 48 | const WORKSPACE_FILES_MAX_OUTPUT_BYTES = 16 * 1024 * 1024; |
| 49 | 49 | const GIT_CHECK_IGNORE_MAX_STDIN_BYTES = 256 * 1024; |
| 50 | const WORKSPACE_GIT_HARDENED_CONFIG_ARGS = [ |
| 51 | "-c", |
| 52 | "core.fsmonitor=false", |
| 53 | "-c", |
| 54 | "core.untrackedCache=false", |
| 55 | ] as const; |
| 50 | 56 | const STATUS_UPSTREAM_REFRESH_INTERVAL = Duration.seconds(15); |
| 51 | 57 | const STATUS_UPSTREAM_REFRESH_TIMEOUT = Duration.seconds(5); |
| 52 | 58 | const STATUS_UPSTREAM_REFRESH_FAILURE_COOLDOWN = Duration.seconds(5); |
| ... | ... | @@ -1619,7 +1625,14 @@ export const makeGitCore = Effect.fn("makeGitCore")(function* (options?: { |
| 1619 | 1625 | executeGit( |
| 1620 | 1626 | "GitCore.listWorkspaceFiles", |
| 1621 | 1627 | cwd, |
| 1622 | | ["ls-files", "--cached", "--others", "--exclude-standard", "-z"], |
| 1628 | [ |
| 1629 | ...WORKSPACE_GIT_HARDENED_CONFIG_ARGS, |
| 1630 | "ls-files", |
| 1631 | "--cached", |
| 1632 | "--others", |
| 1633 | "--exclude-standard", |
| 1634 | "-z", |
| 1635 | ], |
| 1623 | 1636 | { |
| 1624 | 1637 | allowNonZeroExit: true, |
| 1625 | 1638 | timeoutMs: 20_000, |
| ... | ... | @@ -1637,7 +1650,14 @@ export const makeGitCore = Effect.fn("makeGitCore")(function* (options?: { |
| 1637 | 1650 | createGitCommandError( |
| 1638 | 1651 | "GitCore.listWorkspaceFiles", |
| 1639 | 1652 | cwd, |
| 1640 | | ["ls-files", "--cached", "--others", "--exclude-standard", "-z"], |
| 1653 | [ |
| 1654 | ...WORKSPACE_GIT_HARDENED_CONFIG_ARGS, |
| 1655 | "ls-files", |
| 1656 | "--cached", |
| 1657 | "--others", |
| 1658 | "--exclude-standard", |
| 1659 | "-z", |
| 1660 | ], |
| 1641 | 1661 | result.stderr.trim().length > 0 ? result.stderr.trim() : "git ls-files failed", |
| 1642 | 1662 | ), |
| 1643 | 1663 | ), |
| ... | ... | @@ -1657,7 +1677,7 @@ export const makeGitCore = Effect.fn("makeGitCore")(function* (options?: { |
| 1657 | 1677 | const result = yield* executeGit( |
| 1658 | 1678 | "GitCore.filterIgnoredPaths", |
| 1659 | 1679 | cwd, |
| 1660 | | ["check-ignore", "--no-index", "-z", "--stdin"], |
| 1680 | [...WORKSPACE_GIT_HARDENED_CONFIG_ARGS, "check-ignore", "--no-index", "-z", "--stdin"], |
| 1661 | 1681 | { |
| 1662 | 1682 | stdin: `${chunk.join("\0")}\0`, |
| 1663 | 1683 | allowNonZeroExit: true, |
| ... | ... | @@ -1671,7 +1691,7 @@ export const makeGitCore = Effect.fn("makeGitCore")(function* (options?: { |
| 1671 | 1691 | return yield* createGitCommandError( |
| 1672 | 1692 | "GitCore.filterIgnoredPaths", |
| 1673 | 1693 | cwd, |
| 1674 | | ["check-ignore", "--no-index", "-z", "--stdin"], |
| 1694 | [...WORKSPACE_GIT_HARDENED_CONFIG_ARGS, "check-ignore", "--no-index", "-z", "--stdin"], |
| 1675 | 1695 | result.stderr.trim().length > 0 ? result.stderr.trim() : "git check-ignore failed", |
| 1676 | 1696 | ); |
| 1677 | 1697 | } |