diff options
author | Jeff Smith <whydoubt@gmail.com> | 2017-05-24 00:15:16 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-05-24 15:41:51 +0900 |
commit | 1a31a2d98a29f85194b59ceca40eaa172fceebc0 (patch) | |
tree | f3a74fdc3481c88af36de01ae45b0a4b8aee2063 | |
parent | blame: rename coalesce function (diff) | |
download | tgif-1a31a2d98a29f85194b59ceca40eaa172fceebc0.tar.xz |
blame: rename ent_score function
Functions that will be publicly exposed should have names that better
reflect what they are a part of.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | builtin/blame.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/builtin/blame.c b/builtin/blame.c index 7c493d2b99..129ef28878 100644 --- a/builtin/blame.c +++ b/builtin/blame.c @@ -959,7 +959,7 @@ static void pass_blame_to_parent(struct blame_scoreboard *sb, * * Compute how trivial the lines in the blame_entry are. */ -static unsigned ent_score(struct blame_scoreboard *sb, struct blame_entry *e) +static unsigned blame_entry_score(struct blame_scoreboard *sb, struct blame_entry *e) { unsigned score; const char *cp, *ep; @@ -995,7 +995,7 @@ static void copy_split_if_better(struct blame_scoreboard *sb, if (!this[1].suspect) return; if (best_so_far[1].suspect) { - if (ent_score(sb, &this[1]) < ent_score(sb, &best_so_far[1])) + if (blame_entry_score(sb, &this[1]) < blame_entry_score(sb, &best_so_far[1])) return; } @@ -1107,7 +1107,7 @@ static struct blame_entry **filter_small(struct blame_scoreboard *sb, struct blame_entry *p = *source; struct blame_entry *oldsmall = *small; while (p) { - if (ent_score(sb, p) <= score_min) { + if (blame_entry_score(sb, p) <= score_min) { *small = p; small = &p->next; p = *small; @@ -1156,7 +1156,7 @@ static void find_move_in_parent(struct blame_scoreboard *sb, next = e->next; find_copy_in_blob(sb, e, parent, split, &file_p); if (split[1].suspect && - blame_move_score < ent_score(sb, &split[1])) { + blame_move_score < blame_entry_score(sb, &split[1])) { split_blame(blamed, &unblamedtail, split, e); } else { e->next = leftover; @@ -1286,7 +1286,7 @@ static void find_copy_in_parent(struct blame_scoreboard *sb, for (j = 0; j < num_ents; j++) { struct blame_entry *split = blame_list[j].split; if (split[1].suspect && - blame_copy_score < ent_score(sb, &split[1])) { + blame_copy_score < blame_entry_score(sb, &split[1])) { split_blame(blamed, &unblamedtail, split, blame_list[j].ent); } else { @@ -2104,8 +2104,8 @@ static void find_alignment(struct blame_scoreboard *sb, int *option) num = e->lno + e->num_lines; if (longest_dst_lines < num) longest_dst_lines = num; - if (largest_score < ent_score(sb, e)) - largest_score = ent_score(sb, e); + if (largest_score < blame_entry_score(sb, e)) + largest_score = blame_entry_score(sb, e); } max_orig_digits = decimal_width(longest_src_lines); max_digits = decimal_width(longest_dst_lines); |