We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In the extension settings, you could use git config names instead of "userName" and "email".
This could ease adding new settings to the profiles and would remove the need to translate fields to git config names ("userName" -> "user.name")
Then, to identify profiles, you could generate an id or use the profile label and put it as a custom field in the user config.
The updated config format could look something like that:
{ "label": "My profile", "config": { "user.name": "Alice Bob", "user.email": "alice.bob@example.de" }, "selected": true }
And could, for example, be updated by a user this way to configure GPG signing as well:
{ "label": "My profile", "config": { "user.name": "Alice Bob", "user.email": "alice.bob@example.de" "user.signingkey": "ABCDEF0123456789BD", "commit.gpgsign": true }, "selected": true }
The id could be stored this way in .git/config:
[user] name = Alice Bob email = alice.bob@example.de [gcup] profileId = My profile
We might want to validate config names, a regex like this one (untested) ^([a-zA-Z0-9]+\.?)+[a-zA-Z0-9]$ should do the trick.
^([a-zA-Z0-9]+\.?)+[a-zA-Z0-9]$
Also, when switching profiles, we would have to remove each field of the previous profile before applying the new one.
I might look into it myself and make a pull request but I'm not familiar with TypeScript.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Summary of the new feature/enhancement
In the extension settings, you could use git config names instead of "userName" and "email".
This could ease adding new settings to the profiles and would remove the need to translate fields to git config names
("userName" -> "user.name")
Then, to identify profiles, you could generate an id or use the profile label and put it as a custom field in the user config.
Proposed technical implementation details (optional)
The updated config format could look something like that:
And could, for example, be updated by a user this way to configure GPG signing as well:
The id could be stored this way in .git/config:
We might want to validate config names, a regex like this one (untested)
^([a-zA-Z0-9]+\.?)+[a-zA-Z0-9]$
should do the trick.Also, when switching profiles, we would have to remove each field of the previous profile before applying the new one.
I might look into it myself and make a pull request but I'm not familiar with TypeScript.
The text was updated successfully, but these errors were encountered: