You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Block saving (.) as your git username or email #3204
You are allowed to save . as your git credentials, however, it causes problems further down the line. When you attempt to commit or revert, there are two similar errors that surface, each saying you cannot save your same as ..
We should block the user from saving their git name or email as a . in the Preferences > Git modal. Not sure if there are other special characters, et al, that would cause disruption as well.
For the future implementor of this. It would be spectacular if we could find a way to leverage Git's own validation logic here rather than try to replicate it ourselves.
@shiftkey took a sec to figure it out, but that error can be surfaced when you revert a commit... in this case the initial commit on an already published repo.
Nice find @nerdneha. While @niik above suggested that it'd be great if we could get this by invoking Git in some way, the rules themselves haven't changed in at least 9 years:
I'd suggest extracting those rules into our app is a fair compromise.
Activity
[-]Block saving (.) as your git credentials [/-][+]Block saving (.) as your git username or email[/+]niik commentedon Nov 1, 2017
For the future implementor of this. It would be spectacular if we could find a way to leverage Git's own validation logic here rather than try to replicate it ourselves.
shiftkey commentedon Nov 2, 2017
@tierninho can you recall the flow to trigger that first error? The second one looks like committing, but I'm curious if we stumble upon it earlier...
tierninho commentedon Nov 2, 2017
@shiftkey took a sec to figure it out, but that error can be surfaced when you revert a commit... in this case the initial commit on an already published repo.
nerdneha commentedon Dec 12, 2017
Looks like they use a function called
crudto throw this error, see:https://github.com/git/git/blob/e629a7d28a405e48fae6b064a781a10e885159fc/ident.c#L191-L203
shiftkey commentedon Dec 12, 2017
Nice find @nerdneha. While @niik above suggested that it'd be great if we could get this by invoking Git in some way, the rules themselves haven't changed in at least 9 years:
I'd suggest extracting those rules into our app is a fair compromise.