Re: Question: Getting 'git diff' to generate /usr/bin/diff output
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jul 18, 2016, 07:23 UTC
- Message-ID
- <alpine.DEB.2.20.1607180922580.28832@virtualbox>
- In-Reply-To
- <201607171726.u6HHQShO005227@shell1.rawbw.com>
Hi Norm,
On Sun, 17 Jul 2016, norm@dad.org wrote:
Show 9 quoted lines
> <l.s.r@web.de> writes: > > > >The other replies covered how to use the system's own diff instead. > >Just curious: What makes using git diff difficult and its output hard to > >deal with for you? > > In decreasing importance order: > > I am 84 years old.
Wow. Chapeau! I am impressed.
Show 5 quoted lines
> I have been using /usr/bin/diff for more than four decades. And having > to learn how to read the output of 'git diff' makes learning how to use > git a more difficult trick for this old dog to learn. True, the diff of > today is very different from the diff of 1972, but the changes happened > gradually.
Curious: do you use context diff (GNU diff's default) or unified diffs?
> I have scripts which process the output of /usr/bin/diff.
Even more curious: what do those scripts do? Maybe they do things that we either can already do with Git's diff, or that we can teach Git.
> 'git diff' outputs escape characters which clutter my terminal. Yes, I > can sed them out, but then why are they there?
Those are most likely the ANSI sequences to add color. Can you call Git with the --no-color option and see whether the escape characters go away?
Ciao, Johannes