Is there a version control system that can show changes to a specific method or function?
Posted
by
chesles
on Programmers
See other posts from Programmers
or by chesles
Published on 2011-11-18T23:44:02Z
Indexed on
2011/11/19
2:07 UTC
Read the original article
Hit count: 183
version-control
|tools
Sometimes it would be nice to be able to say something like:
(git|svn|hg|etc) diff Foo.c:main
(git|svn|hg|etc) log log Foo.c:main
to see the changes made to a specific function within a source file since the last commit, or the complete history of changes. My question is two-fold:
- Does something exist that does this?
- Would such a tool be practical? It would have to do some simple parsing of the code at each revision in order to compare different versions of the function; would the overhead be too much for it to be efficient?
© Programmers or respective owner