Skip to content

Commit 1a31a2d

Browse files
whydoubtgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c697136 commit 1a31a2d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

builtin/blame.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@ static void pass_blame_to_parent(struct blame_scoreboard *sb,
959959
*
960960
* Compute how trivial the lines in the blame_entry are.
961961
*/
962-
static unsigned ent_score(struct blame_scoreboard *sb, struct blame_entry *e)
962+
static unsigned blame_entry_score(struct blame_scoreboard *sb, struct blame_entry *e)
963963
{
964964
unsigned score;
965965
const char *cp, *ep;
@@ -995,7 +995,7 @@ static void copy_split_if_better(struct blame_scoreboard *sb,
995995
if (!this[1].suspect)
996996
return;
997997
if (best_so_far[1].suspect) {
998-
if (ent_score(sb, &this[1]) < ent_score(sb, &best_so_far[1]))
998+
if (blame_entry_score(sb, &this[1]) < blame_entry_score(sb, &best_so_far[1]))
999999
return;
10001000
}
10011001

@@ -1107,7 +1107,7 @@ static struct blame_entry **filter_small(struct blame_scoreboard *sb,
11071107
struct blame_entry *p = *source;
11081108
struct blame_entry *oldsmall = *small;
11091109
while (p) {
1110-
if (ent_score(sb, p) <= score_min) {
1110+
if (blame_entry_score(sb, p) <= score_min) {
11111111
*small = p;
11121112
small = &p->next;
11131113
p = *small;
@@ -1156,7 +1156,7 @@ static void find_move_in_parent(struct blame_scoreboard *sb,
11561156
next = e->next;
11571157
find_copy_in_blob(sb, e, parent, split, &file_p);
11581158
if (split[1].suspect &&
1159-
blame_move_score < ent_score(sb, &split[1])) {
1159+
blame_move_score < blame_entry_score(sb, &split[1])) {
11601160
split_blame(blamed, &unblamedtail, split, e);
11611161
} else {
11621162
e->next = leftover;
@@ -1286,7 +1286,7 @@ static void find_copy_in_parent(struct blame_scoreboard *sb,
12861286
for (j = 0; j < num_ents; j++) {
12871287
struct blame_entry *split = blame_list[j].split;
12881288
if (split[1].suspect &&
1289-
blame_copy_score < ent_score(sb, &split[1])) {
1289+
blame_copy_score < blame_entry_score(sb, &split[1])) {
12901290
split_blame(blamed, &unblamedtail, split,
12911291
blame_list[j].ent);
12921292
} else {
@@ -2104,8 +2104,8 @@ static void find_alignment(struct blame_scoreboard *sb, int *option)
21042104
num = e->lno + e->num_lines;
21052105
if (longest_dst_lines < num)
21062106
longest_dst_lines = num;
2107-
if (largest_score < ent_score(sb, e))
2108-
largest_score = ent_score(sb, e);
2107+
if (largest_score < blame_entry_score(sb, e))
2108+
largest_score = blame_entry_score(sb, e);
21092109
}
21102110
max_orig_digits = decimal_width(longest_src_lines);
21112111
max_digits = decimal_width(longest_dst_lines);

0 commit comments

Comments
 (0)