O git diffcomando assume valores opcionais para --stat:
--stat[=<width>[,<name-width>[,<count>]]]
Generate a diffstat. You can override the default output width for
80-column terminal by --stat=<width>. The width of the filename
part can be controlled by giving another width to it separated by a
comma. 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>.
(Para scripts, você pode querer usar git diff-treediretamente, pois é mais um comando "encanamento", embora eu suspeite que você ficará bem de qualquer maneira. Observe que você precisa do mesmo texto extra --statao usar git diff-tree. A diferença essencial entre usar a git diff"porcelana "front end, e o git diff-treecomando de encanamento, é que git diffprocura suas configurações definidas para opções como diff.renamesdecidir se deve fazer a detecção de renomeação. Bem, isso, mais o front end git difffará o equivalente a git diff-indexse você estiver comparando um commit com o índice , por exemplo. Em outras palavras, git diff lê sua configuração e invoca o encanamento correto automaticamente .)