git的逐词归责
项目描述
git-word-blame
显示文件的逐词作者
演示
在git
仓库上执行git word-blame git.c
,我们得到
安装
pip install git-word-blame
使用
git word-blame <path/to/my/file>
它将生成以下文件(默认在/tmp/git-word-blame/
)
- author_stats.tsv # top authors by number of characters attributed to them
- commit_stats.tsv # same for commits
- word-blame-by-commit.html # hover on some text to see which commit created it
- word-blame-by-author.html # same for authors
- text-output # tokens grouped by authors as a grep-friendly output
作者归属算法
有两种算法可供选择
wikiwho
(默认):粗糙但更健壮mwpersistence
:精确但存在更多误报
要更改git word-blame
使用的引擎
git config --global word-blame.engine mwpersistence
HTML输出
您可以选择HTML输出的3种主题:black-and-white
、solarized-dark
、solarized-light
。
git config --global word-blame.theme solarized-dark
默认情况下,当单击文本时将显示git命令,您可以更改此行为并使其直接跳转到diff在线(Github/Framagit)
git config --global --bool word-blame.link-to-online-commit true
限制
git-word-blame
目前不支持重命名
,并且仅在具有线性历史的文件上进行了测试。
还有一个默认的最大提交数2000
。可以通过此命令删除:git config --global word-blame.limit 0
。
据我所知,WikiWho
尚不支持将空白归因于它之后的标记。
另请参阅
-
https://github.com/wikiwho/WikiWho/ 和 https://github.com/wikiwho/WhoColor 这是一个针对Wikipedia的逐词归责,具有经过良好测试的散文算法(默认算法)。此项目的HTML可视化受到了WhoColor的极大启发
-
https://github.com/mediawiki-utilities/python-mwpersistence/ 一种针对维基百科的替代作者归属算法检测
-
https://github.com/d33tah/wordblame 将维基百科文章导出至git以进行逐词归责,它通过将每个词放在历史记录中每个文件的单独一行来实现
-
https://github.com/lucadealfaro/authorship-tracking 另一种尚未集成的替代方案
-
https://github.com/git-persistence/git-persistence 面向字符级作者归属,旨在对整个仓库的作者进行评分
项目详情
下载文件
下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。
源分布
构建分布
git-word-blame-0.0.7.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 8f5526f61348fe0f18249b9361600ab88922e9ae1e11f3a4af97fbe2645eceec |
|
MD5 | af34ebf5d25fe2ca47a741d6298c9399 |
|
BLAKE2b-256 | 63a4b12d10849773697cdc0ffc4b88f7fcb193dbcb6659c2fd4e0a2ac913b9b0 |
git_word_blame-0.0.7-py3-none-any.whl的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 593c0d2b7787d99f28104a7595fe2c9e7a8517f54ebed27342ec5a6f0b190154 |
|
MD5 | 2358ffa0671f2debf36537e57560527d |
|
BLAKE2b-256 | 97d2da31d5258774312d4620ebb976611fda38757101a2a3c1492568b0c40b40 |