Add ignoreRenames option to fileHistoryWalk
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 42/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- cpp, git, javascript
- 领域
- api, performance
调研方向
从 generate/templates/manual/revwalk/file_history_walk.cc 中列出的两个 git_diff_find_similar 调用开始,并检查 fileHistoryWalk 如何接受其参数。当 ignoreRenames 选项为 true 时跳过这两个调用,同时在其他情况下保留现有行为,即表示完成;请根据周围的实现验证该选项的 API 形式。
由索引模型根据 Issue 内容生成。
描述
fileHistoryWalk can take a very long time (eg 15 seconds) if there are commits that change the structure of the repo with a lot of renames.
It's due to the calls to git_diff_find_similar from libgit2 that basically do a O(n²) loop, where n is the number of files added/removed in a commit.
Oftentimes the use of fileHistoryWalk is just to get the last commit that changes a file, for this it's not needed to call git_diff_find_similar.
We could add a third parameter with of the shape {ignoreRenames: boolean} that if true will skip the calls to git_diff_find_similar here:
- 主要语言
- JavaScript
- 星标
- 5.8k
- 派生
- 704
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
nodegit/nodegit 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 45/100
-
难度 4/5 3-5 天 新手友好度 45/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 5/5 一周以上 新手友好度 25/100
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
Seeed-Studio/wiki-documents#5655 · 2 条评论 ·
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
capricorn86/happy-dom#2435 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
-
Edit: CW+ 未关闭channels:edit check:passed
难度 2/5 1-3 小时 新手友好度 68/100
-
01 type: bug 30 needs: triage 99 tag: UX Accessibility
难度 2/5 1-3 小时 新手友好度 82/100