【问题标题】:How to display full file path in tig view如何在 tig 视图中显示完整的文件路径
【发布时间】:2014-02-13 17:02:53
【问题描述】:

我使用 tig 来查看更改的内容。但是如何在更改的文件列表中显示完整路径,而不是仅显示部分长文件路径?

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

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

【问题讨论】:

    标签: git tig


    【解决方案1】:

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

    $ 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>.
    

    【讨论】:

      猜你喜欢
      • 2020-05-30
      • 1970-01-01
      • 2011-11-10
      • 2014-01-06
      • 2015-07-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多