[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Progress report on git-blame

From: Aneesh Kumar K.V
Subject: Re: Progress report on git-blame
Date: Sun, 26 Jan 2014 20:10:57 +0530
User-agent: Notmuch/0.17+7~gc734dd75344e (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu)

Stefan Monnier <address@hidden> writes:

>> That sounds quite useful.  My common bug fixing use case is that I find
>> a function (or a bit of a function) that I think has a bug, and then I
>> `C-x v g' to find out who "who wrote this crap anyway!!!" (it usually
>> turns out to be myself), and then I try to see whether any of the lines
>> are suspiciously new and may have introduced a new bug.
>> So I'm usually just interested in a screenful of lines.  If we could
>> have a version of `C-x v g' that only does "blame" for the current
>> region, for instance, that would certainly fit my use case.
> Indeed, as mentioned in the past a few times in various contexts,
> I generally don't really want "git blame" (or its equivalent in other
> VCS), instead I want "git log-and-diff FILE:NN-MM" which gives me the
> history (hunks and accompanying log comments) of the lines between NN
> and MM of FILE.

newer version of git log do support that


-L <start>,<end>:<file>
-L :<regex>:<file>

    Trace the evolution of the line range given by "<start>,<end>" (or
    the funcname regex <regex>) within the <file>. You may not give any
    pathspec limiters. This is currently limited to a walk starting from
    a single revision, i.e., you may only give zero or one positive
    revision arguments. You can specify this option more than once.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]