check: during an uncommitted merge, ratchets blame main's new code on the branch (diff base ignores MERGE_HEAD)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 1-2 天
- 新手友好度
- 68/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- git, typescript
- 领域
- devtools
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Rust
- 星标
- 3
- 派生
- 1
- 平均合并
- 9 小时 51 分钟
- 30 天内合并 PR
- 310
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
codeatlasdev/atlas 的其他 Issue
-
type: bug
难度 2/5 1-3 小时 新手友好度 75/100
codeatlasdev/atlas#597 ·
维护者通常 1 天内回复
-
area: ci os: linux type: bug
难度 2/5 1-3 小时 新手友好度 78/100
codeatlasdev/atlas#496 ·
维护者通常 1 天内回复
-
area: ci type: bug
难度 3/5 1-2 天 新手友好度 68/100
codeatlasdev/atlas#596 ·
维护者通常 1 天内回复
-
os: linux type: bug
难度 3/5 1-2 天 新手友好度 68/100
codeatlasdev/atlas#591 ·
维护者通常 1 天内回复
-
area: ci os: windows type: bug
难度 3/5 1-2 天 新手友好度 56/100
codeatlasdev/atlas#550 · 1 条评论 ·
维护者通常 1 天内回复
查看 codeatlasdev/atlas 的全部 Issue
相似的 Issue
-
marketing
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
kinqsradio/orbyn-engineering#729 ·
-
Plans page scenario races Shift+Tab against the plan list being drawn again in Firefox and WebKit未关闭bug
难度 2/5 1-3 小时 新手友好度 83/100
nledford/Ladderback#1091 ·
维护者通常 1 天内回复
-
bug fix packaging ui user-sprint
难度 2/5 1-3 小时 新手友好度 78/100
Vondor/KassenSturz#1197 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复