-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 to AppData if XDG_CONFIG_HOME is unset #5030
Conversation
Hi @dscho , This is the initial PR to add support for AppData if the XDG_CONFIG is unset. Unfortunately, I wasn't able to move the platform-dependent code to Thanks in advance for your guidance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably okay to keep this in a WIN32
-specific code block. If the reviewers on the Git mailing list take offense, we can still change it then.
However, the commit messages need a sign-off.
Also, the second commit fixes a bug introduced in the first one, and the reviewers on the Git mailing list regularly object to introducing a known bug in that way, asking contributors to "squash the commits" instead.
Also, please avoid undescriptive one-liner commit messages. Instead follow the guidance in https://github.blog/2022-06-30-write-better-commits-build-better-projects/ to improve them, in particular with a strong focus on this part:
What you’re doing | Why you’re doing it | |
---|---|---|
High-level (strategic) | Intent (what does this accomplish?) | Context (why does the code do what it does now?) |
Low-level (tactical) | Implementation (what did you do to accomplish your goal?) | Justification (why is this change being made?) |
In order to be a better Windows citizenship, Git should save its configuration files on AppData folder. This can enables git configuration files be replicated between machines using the same Microsoft account logon which would reduce the friction of setting up Git on new systems. Therefore, if %APPDATA%\Git\config exists, we use it; otherwise $HOME/.config/git/config is used. Signed-off-by: Ariel Lourenco <[email protected]>
/add relnote feature The workflow run was started |
`git config` [respects two user-wide configs](https://git-scm.com/docs/git-config#FILES): `.gitconfig` in the home directory, and `.config/git/config`. Since the latter isn't a Windows-native directory, [Git for Windows now looks for `Git/config` in the `AppData` directory](git-for-windows/git#5030), unless `.config/git/config` exists. Signed-off-by: gitforwindowshelper[bot] <[email protected]>
Thank you @ariellourenco for your contribution! |
My pleasure @dscho |
#316