@@ -535,13 +535,13 @@ static void add_header(const char *value)
535535 len -- ;
536536
537537 if (!strncasecmp (value , "to: " , 4 )) {
538- item = string_list_append (value + 4 , & extra_to );
538+ item = string_list_append (& extra_to , value + 4 );
539539 len -= 4 ;
540540 } else if (!strncasecmp (value , "cc: " , 4 )) {
541- item = string_list_append (value + 4 , & extra_cc );
541+ item = string_list_append (& extra_cc , value + 4 );
542542 len -= 4 ;
543543 } else {
544- item = string_list_append (value , & extra_hdr );
544+ item = string_list_append (& extra_hdr , value );
545545 }
546546
547547 item -> string [len ] = '\0' ;
@@ -566,13 +566,13 @@ static int git_format_config(const char *var, const char *value, void *cb)
566566 if (!strcmp (var , "format.to" )) {
567567 if (!value )
568568 return config_error_nonbool (var );
569- string_list_append (value , & extra_to );
569+ string_list_append (& extra_to , value );
570570 return 0 ;
571571 }
572572 if (!strcmp (var , "format.cc" )) {
573573 if (!value )
574574 return config_error_nonbool (var );
575- string_list_append (value , & extra_cc );
575+ string_list_append (& extra_cc , value );
576576 return 0 ;
577577 }
578578 if (!strcmp (var , "diff.color" ) || !strcmp (var , "color.diff" )) {
@@ -959,7 +959,7 @@ static int to_callback(const struct option *opt, const char *arg, int unset)
959959 if (unset )
960960 string_list_clear (& extra_to , 0 );
961961 else
962- string_list_append (arg , & extra_to );
962+ string_list_append (& extra_to , arg );
963963 return 0 ;
964964}
965965
@@ -968,7 +968,7 @@ static int cc_callback(const struct option *opt, const char *arg, int unset)
968968 if (unset )
969969 string_list_clear (& extra_cc , 0 );
970970 else
971- string_list_append (arg , & extra_cc );
971+ string_list_append (& extra_cc , arg );
972972 return 0 ;
973973}
974974
@@ -1251,7 +1251,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
12511251 rev .ref_message_ids = xcalloc (1 , sizeof (struct string_list ));
12521252 if (in_reply_to ) {
12531253 const char * msgid = clean_message_id (in_reply_to );
1254- string_list_append (msgid , rev .ref_message_ids );
1254+ string_list_append (rev .ref_message_ids , msgid );
12551255 }
12561256 rev .numbered_files = numbered_files ;
12571257 rev .patch_suffix = fmt_patch_suffix ;
@@ -1298,8 +1298,8 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
12981298 && (!cover_letter || rev .nr > 1 ))
12991299 free (rev .message_id );
13001300 else
1301- string_list_append (rev .message_id ,
1302- rev .ref_message_ids );
1301+ string_list_append (rev .ref_message_ids ,
1302+ rev .message_id );
13031303 }
13041304 gen_message_id (& rev , sha1_to_hex (commit -> object .sha1 ));
13051305 }
0 commit comments