0

In Git show I am getting a lot of contractions or .../ "abbreviations" - see the example below. I am unable to resolve these back to the full path, is there a way to have git-show provide the full path for every alteration in the commit?

So far I have been using the below since I don't want the full detail of all the code changed.

git show --pretty=oneline --stat f760478a5788d2e8e6b0f7be793b015a9e2c043e

Example output where I cannot resolve the full path.

 ../src/MyApp.Deployment.Util/packages.config   |     9 +
 .../src/MyApp.Deployment.sln                    |    65 +
 .../MyApp.DeploymentServer/src/Readme.txt       |    94 +
 .../x-build/cdeploy.nuspec                        |    14 +
 .../PowerApplication.MyDll.Engine.dll     |   Bin 0 -> 372736 bytes
 ...ation.MyDll.Engine.resources (104).dll |   Bin 0 -> 16384 bytes

eng
  • 443
  • 1
  • 4
  • 10
Murray Foxcroft
  • 12,785
  • 7
  • 58
  • 86

1 Answers1

2

When the filepath is too long, longer than the default value, it displays ... instead of the fullpath. You can add numbers after --stat to specify how much space each line can use to display the filename and other info. --stat=999 should work in almost all cases. You can find more details in the manual.

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

ElpieKay
  • 27,194
  • 6
  • 32
  • 53
  • That works great. Is there a value for "unlimited" as opposed to trying to set some arbitrary value greater than what you think the max is? – Murray Foxcroft Jul 20 '23 at 08:26
  • @MurrayFoxcroft I don't find such a value or an option to cancel the limit. Maybe `--numstat` is better than `--stat` or `--stat=999` in your case. Besieds, `--numstat` is more friendly for script parsing. – ElpieKay Jul 20 '23 at 08:46