2014-01-23 76 views
0

我使用tig查看更改內容。但是如何在已更改的文件列表中顯示完整路徑而不是隻顯示長文件路徑的一部分?如何在tig視圖中顯示完整文件路徑

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

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

回答

2

由於Tig使用git-show(1)來顯示差異,所以您可以使用--stat差異選項。例如:

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

是,它爲我工作。謝謝 –

相關問題