Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBarret Rhoden <brho@google.com>2019-05-16 00:45:01 +0300
committerJunio C Hamano <gitster@pobox.com>2019-05-16 05:36:23 +0300
commit1fc73384bac289b4907f0adba2a25d0644affa73 (patch)
tree97015428911c3a14b5b7bf27d241453787e0195c /blame.h
parent8934ac8c92a1dc805f7bbd86cbc251ade66e1161 (diff)
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>
Diffstat (limited to 'blame.h')
-rw-r--r--blame.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/blame.h b/blame.h
index 53df8b4c5b..5dd877bb78 100644
--- a/blame.h
+++ b/blame.h
@@ -51,6 +51,8 @@ struct blame_origin {
*/
struct blame_entry *suspects;
mmfile_t file;
+ int num_lines;
+ void *fingerprints;
struct object_id blob_oid;
unsigned mode;
/* guilty gets set when shipping any suspects to the final