Commit 1fc7338
blame: optionally track line fingerprints during fill_blame_origin()
fill_blame_origin() is a convenient place to store data that we will use
throughout the lifetime of a blame_origin. Some heuristics for
ignoring commits during a blame session can make use of this storage.
In particular, we will calculate a fingerprint for each line of a file
for blame_origins involved in an ignored commit.
In this commit, we only calculate the line_starts, reusing the existing
code from the scoreboard's line_starts. In an upcoming commit, we will
actually compute the fingerprints.
This feature will be used when we attempt to pass blame entries to
parents when we "ignore" a commit. Most uses of fill_blame_origin()
will not require this feature, hence the flag parameter. Multiple calls
to fill_blame_origin() are idempotent, and any of them can request the
creation of the fingerprints structure.
Suggested-by: Michael Platings <michael@platin.gs>
Signed-off-by: Barret Rhoden <brho@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 8934ac8 commit 1fc7338
2 files changed
+62
-30
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
313 | 358 | | |
314 | 359 | | |
315 | 360 | | |
316 | 361 | | |
317 | 362 | | |
318 | | - | |
| 363 | + | |
| 364 | + | |
319 | 365 | | |
320 | 366 | | |
321 | 367 | | |
| |||
339 | 385 | | |
340 | 386 | | |
341 | 387 | | |
| 388 | + | |
| 389 | + | |
342 | 390 | | |
343 | 391 | | |
344 | 392 | | |
345 | 393 | | |
346 | 394 | | |
| 395 | + | |
347 | 396 | | |
348 | 397 | | |
349 | 398 | | |
| |||
1140 | 1189 | | |
1141 | 1190 | | |
1142 | 1191 | | |
1143 | | - | |
1144 | | - | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
1145 | 1196 | | |
1146 | 1197 | | |
1147 | 1198 | | |
| |||
1352 | 1403 | | |
1353 | 1404 | | |
1354 | 1405 | | |
1355 | | - | |
| 1406 | + | |
| 1407 | + | |
1356 | 1408 | | |
1357 | 1409 | | |
1358 | 1410 | | |
| |||
1481 | 1533 | | |
1482 | 1534 | | |
1483 | 1535 | | |
1484 | | - | |
| 1536 | + | |
| 1537 | + | |
1485 | 1538 | | |
1486 | 1539 | | |
1487 | 1540 | | |
| |||
1820 | 1873 | | |
1821 | 1874 | | |
1822 | 1875 | | |
1823 | | - | |
1824 | | - | |
1825 | | - | |
1826 | | - | |
1827 | | - | |
1828 | | - | |
1829 | 1876 | | |
1830 | 1877 | | |
1831 | 1878 | | |
1832 | 1879 | | |
1833 | 1880 | | |
1834 | 1881 | | |
1835 | | - | |
1836 | | - | |
1837 | | - | |
1838 | | - | |
1839 | | - | |
1840 | | - | |
1841 | | - | |
1842 | | - | |
1843 | | - | |
1844 | | - | |
1845 | | - | |
1846 | | - | |
1847 | | - | |
1848 | | - | |
1849 | | - | |
1850 | | - | |
1851 | | - | |
1852 | | - | |
1853 | | - | |
| 1882 | + | |
| 1883 | + | |
1854 | 1884 | | |
1855 | 1885 | | |
1856 | 1886 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
| |||
0 commit comments