Anchor links to specific line(s) in commit diffs
还没有人认领这个 Issue。
评估
调研方向
定位 commit diff 渲染的入口点,并将其与普通文件现有的锚点行为进行比较。跟踪 URL 片段的生成方式,然后验证单行片段和行范围片段是否能定位 issue 示例中所示的对应 diff 行。
由索引模型根据 Issue 内容生成。
描述
Would be useful to have anchors for lines in commits diffs (in addition to already existing anchors in browsing "regular" files), for example like it is done on GitHub:
https://github.com/antonmedv/gitmal/commit/2d31323ad174fb2f7aa7312009814118784a45b8#diff-2873f79a86c0d8b3335cd7731b0ecf7dd4301eb19a82ef7a1cba7589b5252261R78
So here the #diff-2873f79a86c0d8b3335cd7731b0ecf7dd4301eb19a82ef7a1cba7589b5252261R78 part is an anchor to a specific line in the diff.
Or like this for a range of lines:
https://github.com/antonmedv/gitmal/commit/2d31323ad174fb2f7aa7312009814118784a45b8#diff-2873f79a86c0d8b3335cd7731b0ecf7dd4301eb19a82ef7a1cba7589b5252261R78-R80
so it's the same but plus -R80 part.
- 主要语言
- Go
- 星标
- 1.3k
- 派生
- 50
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
antonmedv/gitmal 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
-
难度 2/5 1-3 小时 新手友好度 62/100
-
Raw file view未关闭feature
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 4/5 3-5 天 新手友好度 48/100
-
难度 4/5 3-5 天 新手友好度 47/100
相似的 Issue
-
cicd needs-triage
难度 1/5 1 小时以内 新手友好度 91/100
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 84/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
kind/cleanup
难度 2/5 1-3 小时 新手友好度 76/100
kubernetes-sigs/kueue#19255 ·
维护者通常 1 天内回复