Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
blame: rename ent_score function
author
Jeff Smith
<whydoubt@gmail.com>
Wed, 24 May 2017 05:15:16 +0000
(
00:15
-0500)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 24 May 2017 06:41:51 +0000
(15:41 +0900)
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>
builtin/blame.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
c697136
)
diff --git
a/builtin/blame.c
b/builtin/blame.c
index 7c493d2b99d0302696447a0c3ae89c129829065d..129ef288780c09b63d4055a0f99415a97dbe6a0f 100644
(file)
--- 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.
*/
*
* 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;
{
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 (!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;
}
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) {
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;
*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 &&
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;
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 &&
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 {
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;
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);
}
max_orig_digits = decimal_width(longest_src_lines);
max_digits = decimal_width(longest_dst_lines);