Skip to content
New issue

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

Fallback onto global .gitconfig if no user name/email specified #86

Open
bilogic opened this issue Sep 7, 2023 · 1 comment
Open

Fallback onto global .gitconfig if no user name/email specified #86

bilogic opened this issue Sep 7, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@bilogic
Copy link

bilogic commented Sep 7, 2023

Summary of the new feature/enhancement

I have a multiroot (read: multi git repo) project and set the user name and email in my ~/.gitconfig, but I'm still getting this error You have selected profile UUU, but the repo RRR is not using user details from this profile. Do you want to apply the user dertails from profile UUU?

Proposed technical implementation details (optional)

The "current" user should be assess based on git config -l, thus, when running in a repo that does not have a user name/email configured, the global user should be used instead. And if it matches, this extension should not report the error

@bilogic bilogic added the enhancement New feature or request label Sep 7, 2023
@bilogic bilogic changed the title Multiroot project should use global profile, unsure how to make sync work Fallback onto global .gitconfig if no user name/email specified Sep 7, 2023
@bilogic bilogic changed the title Fallback onto global .gitconfig if no user name/email specified Fallback onto global .gitconfig if no user name/email specified Sep 7, 2023
@onlyutkarsh
Copy link
Owner

onlyutkarsh commented Feb 16, 2024

The way I am thinking of implementing this is when the user first opens a repo, if the repo does not have user config details, I will fall back to see if global .gitconfig has user details defined (as you explained). If yes, I will create a profile with those details in the settings (if no other profiles have those details) and select it in the status bar (in a warning state). The reason to add it as a separate "Global" profile is to list it in a picker, allowing the user to pick it for other repositories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants