@@ -436,6 +436,12 @@ const char *git_author_info(int flag)
436436 author_ident_explicitly_given |= IDENT_NAME_GIVEN ;
437437 if (getenv ("GIT_AUTHOR_EMAIL" ))
438438 author_ident_explicitly_given |= IDENT_MAIL_GIVEN ;
439+ if (1 ) {
440+ char * name = xstrdup_or_null (getenv ("GIT_AUTHOR_NAME" )), * email = xstrdup_or_null (getenv ("GIT_AUTHOR_EMAIL" )), * date = xstrdup_or_null (getenv ("GIT_AUTHOR_DATE" ));
441+ const char * res = fmt_ident (name , email , date , flag );
442+ free (name ); free (email ); free (date );
443+ return res ;
444+ }
439445 return fmt_ident (getenv ("GIT_AUTHOR_NAME" ),
440446 getenv ("GIT_AUTHOR_EMAIL" ),
441447 getenv ("GIT_AUTHOR_DATE" ),
@@ -448,6 +454,12 @@ const char *git_committer_info(int flag)
448454 committer_ident_explicitly_given |= IDENT_NAME_GIVEN ;
449455 if (getenv ("GIT_COMMITTER_EMAIL" ))
450456 committer_ident_explicitly_given |= IDENT_MAIL_GIVEN ;
457+ if (1 ) {
458+ char * name = xstrdup_or_null (getenv ("GIT_COMMITTER_NAME" )), * email = xstrdup_or_null (getenv ("GIT_COMMITTER_EMAIL" )), * date = xstrdup_or_null (getenv ("GIT_COMMITTER_DATE" ));
459+ const char * res = fmt_ident (name , email , date , flag );
460+ free (name ); free (email ); free (date );
461+ return res ;
462+ }
451463 return fmt_ident (getenv ("GIT_COMMITTER_NAME" ),
452464 getenv ("GIT_COMMITTER_EMAIL" ),
453465 getenv ("GIT_COMMITTER_DATE" ),
0 commit comments