@@ -49,12 +49,12 @@ static int compare_by_list(const void *a1, const void *a2)
49
49
}
50
50
51
51
static void insert_one_record (struct shortlog * log ,
52
- const char * author ,
52
+ const char * ident ,
53
53
const char * oneline )
54
54
{
55
55
struct string_list_item * item ;
56
56
57
- item = string_list_insert (& log -> list , author );
57
+ item = string_list_insert (& log -> list , ident );
58
58
59
59
if (log -> summary )
60
60
item -> util = (void * )(UTIL_TO_INT (item ) + 1 );
@@ -97,8 +97,8 @@ static void insert_one_record(struct shortlog *log,
97
97
}
98
98
}
99
99
100
- static int parse_stdin_author (struct shortlog * log ,
101
- struct strbuf * out , const char * in )
100
+ static int parse_stdin_ident (struct shortlog * log ,
101
+ struct strbuf * out , const char * in )
102
102
{
103
103
const char * mailbuf , * namebuf ;
104
104
size_t namelen , maillen ;
@@ -122,18 +122,18 @@ static int parse_stdin_author(struct shortlog *log,
122
122
123
123
static void read_from_stdin (struct shortlog * log )
124
124
{
125
- struct strbuf author = STRBUF_INIT ;
126
- struct strbuf mapped_author = STRBUF_INIT ;
125
+ struct strbuf ident = STRBUF_INIT ;
126
+ struct strbuf mapped_ident = STRBUF_INIT ;
127
127
struct strbuf oneline = STRBUF_INIT ;
128
128
static const char * author_match [2 ] = { "Author: " , "author " };
129
129
static const char * committer_match [2 ] = { "Commit: " , "committer " };
130
130
const char * * match ;
131
131
132
132
match = log -> committer ? committer_match : author_match ;
133
- while (strbuf_getline_lf (& author , stdin ) != EOF ) {
133
+ while (strbuf_getline_lf (& ident , stdin ) != EOF ) {
134
134
const char * v ;
135
- if (!skip_prefix (author .buf , match [0 ], & v ) &&
136
- !skip_prefix (author .buf , match [1 ], & v ))
135
+ if (!skip_prefix (ident .buf , match [0 ], & v ) &&
136
+ !skip_prefix (ident .buf , match [1 ], & v ))
137
137
continue ;
138
138
while (strbuf_getline_lf (& oneline , stdin ) != EOF &&
139
139
oneline .len )
@@ -142,20 +142,20 @@ static void read_from_stdin(struct shortlog *log)
142
142
!oneline .len )
143
143
; /* discard blanks */
144
144
145
- strbuf_reset (& mapped_author );
146
- if (parse_stdin_author (log , & mapped_author , v ) < 0 )
145
+ strbuf_reset (& mapped_ident );
146
+ if (parse_stdin_ident (log , & mapped_ident , v ) < 0 )
147
147
continue ;
148
148
149
- insert_one_record (log , mapped_author .buf , oneline .buf );
149
+ insert_one_record (log , mapped_ident .buf , oneline .buf );
150
150
}
151
- strbuf_release (& author );
152
- strbuf_release (& mapped_author );
151
+ strbuf_release (& ident );
152
+ strbuf_release (& mapped_ident );
153
153
strbuf_release (& oneline );
154
154
}
155
155
156
156
void shortlog_add_commit (struct shortlog * log , struct commit * commit )
157
157
{
158
- struct strbuf author = STRBUF_INIT ;
158
+ struct strbuf ident = STRBUF_INIT ;
159
159
struct strbuf oneline = STRBUF_INIT ;
160
160
struct pretty_print_context ctx = {0 };
161
161
const char * fmt ;
@@ -170,17 +170,17 @@ void shortlog_add_commit(struct shortlog *log, struct commit *commit)
170
170
(log -> email ? "%cN <%cE>" : "%cN" ) :
171
171
(log -> email ? "%aN <%aE>" : "%aN" );
172
172
173
- format_commit_message (commit , fmt , & author , & ctx );
173
+ format_commit_message (commit , fmt , & ident , & ctx );
174
174
if (!log -> summary ) {
175
175
if (log -> user_format )
176
176
pretty_print_commit (& ctx , commit , & oneline );
177
177
else
178
178
format_commit_message (commit , "%s" , & oneline , & ctx );
179
179
}
180
180
181
- insert_one_record (log , author .buf , oneline .len ? oneline .buf : "<none>" );
181
+ insert_one_record (log , ident .buf , oneline .len ? oneline .buf : "<none>" );
182
182
183
- strbuf_release (& author );
183
+ strbuf_release (& ident );
184
184
strbuf_release (& oneline );
185
185
}
186
186
0 commit comments