check: during an uncommitted merge, ratchets blame main's new code on the branch (diff base ignores MERGE_HEAD)
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 68/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- git, typescript
- Bereich
- devtools
Rechercherichtung
Start with scripts/lib/base.ts and trace how it selects the diff base during an in-progress merge or rebase. Add coverage using a temporary Git repository with an uncommitted merge, then run the relevant i18n:check tests or command. Done when upstream strings are excluded while strings added on the branch are still reported.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
What
bun run i18n:check run in the middle of a merge (conflicts resolved, merge not yet committed) reports main's own new strings as "new in this change". Seen on #526 after merging origin/main (which had #534 and #532): 2 hardcoded-text errors in GitSettings.svelte and 3 writing-lint errors in docs/contributing.md, in files identical to origin/main. After git commit the same check is clean.
Why
scripts/lib/base.ts resolves the diff base as merge-base(HEAD, origin/main). During an uncommitted merge HEAD is still the pre-merge branch tip, so the base is the old fork point while the working tree already holds main's changes.
Fix
When .git/MERGE_HEAD exists (or git rev-parse -q --verify MERGE_HEAD succeeds), use merge-base(MERGE_HEAD, origin/main) together with the branch side, i.e. the base is the newer of the two fork points: with MERGE_HEAD == origin/main that is origin/main itself. Same for a rebase in progress (REBASE_HEAD/.git/rebase-merge/onto). Test with a real repo: main adds a hardcoded string, branch merges main without committing, the ratchet reports nothing; the branch's own new string is still reported.
Agents resolve merges constantly; this sends them chasing errors in code they never touched.
- Vorherrschende Sprache
- Rust
- Sterne
- 3
- Forks
- 1
- Ø Merge
- 9 Std. 51 Min.
- Gemergte PRs (30 T.)
- 310
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus codeatlasdev/atlas
-
type: bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
codeatlasdev/atlas#597 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area: ci os: linux type: bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
codeatlasdev/atlas#496 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area: ci type: bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
codeatlasdev/atlas#596 ·
Maintainer antworten meist innerhalb von 1 Tag
-
os: linux type: bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
codeatlasdev/atlas#591 ·
Maintainer antworten meist innerhalb von 1 Tag
-
flaky: Windows scripts job hits test timeouts (check-dco, i18n runner/translate, check-changed)Offenarea: ci os: windows type: bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 56/100
codeatlasdev/atlas#550 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in codeatlasdev/atlas
Ähnliche Issues
-
marketing
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
kinqsradio/orbyn-engineering#729 ·
-
Plans page scenario races Shift+Tab against the plan list being drawn again in Firefox and WebKitOffenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
nledford/Ladderback#1091 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug fix packaging ui user-sprint
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Vondor/KassenSturz#1197 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag