This behaviour is hardcoded into git.
Edit: As it stands this is still true for git version 2.25.1 (27. February 2020).
To create the author string during a commit git removes crud (as git calls it) from the beginning and the end of the string. For this it uses the strbuf_addstr_without_crud
function defined in ident.c
- see ident.c line 426 version 2.25.1.
Take a look at the function header:
/*
* Copy over a string to the destination, but avoid special
* characters ('\n', '<' and '>') and remove crud at the end
*/
static void strbuf_addstr_without_crud(struct strbuf *sb, const char *src)
See ident.c lines 225-262 version 2.25.1.
Git determines crud via another function which checks for specific characters.
static int crud(unsigned char c)
{
return c <= 32 ||
c == '.' ||
c == ',' ||
c == ':' ||
c == ';' ||
c == '<' ||
c == '>' ||
c == '"' ||
c == '\\' ||
c == '\'';
}
See ident.c lines 198-210 version 2.25.1.
As you can see a period is considered crud by git and will be removed, at the moment there is no flag or option you can set to avoid this behaviour.
This means you have two options.
You fork git and change the way git creates the author string.
Or you append another character after the trailing period, for example a Zero-width space (which often won't be printed properly on a console)
Alternatively you can always submit a feature request on the git mailing list, but in this case I wouldn't raise my hopes too high.