0

我使用 tig 来查看发生了什么变化。但是如何在更改的文件列表中显示完整路径,而不是仅显示部分长文件路径?

例如,我想查看 SpecialAnswList.java 的完整路径,而不是 ... 前缀。

---
   │  .../ui/component/SpeciaAnswList.java       | 44 ++++++++--------------
   │  1 file changed, 16 insertions(+), 28 deletions(-) 
4

1 回答 1

2

由于 Tig 使用 git-show(1) 来显示差异,因此您可以使用--statdiff 选项。例如:

$ tig --stat=200,180

不幸的是,没有按百分比缩放它的选项,因此您必须手动进行。

这是该选项的文档:

--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>.
于 2014-01-24T03:00:11.123 回答