Merge branch 'jk/printf-format'
Code clean-up to avoid using a variable string that compilers may feel untrustable as printf-style format given to write_file() helper function. * jk/printf-format: commit.c: remove print_commit_list() avoid using sha1_to_hex output as printf format walker: let walker_say take arbitrary formats
This commit is contained in:
10
commit.c
10
commit.c
@ -1622,16 +1622,6 @@ struct commit_list **commit_list_append(struct commit *commit,
|
||||
return &new->next;
|
||||
}
|
||||
|
||||
void print_commit_list(struct commit_list *list,
|
||||
const char *format_cur,
|
||||
const char *format_last)
|
||||
{
|
||||
for ( ; list; list = list->next) {
|
||||
const char *format = list->next ? format_cur : format_last;
|
||||
printf(format, oid_to_hex(&list->item->object.oid));
|
||||
}
|
||||
}
|
||||
|
||||
const char *find_commit_header(const char *msg, const char *key, size_t *out_len)
|
||||
{
|
||||
int key_len = strlen(key);
|
||||
|
Reference in New Issue
Block a user