fix(gitstore): preserve staged symlinks

This commit is contained in:
chengyongru
2026-07-19 16:01:11 +08:00
committed by chengyongru
parent cea8617096
commit b1232fdaf4
2 changed files with 36 additions and 8 deletions
+2 -2
View File
@@ -168,8 +168,8 @@ class GitStore:
# -- internal helpers ------------------------------------------------------
def _staging_paths(self, *paths: str) -> list[str]:
"""Return absolute paths so Dulwich resolves them inside this workspace."""
return [str((self._workspace / path).resolve()) for path in paths]
"""Return absolute paths without resolving tracked-file symlinks."""
return [str((self._workspace / path).absolute()) for path in paths]
def _resolve_sha(self, short_sha: str) -> bytes | None:
"""Resolve a short SHA prefix to the full SHA bytes."""