Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
blame: rename nth_line function
author
Jeff Smith
<whydoubt@gmail.com>
Wed, 24 May 2017 05:15:17 +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:
1a31a2d
)
diff --git
a/builtin/blame.c
b/builtin/blame.c
index 129ef288780c09b63d4055a0f99415a97dbe6a0f..5082543a54fe0f57e660c9da4a34455e5a405bca 100644
(file)
--- a/
builtin/blame.c
+++ b/
builtin/blame.c
@@
-653,14
+653,14
@@
static void dup_entry(struct blame_entry ***queue,
*queue = &dst->next;
}
*queue = &dst->next;
}
-static const char *nth_line(struct blame_scoreboard *sb, long lno)
+static const char *
blame_
nth_line(struct blame_scoreboard *sb, long lno)
{
return sb->final_buf + sb->lineno[lno];
}
static const char *nth_line_cb(void *data, long lno)
{
{
return sb->final_buf + sb->lineno[lno];
}
static const char *nth_line_cb(void *data, long lno)
{
- return nth_line((struct blame_scoreboard *)data, lno);
+ return
blame_
nth_line((struct blame_scoreboard *)data, lno);
}
/*
}
/*
@@
-968,8
+968,8
@@
static unsigned blame_entry_score(struct blame_scoreboard *sb, struct blame_entr
return e->score;
score = 1;
return e->score;
score = 1;
- cp = nth_line(sb, e->lno);
- ep = nth_line(sb, e->lno + e->num_lines);
+ cp =
blame_
nth_line(sb, e->lno);
+ ep =
blame_
nth_line(sb, e->lno + e->num_lines);
while (cp < ep) {
unsigned ch = *((unsigned char *)cp);
if (isalnum(ch))
while (cp < ep) {
unsigned ch = *((unsigned char *)cp);
if (isalnum(ch))
@@
-1078,9
+1078,9
@@
static void find_copy_in_blob(struct blame_scoreboard *sb,
/*
* Prepare mmfile that contains only the lines in ent.
*/
/*
* Prepare mmfile that contains only the lines in ent.
*/
- cp = nth_line(sb, ent->lno);
+ cp =
blame_
nth_line(sb, ent->lno);
file_o.ptr = (char *) cp;
file_o.ptr = (char *) cp;
- file_o.size = nth_line(sb, ent->lno + ent->num_lines) - cp;
+ file_o.size =
blame_
nth_line(sb, ent->lno + ent->num_lines) - cp;
/*
* file_o is a part of final image we are annotating.
/*
* file_o is a part of final image we are annotating.
@@
-1866,7
+1866,7
@@
static void emit_porcelain(struct blame_scoreboard *sb, struct blame_entry *ent,
ent->num_lines);
emit_porcelain_details(suspect, repeat);
ent->num_lines);
emit_porcelain_details(suspect, repeat);
- cp = nth_line(sb, ent->lno);
+ cp =
blame_
nth_line(sb, ent->lno);
for (cnt = 0; cnt < ent->num_lines; cnt++) {
char ch;
if (cnt) {
for (cnt = 0; cnt < ent->num_lines; cnt++) {
char ch;
if (cnt) {
@@
-1900,7
+1900,7
@@
static void emit_other(struct blame_scoreboard *sb, struct blame_entry *ent, int
get_commit_info(suspect->commit, &ci, 1);
oid_to_hex_r(hex, &suspect->commit->object.oid);
get_commit_info(suspect->commit, &ci, 1);
oid_to_hex_r(hex, &suspect->commit->object.oid);
- cp = nth_line(sb, ent->lno);
+ cp =
blame_
nth_line(sb, ent->lno);
for (cnt = 0; cnt < ent->num_lines; cnt++) {
char ch;
int length = (opt & OUTPUT_LONG_OBJECT_NAME) ? GIT_SHA1_HEXSZ : abbrev;
for (cnt = 0; cnt < ent->num_lines; cnt++) {
char ch;
int length = (opt & OUTPUT_LONG_OBJECT_NAME) ? GIT_SHA1_HEXSZ : abbrev;