1

If I do:

git diff --stat master

I will have something like:

 .gitignore                                           |  11 +-
 BUGS                                                 |   1 +
 Makefile                                             | 907 +++++++++++++++++++------------------------------
 README.md                                            |  55 +--

If I pipe it to a pager such as more or less, it'll change:

 .gitignore                                         |  11 +-
 BUGS                                               |   1 +
 Makefile                                           | 907 ++++++++-------------
 README.md                                          |  55 +-

What's happening?

1737973
  • 159
  • 18
  • 42

1 Answers1

1

The subsequent command is assuming a standard terminal width of 80 columns.

Resize your virtual terminal to 80 columns, you'll see piping will apparently cease affecting the output.

According Git diff help:

[...] Maximum width defaults to terminal width, or 80 columns if not connected to a terminal, and can be overridden [...]

1737973
  • 159
  • 18
  • 42