mirror of
https://github.com/git/git.git
synced 2024-11-28 12:34:08 +08:00
Remove extraneous ',' ';' and '.' characters from the full name gecos field.
Apparently some distributions tend to have space for phone numbers etc there.
This commit is contained in:
parent
08ca0b04ba
commit
5e5128ed1c
@ -96,6 +96,21 @@ static void remove_special(char *p)
|
||||
if (!c)
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Go back, and remove crud from the end: some people
|
||||
* have commas etc in their gecos field
|
||||
*/
|
||||
dst--;
|
||||
while (--dst >= p) {
|
||||
unsigned char c = *dst;
|
||||
switch (c) {
|
||||
case ',': case ';': case '.':
|
||||
*dst = 0;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static const char *month_names[] = {
|
||||
|
Loading…
Reference in New Issue
Block a user