@@ -27,41 +27,41 @@ type Blame struct {
2727// Blaming a file is a two step process:
2828//
2929// 1. Create a linear history of the commits affecting a file. We use
30- // revlist.New for that.
30+ // revlist.New for that.
3131//
3232// 2. Then build a graph with a node for every line in every file in
33- // the history of the file.
33+ // the history of the file.
3434//
35- // Each node (line) holds the commit where it was introduced or
36- // last modified. To achieve that we use the FORWARD algorithm
37- // described in Zimmermann, et al. "Mining Version Archives for
38- // Co-changed Lines", in proceedings of the Mining Software
39- // Repositories workshop, Shanghai, May 22-23, 2006.
35+ // Each node (line) holds the commit where it was introduced or
36+ // last modified. To achieve that we use the FORWARD algorithm
37+ // described in Zimmermann, et al. "Mining Version Archives for
38+ // Co-changed Lines", in proceedings of the Mining Software
39+ // Repositories workshop, Shanghai, May 22-23, 2006.
4040//
41- // Each node is asigned a commit: Start by the nodes in the first
42- // commit. Assign that commit as the creator of all its lines.
41+ // Each node is asigned a commit: Start by the nodes in the first
42+ // commit. Assign that commit as the creator of all its lines.
4343//
44- // Then jump to the nodes in the next commit, and calculate the diff
45- // between the two files. Newly created lines get
46- // assigned the new commit as its origin. Modified lines also get
47- // this new commit. Untouched lines retain the old commit.
44+ // Then jump to the nodes in the next commit, and calculate the diff
45+ // between the two files. Newly created lines get
46+ // assigned the new commit as its origin. Modified lines also get
47+ // this new commit. Untouched lines retain the old commit.
4848//
49- // All this work is done in the assignOrigin function which holds all
50- // the internal relevant data in a "blame" struct, that is not
51- // exported.
49+ // All this work is done in the assignOrigin function which holds all
50+ // the internal relevant data in a "blame" struct, that is not
51+ // exported.
5252//
53- // TODO: ways to improve the efficiency of this function:
53+ // TODO: ways to improve the efficiency of this function:
5454//
55- // 1. Improve revlist
55+ // 1. Improve revlist
5656//
57- // 2. Improve how to traverse the history (example a backward
58- // traversal will be much more efficient)
57+ // 2. Improve how to traverse the history (example a backward
58+ // traversal will be much more efficient)
5959//
60- // TODO: ways to improve the function in general:
60+ // TODO: ways to improve the function in general:
6161//
62- // 1. Add memoization between revlist and assign.
62+ // 1. Add memoization between revlist and assign.
6363//
64- // 2. It is using much more memory than needed, see the TODOs below.
64+ // 2. It is using much more memory than needed, see the TODOs below.
6565func (c * Commit ) Blame (path string ) (* Blame , error ) {
6666 b := new (blame )
6767 b .fRev = c
0 commit comments