fix(git): Löschen-Commit mit -z, G01 beim Löschen mit eigenem Text (Review PR #24)
CI / App (npm ci + Build, ESLint, Stylelint, Jest) (pull_request) Successful in 1m55s
CI / Storage (mongo) (pull_request) Successful in 1m17s
CI / Storage (postgres) (pull_request) Successful in 1m16s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
dev-bot BotandClaude Sonnet 5.5 committed 2026-11-25 21:35:43 +00:00
1 parent 2de0e9b976
commit 8ca9688801
4 files changed
+25 -4

No files matched your search

+2 -2
View File
@@ -177,8 +177,8 @@ export const createGitClient = (cfg, { lookup, gitBinary = 'git' } = {})=>{
const buildDeleteCommit = async (repo, { parent, filePath, author, message, committer })=>{
const extraEnv = { GIT_INDEX_FILE: repo.idx };
await repo.run(['read-tree', parent], { extraEnv });
// Modus 0 entfernt den Eintrag (--force-remove bräuchte eine Arbeitskopie)
await repo.run(['update-index', '--index-info'], { extraEnv, input: `0 ${'0'.repeat(40)}\t${filePath}\n` });
// Modus 0 entfernt den Eintrag (--force-remove bräuchte eine Arbeitskopie). -z: Pfad wird nicht C-quotiert gelesen.
await repo.run(['update-index', '-z', '--index-info'], { extraEnv, input: `0 ${'0'.repeat(40)}\t${filePath}\0` });
const tree = await repo.str(['write-tree'], { extraEnv });
return commitTree(repo, { parent, tree, author, message, committer });
};