Fix reverse sync false positive after filter reconciliation

Add --ancestry-path to git log in reverse_sync() to prevent old
subrepo history from leaking through reconciliation merge parents.
Without this, every old subrepo commit appears as a "human commit"
triggering a spurious 0-commit PR on the monorepo.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-14 14:19:56 +03:00
parent c0ddb887ff
commit 16257f25d7

View File

@@ -244,7 +244,7 @@ reverse_sync() {
# 3. Find new human commits (excludes bot commits from forward sync)
local human_commits
human_commits=$(git log "mono-filtered/${mono_branch}..HEAD" \
human_commits=$(git log --ancestry-path "mono-filtered/${mono_branch}..HEAD" \
--oneline --invert-grep --grep="^${BOT_TRAILER}:" 2>/dev/null || echo "")
if [ -z "$human_commits" ]; then