1

Is it possible to ask git diff to only check changes over some lines on a file? Like if I run git diff some-file, I see many many changes.... different sections of the file, but if I only want to see the differences related to one specific line of the file? Or only a handful of lines? Is there something like -L from git blame?

eftshift0
  • 26,375
  • 3
  • 36
  • 60

1 Answers1

2

Git currently has no way to populate its inputs to its various diff algorithms from anything less than an entire input file.

The actual diff code (in xdiff/* in the Git source) could do the job, if you just fed it the right inputs, but there's nothing in Git to do that.

torek
  • 448,244
  • 59
  • 642
  • 775