git diff --stat 解释
Git 的 pull 输出 已经在这里得到了很好的解释。尽管如此,我仍然不确定文本图到底与什么相关。
例如:
git diff --stat master HEAD^
输出(截断):
Site/index.php | 118 ++--
虽然修改的行数清楚地显示为 118,但文本图表有点难以解释。
这是否与添加和删除线路的比率有关?
Git's pull output has been explained here fairly well. In spite of this I'm still unsure exactly what the text graph relates to.
For example:
git diff --stat master HEAD^
Outputs (truncated):
Site/index.php | 118 ++--
While the number of lines modified is clearly displayed as 118, the text graph is a little harder to interpret.
Could this relate to the ratio of added and removed lines?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是的,它是添加和删除的行的比率。
参见:
Yes it's the ratio of added and removed lines.
See also:
参数:
diff
= 显示差异--numstat
= 显示插入和删除的行数@{1 天前} = 句点。
输出
0
38
)= 插入1
30
)= 删除PS:列用制表符 (
\t
) 分隔。Parameters:
diff
= Show diff--numstat
= show the number of lines inserted and removed@{1 day ago}
= Period.Output
0
38
) = inserted1
30
) = removedPS: Columns are separated by tab (
\t
).正如我在此处回答的那样:
它应该反映列出的每个文件的更改量(以行为单位)。
加号表示添加,减号表示删除。
118 给出更改的行数,- / + 给出删除/添加的比例。
当更改量可以容纳一行时,每次添加将得到“+”,每次删除将得到“-”;
否则,这是一个近似值,例如
在
CHANGES.txt
上,因为您可以看到没有“-”,并且自 47 '+ ' 是很多,你有一定比例的数量(即 100%)。在
make-release.py
上,您会看到 x39 '+' 代表 55 个添加,x16 '< em>-' 代表 22 个删除。完全按照它们的比例,以及适合输出屏幕的数量。
每行的符号数量是适合行宽的 GCD 倍数。
希望有帮助。
As I answered here:
It supposed to reflect the amount of changes (in lines) of each file listed.
Plus signs for additions, minuses for deletions.
The 118 gives the amount of changed lines, and the - / + gives you the proportion of deletions/additions.
When the amount of changes can fit a line you'll get '+' per addition, '-' per deletion;
Otherwise, this is an approximation, e.g.
On
CHANGES.txt
since you can see that there are no '-', and since 47 '+' are a lot you have a proportionate amount of them (i.e. 100%).On
make-release.py
you'll see x39 '+' standing for 55 additions and x16 '-' standing for 22 deletions.Exactly as their proportion, and just the amount to fit output screen.
The amount of signs per line the a
GCD
multiple that fits the line width.Hope that helps.