Merge branch 'main' into fix/301-remove-delivery-retry

This commit is contained in:
TÂCHES 2026-03-13 22:46:38 -06:00 committed by GitHub
commit 8536d028bf

View file

@ -657,18 +657,6 @@ export class GitServiceImpl {
this.git(["commit", "-m", "chore: untrack .gsd/ runtime files before merge"], { allowFailure: true });
}
// Also untrack runtime files from the slice branch to prevent
// modify/delete conflicts during squash-merge (#218)
this.git(["checkout", branch]);
for (const exclusion of RUNTIME_EXCLUSION_PATHS) {
this.git(["rm", "--cached", "-r", "--ignore-unmatch", exclusion], { allowFailure: true });
}
const branchUntrackDiff = this.git(["diff", "--cached", "--stat"], { allowFailure: true });
if (branchUntrackDiff?.trim()) {
this.git(["commit", "-m", "chore: untrack .gsd/ runtime files before merge"], { allowFailure: true });
}
this.git(["checkout", mainBranch]);
// Merge slice branch — strategy is configurable via git.merge_strategy
// preference. Default: "squash" (preserves existing behavior).
// "merge" uses --no-ff which is more resilient to conflicts from
@ -730,9 +718,22 @@ export class GitServiceImpl {
}
}
// Squash merge needs a separate commit; --no-ff merge already committed
// Strip runtime files from the merge result before committing (#302).
// This replaces the old approach of checking out the slice branch to
// untrack runtime files pre-merge, which failed when the working tree
// had uncommitted .gsd/ changes that blocked the checkout.
for (const exclusion of RUNTIME_EXCLUSION_PATHS) {
this.git(["rm", "--cached", "-r", "--ignore-unmatch", exclusion], { allowFailure: true });
}
if (strategy === "squash") {
this.git(["commit", "-F", "-"], { input: message });
} else {
// --no-ff already committed; amend to include runtime file removal
const runtimeDiff = this.git(["diff", "--cached", "--stat"], { allowFailure: true });
if (runtimeDiff?.trim()) {
this.git(["commit", "--amend", "--no-edit"]);
}
}
// Delete the merged branch