Simon Peyton-Jones wrote:
Ian

I have become quite obsessive about adding comments to source code to explain 
design decisions.  In this case, I'll commit a patch to add your darcs comment 
to the appropriate line of validate-settings.mk.  I know the info is in the 
commit message, but my experience is that commit messages are too indirect when 
you are looking at source code.

While I completely agree with this, wouldn't it be great if it were trivial to see the commits that have affected the line of code that you're looking at?

In a git repository, with emacs, you can say 'M-x vc-annotate' to annotate the file (bind it to a key), and then over a particular line you can say 'L' to get the log message for that commit, or 'D' to see the complete diff. There are commands for moving back and forward through the history too.

(caveat: when I just tried this I got odd failures on some of the lines I tried, and sometimes it didn't seem to be able to find the log message, but still, I'm sure it's *supposed* to work...)

Cheers,
        Simon

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to