@@ -966,7 +966,7 @@ static size_t format_commit_one(struct strbuf *sb, const char *placeholder,
966
966
967
967
if (!end )
968
968
return 0 ;
969
- if (!memcmp (begin , "auto," , 5 )) {
969
+ if (!prefixcmp (begin , "auto," )) {
970
970
if (!want_color (c -> pretty_ctx -> color ))
971
971
return end - placeholder + 1 ;
972
972
begin += 5 ;
@@ -1301,7 +1301,7 @@ static void pp_header(const struct pretty_print_context *pp,
1301
1301
continue ;
1302
1302
}
1303
1303
1304
- if (!memcmp (line , "parent " , 7 )) {
1304
+ if (!prefixcmp (line , "parent " )) {
1305
1305
if (linelen != 48 )
1306
1306
die ("bad parent line in commit" );
1307
1307
continue ;
@@ -1325,11 +1325,11 @@ static void pp_header(const struct pretty_print_context *pp,
1325
1325
* FULL shows both authors but not dates.
1326
1326
* FULLER shows both authors and dates.
1327
1327
*/
1328
- if (!memcmp (line , "author " , 7 )) {
1328
+ if (!prefixcmp (line , "author " )) {
1329
1329
strbuf_grow (sb , linelen + 80 );
1330
1330
pp_user_info (pp , "Author" , sb , line + 7 , encoding );
1331
1331
}
1332
- if (!memcmp (line , "committer " , 10 ) &&
1332
+ if (!prefixcmp (line , "committer " ) &&
1333
1333
(pp -> fmt == CMIT_FMT_FULL || pp -> fmt == CMIT_FMT_FULLER )) {
1334
1334
strbuf_grow (sb , linelen + 80 );
1335
1335
pp_user_info (pp , "Commit" , sb , line + 10 , encoding );
0 commit comments