File tree Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change 6
6
public enum BlameStrategy
7
7
{
8
8
/// <summary>
9
- /// Track renames of the file, but no block movement.
9
+ /// Track renames of the file using diff rename detection , but no block movement.
10
10
/// </summary>
11
11
Default ,
12
12
@@ -21,6 +21,16 @@ public enum BlameStrategy
21
21
22
22
// Track copies across all files in all commits. (NOT SUPPORTED IN LIBGIT2 YET)
23
23
//TrackCopiesAnyCommitCopies
24
+
25
+ /// <summary>
26
+ /// Track renames of the file using only exact renames.
27
+ /// </summary>
28
+ FollowExactRenames = ( 1 << 5 ) ,
29
+
30
+ /// <summary>
31
+ /// Don't track renames of the file.
32
+ /// </summary>
33
+ DontFollowRenames = ( 1 << 6 ) ,
24
34
}
25
35
26
36
/// <summary>
Original file line number Diff line number Diff line change @@ -38,6 +38,16 @@ internal enum GitBlameOptionFlags
38
38
/// following only the first parents.
39
39
/// </summary>
40
40
GIT_BLAME_FIRST_PARENT = ( 1 << 4 ) ,
41
+
42
+ /// <summary>
43
+ /// Take less time to generate blame by only following exact matches.
44
+ /// </summary>
45
+ GIT_BLAME_FOLLOW_EXACT_RENAMES = ( 1 << 5 ) ,
46
+
47
+ /// <summary>
48
+ /// Take less time to generate blame by not checking for renames
49
+ /// </summary>
50
+ GIT_BLAME_DONT_FOLLOW_RENAMES = ( 1 << 6 ) ,
41
51
}
42
52
43
53
[ StructLayout ( LayoutKind . Sequential ) ]
@@ -78,6 +88,12 @@ public static GitBlameOptionFlags ToGitBlameOptionFlags(this BlameStrategy strat
78
88
case BlameStrategy . Default :
79
89
return GitBlameOptionFlags . GIT_BLAME_NORMAL ;
80
90
91
+ case BlameStrategy . FollowExactRenames :
92
+ return GitBlameOptionFlags . GIT_BLAME_FOLLOW_EXACT_RENAMES ;
93
+
94
+ case BlameStrategy . DontFollowRenames :
95
+ return GitBlameOptionFlags . GIT_BLAME_DONT_FOLLOW_RENAMES ;
96
+
81
97
default :
82
98
throw new NotSupportedException (
83
99
string . Format ( CultureInfo . InvariantCulture , "{0} is not supported at this time" , strategy ) ) ;
You can’t perform that action at this time.
0 commit comments