elixirsc / git-pair

Automatically adds `Co-authored-by` mark when you're pairing
https://hex.pm/packages/git_pair
MIT License
8 stars 0 forks source link

Use Storage module in `rm` command #47

Closed wevtimoteo closed 4 years ago

wevtimoteo commented 4 years ago

Motivation

In order to store both user identifier (username) and email we've introduced Storage module to take care of managing data in .git/config. Now we need to ensure that Actions module rely in Storage implementation.

Proposed solution

Instead of using git config --unset command, I picked git config --remove-section which removes the entire section from .git/config, for instance:

[pair "fake_user"]
    identifier = fake_user
        email = fake_user@example.com

Running: git config --remove-section pair.fake_user will remove entire section above. So we can avoid running --unset twice.

sourcelevel-bot[bot] commented 4 years ago

SourceLevel has finished reviewing this Pull Request and has found:

See more details about this review.