3

If I execute git show f12345a --stat I get the following output:

commit f12345a
Author: This Guy <this.guy@email.com>
Date:   Mon Jul 1 14:00:59 2019 -0500

    A commit

 hola/mundo/hola/mundo/hola/mundo/hola/mundo/hola/mundo/hola/mundo/imaginary-very-long-file-name.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

But if instead I execute git show f12345a --stat | grep -E "*" (basically echoing everything) I get:

commit f12345a
Author: This Guy <this.guy@email.com>
Date:   Mon Jul 1 14:00:59 2019 -0500

    A commit

 .../hola/mundo/hola/mundo/hola/mundo/imaginary-very-long-file-name.txt  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

so the question itself is why is my file name getting truncated? (how can I avoid it)?

This truncate is also applied when performing git show f12345a --stat > exit.txt, when I see the file contents the file name is trucated

Ordiel
  • 2,442
  • 3
  • 36
  • 52
  • See https://stackoverflow.com/q/10459374/1256452 – torek Jul 01 '19 at 20:01
  • Good thing I (thought I) search... dang it, I swear I spent a good 20 min trying to find that and nothing pop up; guess searches having "git" on them a lot of pollution – Ordiel Jul 01 '19 at 20:28
  • It's not quite the same as your situation and Git has changed a lot since 2012, but some of this stuff still applies. I didn't have time to write up a real answer. – torek Jul 01 '19 at 20:36
  • in deed, but adding `--stat=150` (or a value long enough for your file paths) fixes the issue – Ordiel Jul 01 '19 at 21:07

0 Answers0