Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jgit-dev] [RFC] Add command support for line history

Hi,

A feature of Perforce that is currently not available in Git or JGit is support for "annotating" a file.  This type of command produces the comprehensive line history of a file, displaying every line that has ever occurred in the file with the start and end revisions that it was present in.

So example output would be:

1-5: public static void main(String[] args) {
1-2:   System.out.println("Hello world");
3-5:   System.out.println("Hello world!");
1-5: }

This example is showing that the first line was present in revisions 1-5, the second line was in revisions 1 & 2, the third line was in revision 3-5, and the fourth line was in revision 1-5.

Essentially it is a blame command that spans multiple revisions and links the line history as the file changes.  The model generated can be useful for analytics and for visualizations of the file content over time.

I have pushed a patch to Gerrit that adds command support for line history to JGit:
http://egit.eclipse.org/r/#change,3222

Documentation on Perforce annotate:
http://www.perforce.com/perforce/doc.current/manuals/cmdref/annotate.html

Sincerely,
Kevin Sawicki

Back to the top