|
13 | 13 | const |
14 | 14 | (** Normal blame, the default *) |
15 | 15 | GIT_BLAME_NORMAL = 0; |
16 | | - (** Track lines that have moved within a file (like `git blame -M`). |
17 | | - * NOT IMPLEMENTED. *) |
| 16 | + (** |
| 17 | + * Track lines that have moved within a file (like `git blame -M`). |
| 18 | + * |
| 19 | + * This is not yet implemented and reserved for future use. |
| 20 | + *) |
18 | 21 | GIT_BLAME_TRACK_COPIES_SAME_FILE = ( 1 shl 0 ); |
19 | | - (** Track lines that have moved across files in the same commit (like `git blame -C`). |
20 | | - * NOT IMPLEMENTED. *) |
| 22 | + (** |
| 23 | + * Track lines that have moved across files in the same commit |
| 24 | + * (like `git blame -C`). |
| 25 | + * |
| 26 | + * This is not yet implemented and reserved for future use. |
| 27 | + *) |
21 | 28 | GIT_BLAME_TRACK_COPIES_SAME_COMMIT_MOVES = ( 1 shl 1 ); |
22 | | - (** Track lines that have been copied from another file that exists in the |
23 | | - * same commit (like `git blame -CC`). Implies SAME_FILE. |
24 | | - * NOT IMPLEMENTED. *) |
| 29 | + (** |
| 30 | + * Track lines that have been copied from another file that exists |
| 31 | + * in the same commit (like `git blame -CC`). Implies SAME_FILE. |
| 32 | + * |
| 33 | + * This is not yet implemented and reserved for future use. |
| 34 | + *) |
25 | 35 | GIT_BLAME_TRACK_COPIES_SAME_COMMIT_COPIES = ( 1 shl 2 ); |
26 | | - (** Track lines that have been copied from another file that exists in *any* |
27 | | - * commit (like `git blame -CCC`). Implies SAME_COMMIT_COPIES. |
28 | | - * NOT IMPLEMENTED. *) |
| 36 | + (** |
| 37 | + * Track lines that have been copied from another file that exists in |
| 38 | + * *any* commit (like `git blame -CCC`). Implies SAME_COMMIT_COPIES. |
| 39 | + * |
| 40 | + * This is not yet implemented and reserved for future use. |
| 41 | + *) |
29 | 42 | GIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES = ( 1 shl 3 ); |
30 | | - (** Restrict the search of commits to those reachable following only the |
31 | | - * first parents. *) |
| 43 | + (** |
| 44 | + * Restrict the search of commits to those reachable following only |
| 45 | + * the first parents. |
| 46 | + *) |
32 | 47 | GIT_BLAME_FIRST_PARENT = ( 1 shl 4 ); |
33 | | - (** Use mailmap file to map author and committer names and email addresses |
34 | | - * to canonical real names and email addresses. The mailmap will be read |
35 | | - * from the working directory, or HEAD in a bare repository. *) |
| 48 | + (** |
| 49 | + * Use mailmap file to map author and committer names and email |
| 50 | + * addresses to canonical real names and email addresses. The |
| 51 | + * mailmap will be read from the working directory, or HEAD in a |
| 52 | + * bare repository. |
| 53 | + *) |
36 | 54 | GIT_BLAME_USE_MAILMAP = ( 1 shl 5 ); |
37 | 55 | (** Ignore whitespace differences *) |
38 | 56 | GIT_BLAME_IGNORE_WHITESPACE = ( 1 shl 6 ); |
|
52 | 70 | version : Cardinal; |
53 | 71 | (** A combination of `git_blame_flag_t` *) |
54 | 72 | flags : uint32_t; |
55 | | - (** The lower bound on the number of alphanumeric |
56 | | - * characters that must be detected as moving/copying within a file for it to |
57 | | - * associate those lines with the parent commit. The default value is 20. |
58 | | - * This value only takes effect if any of the `GIT_BLAME_TRACK_COPIES_*` |
59 | | - * flags are specified. |
60 | | - *) |
| 73 | + (** |
| 74 | + * The lower bound on the number of alphanumeric characters that |
| 75 | + * must be detected as moving/copying within a file for it to |
| 76 | + * associate those lines with the parent commit. The default value |
| 77 | + * is 20. |
| 78 | + * |
| 79 | + * This value only takes effect if any of the `GIT_BLAME_TRACK_COPIES_*` |
| 80 | + * flags are specified. |
| 81 | + *) |
61 | 82 | min_match_characters : uint16_t; |
62 | 83 | (** The id of the newest commit to consider. The default is HEAD. *) |
63 | 84 | newest_commit : git_oid; |
@@ -98,41 +119,54 @@ function git_blame_options_init(opts: Pgit_blame_options; version: Cardinal) |
98 | 119 |
|
99 | 120 | (** |
100 | 121 | * Structure that represents a blame hunk. |
101 | | - * |
102 | | - * - `lines_in_hunk` is the number of lines in this hunk |
103 | | - * - `final_commit_id` is the OID of the commit where this line was last |
104 | | - * changed. |
105 | | - * - `final_start_line_number` is the 1-based line number where this hunk |
106 | | - * begins, in the final version of the file |
107 | | - * - `final_signature` is the author of `final_commit_id`. If |
108 | | - * `GIT_BLAME_USE_MAILMAP` has been specified, it will contain the canonical |
109 | | - * real name and email address. |
110 | | - * - `orig_commit_id` is the OID of the commit where this hunk was found. This |
111 | | - * will usually be the same as `final_commit_id`, except when |
112 | | - * `GIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES` has been specified. |
113 | | - * - `orig_path` is the path to the file where this hunk originated, as of the |
114 | | - * commit specified by `orig_commit_id`. |
115 | | - * - `orig_start_line_number` is the 1-based line number where this hunk begins |
116 | | - * in the file named by `orig_path` in the commit specified by |
117 | | - * `orig_commit_id`. |
118 | | - * - `orig_signature` is the author of `orig_commit_id`. If |
119 | | - * `GIT_BLAME_USE_MAILMAP` has been specified, it will contain the canonical |
120 | | - * real name and email address. |
121 | | - * - `boundary` is 1 iff the hunk has been tracked to a boundary commit (the |
122 | | - * root, or the commit specified in git_blame_options.oldest_commit) |
123 | | - *) |
| 122 | + *) |
124 | 123 |
|
125 | 124 | type |
126 | 125 | git_blame_hunk = record |
| 126 | + (** |
| 127 | + * The number of lines in this hunk. |
| 128 | + *) |
127 | 129 | lines_in_hunk : size_t; |
| 130 | + (** |
| 131 | + * The OID of the commit where this line was last changed. |
| 132 | + *) |
128 | 133 | final_commit_id : git_oid; |
| 134 | + (** |
| 135 | + * The 1-based line number where this hunk begins, in the final version |
| 136 | + * of the file. |
| 137 | + *) |
129 | 138 | final_start_line_number : size_t; |
| 139 | + (** |
| 140 | + * The author of `final_commit_id`. If `GIT_BLAME_USE_MAILMAP` has been |
| 141 | + * specified, it will contain the canonical real name and email address. |
| 142 | + *) |
130 | 143 | final_signature : Pgit_signature; |
| 144 | + (** |
| 145 | + * The OID of the commit where this hunk was found. |
| 146 | + * This will usually be the same as `final_commit_id`, except when |
| 147 | + * `GIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES` has been specified. |
| 148 | + *) |
131 | 149 | orig_commit_id : git_oid; |
| 150 | + (** |
| 151 | + * The path to the file where this hunk originated, as of the commit |
| 152 | + * specified by `orig_commit_id`. |
| 153 | + *) |
132 | 154 | orig_path : PAnsiChar; |
| 155 | + (** |
| 156 | + * The 1-based line number where this hunk begins in the file named by |
| 157 | + * `orig_path` in the commit specified by `orig_commit_id`. |
| 158 | + *) |
133 | 159 | orig_start_line_number : size_t; |
| 160 | + (** |
| 161 | + * The author of `orig_commit_id`. If `GIT_BLAME_USE_MAILMAP` has been |
| 162 | + * specified, it will contain the canonical real name and email address. |
| 163 | + *) |
134 | 164 | orig_signature : Pgit_signature; |
135 | | - boundary : AnsiChar; |
| 165 | + (** |
| 166 | + * The 1 iff the hunk has been tracked to a boundary commit (the root, |
| 167 | + * or the commit specified in git_blame_options.oldest_commit) |
| 168 | + *) |
| 169 | + boundary : AnsiChar; |
136 | 170 | end; |
137 | 171 |
|
138 | 172 |
|
|
0 commit comments