git-diff-blame icon indicating copy to clipboard operation
git-diff-blame copied to clipboard

Single file

Open arielgabizon opened this issue 8 years ago • 1 comments

Is it possible to restrict the diff to a single file?

arielgabizon avatar Dec 31 '17 10:12 arielgabizon

Change this to:

my ($oldrev, $newrev, $file) = @ARGV;
$oldrev ||= 'HEAD';
if ($newrev) {
	open($diff, '-|', 'git', '--no-pager', 'diff', $oldrev, $newrev, '--', $file) or die;

And use as:

git-diff-blame develop master source.json

jeremy-ww avatar Mar 06 '19 06:03 jeremy-ww