Skip to content

Commit a322233

Browse files
committed
Merge pull request dmnd#3 from sjbalaji/master
Prints the diffs in colour in terminal
2 parents bbe0eac + a534b03 commit a322233

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

git-diff-blame

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ while (<$diff>) {
6969
}
7070
}
7171
} elsif (m{^ }) {
72-
print " ", get_blame_prefix(scalar <$pre>), "\t", $_;
72+
print " ", get_blame_prefix(scalar <$pre>), "\t", $_;
7373
scalar <$post>; # discard
7474
} elsif (m{^\-}) {
75-
print "- ", get_blame_prefix(scalar <$pre>), "\t", $_;
75+
print "[31m - ", get_blame_prefix(scalar <$pre>), "\t", $_,"[m ";
7676
} elsif (m{^\+}) {
77-
print "+ ", get_blame_prefix(scalar <$post>), "\t", $_;
77+
print "[32m + ", get_blame_prefix(scalar <$post>), "\t", $_,"[m ";
7878
}
7979
}

0 commit comments

Comments
 (0)