Skip to content

Block saving (.) as your git username or email #3204

Closed

Description

@tierninho

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 ..

screen shot 2017-10-31 at 11 34 15 am

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.

screen shot 2017-10-31 at 11 33 10 am

screen shot 2017-10-31 at 11 33 27 am

1.0.7-beta0, mac

Activity

  1. added
    bug
    on Oct 31, 2017
  2. changed the title [-]Block saving (.) as your git credentials [/-] [+]Block saving (.) as your git username or email[/+] on Oct 31, 2017
  3. niik commented on Nov 1, 2017

    @niik
    Member

    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.

  4. shiftkey commented on Nov 2, 2017

    @shiftkey
    Member

    @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...

  5. tierninho commented on Nov 2, 2017

    @tierninho
    ContributorAuthor

    @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.

    screen shot 2017-11-02 at 8 34 01 am

  6. self-assigned this
    on Dec 12, 2017
  7. nerdneha commented on Dec 12, 2017

    @nerdneha
    Contributor
  8. shiftkey commented on Dec 12, 2017

    @shiftkey
    Member

    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.

  9. locked as resolved and limited conversation to collaborators on Jul 19, 2018
  10. unlocked this conversation on Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions