Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dmnd/git-diff-blame
🕵 Display a diff alongside blame info like author and commit
https://github.com/dmnd/git-diff-blame
blame diff git
Last synced: 2 months ago
JSON representation
🕵 Display a diff alongside blame info like author and commit
- Host: GitHub
- URL: https://github.com/dmnd/git-diff-blame
- Owner: dmnd
- Created: 2014-01-09T21:43:25.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2022-02-02T12:11:12.000Z (almost 3 years ago)
- Last Synced: 2023-04-09T05:27:19.926Z (almost 2 years ago)
- Topics: blame, diff, git
- Language: Perl
- Homepage:
- Size: 6.84 KB
- Stars: 100
- Watchers: 4
- Forks: 21
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## git diff-blame
Annotates each line in a diff hunk with author and commit information like blame.
## Example:
$ git diff-blame HEAD^
diff --git c/git-diff-blame w/git-diff-blame
--- c/git-diff-blame
+++ w/git-diff-blame
ed3dc1d5 (Desmond Brand 2014-01-09 12:08:57 -0800 52) my $n_end = $n_ofs + $n_cnt - 1;
^275a5e3 (Desmond Brand 2014-01-09 12:04:26 -0800 53) if (!$create) {
^275a5e3 (Desmond Brand 2014-01-09 12:04:26 -0800 54) open($pre, '-|', 'git', 'blame', '-M', "-L$o_ofs,$o_end",
ed3dc1d5 (Desmond Brand 2014-01-09 12:08:57 -0800 55) - "-l",
^275a5e3 (Desmond Brand 2014-01-09 12:04:26 -0800 56) $oldrev, '--', $prefilename) or die;
^275a5e3 (Desmond Brand 2014-01-09 12:04:26 -0800 57) }
^275a5e3 (Desmond Brand 2014-01-09 12:04:26 -0800 58) if (!$delete) {
15f5a1f9 (Desmond Brand 2014-01-09 12:46:50 -0800 59) if ($newrev) {
15f5a1f9 (Desmond Brand 2014-01-09 12:46:50 -0800 60) open($post, '-|', 'git', 'blame', '-M', "-L$n_ofs,$n_end",
15f5a1f9 (Desmond Brand 2014-01-09 12:46:50 -0800 61) - "-l",
15f5a1f9 (Desmond Brand 2014-01-09 12:46:50 -0800 62) $newrev, '--', $postfilename) or die;
15f5a1f9 (Desmond Brand 2014-01-09 12:46:50 -0800 63) } else {
15f5a1f9 (Desmond Brand 2014-01-09 12:46:50 -0800 64) open($post, '-|', 'git', 'blame', '-M', "-L$n_ofs,$n_end",
15f5a1f9 (Desmond Brand 2014-01-09 12:46:50 -0800 65) - "-l",
15f5a1f9 (Desmond Brand 2014-01-09 12:46:50 -0800 66) '--', $postfilename) or die;
15f5a1f9 (Desmond Brand 2014-01-09 12:46:50 -0800 67) }
^275a5e3 (Desmond Brand 2014-01-09 12:04:26 -0800 68) }Original version by @toddlipcon taken [from here](https://github.com/toddlipcon/tlipcon-bin/blob/master/git-diff-blame).