--stat[=<width>[,<name-width>[,<count>]]]
Generate a diffstat. By default, as much space as necessary will be used for the filename part, and the rest for the graph part. Maximum width defaults to terminal width, or 80 columns if not connected to a terminal, and can be overridden by <width>. The width of the filename part can be limited by giving another width <name-width> after a comma. The width of the graph part can be limited by using --stat-graph-width=<width> (affects all commands generating a stat graph) or by setting diff.statGraphWidth=<width> (does not affect git format-patch). By giving a third parameter <count>, you can limit the output to the first <count> lines, followed by ... if there are more.
These parameters can also be set individually with --stat-width=<width>, --stat-name-width=<name-width> and --stat-count=<count>.
参考帮助文档,可以看到git在没有终端连接的时候会只显示80列的。
执行git log --stat时,对于一些太长的路径会出现以“…”来省略的情况。
就像这样:

可以手动设置显示宽度
git log --stat=200
这样的话就可以设置成显示200列了,就会显示完整的路径
就像这样

本文介绍了Git的diffstat命令,它用于生成差异统计信息。默认情况下,当未连接到终端时,diffstat会显示最多80列。若路径名过长,会用'...'省略。可以通过设置--stat参数指定显示宽度,如`git log --stat=200`,以完整显示路径。此外,还可使用--stat-width、--stat-name-width和--stat-count进一步定制输出。

381

被折叠的 条评论
为什么被折叠?



