history digging with git (was: [RFC] Off-by-one in linkmap cairo drawing ?)



hi Stephen,

On Tue, Apr 28, 2009 at 09:15:32AM +0100, Stephen Kennedy wrote:
> That was quite tedious to find using cgit and gitk. Does anybody
> know is it not possible with git to jump directly to the diff which
> corresponds to a given line of a given revision? e.g. like:
> http://svn.gnome.org/viewvc/meld/trunk/filediff.py?annotate=1331&pathrev=1333

I was looking for the same thing for some time now, and I have not found a
single program that does it.  But I discovered something even better!

Git allows you to grep through all diffs. In your example, I saw the comment
"bezier" above the code of interest, and, using this as an "anchor keyword",

git log -p -Sbezier

finds just the change you were looking for. It shows both commit message and
patch, and is quite fast.  This command opens a tiny new paradise for
history digging.  I'm finally starting to enjoy git...

bye,
Martin


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