Coder Social home page Coder Social logo

git-diff-blame's Introduction

git diff-blame

Annotates each line in a diff hunk with author and commit information like blame.

syntax

git-diff-blame old_rev

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.

git-diff-blame's People

Contributors

blueyed avatar dmnd avatar liyi3c avatar sjbalaji avatar uu1101 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.