Git Identity is deleting my global git user.name and user.email values #2629
Description
Prerequisites
- Put an X between the brackets on this line if you have done all of the following:
- Reproduced the problem in Safe Mode: https://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
- Followed all applicable steps in the debugging guide: https://flight-manual.atom.io/hacking-atom/sections/debugging/
- Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
- Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
- Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
When I open a file in the Atom editor while the Git panel is open, sometimes the Git Identity panel appears with no values set for my name/email even though these values were set in my global git config. When this happens, my global settings have been removed.
For example, prior to opening a file in the editor I see this in a terminal window:
> git config --global -l
user.name=<my name>
user.email=<my email address>
Then in Atom I open a file in a repository I haven't used yet in the Atom session and the Git Identity panel appears without any data in it. I then run the command again and see my config has been modified improperly:
> git config --global -l
user.name=
user.email=
The user.name
and user.email
values are set to empty strings! This doesn't happen if I've edited something in that repository already, and doesn't always happen, but often enough that I'm concerned why Atom (git handling in particular) is making ANY changes to my global git settings. It should not!
Expected behavior:
My git identity set in global config should be used without modifying it.
Actual behavior:
My data is present but not used. But what's worse - it clears out my global data.
Reproduces how often:
100% when opening a file in a repository that hasn't been worked in yet in the session
Versions
Atom : 1.54.0
Electron: 6.1.12
Chrome : 76.0.3809.146
Node : 12.4.0
MacOS Big Sur version 11.2.1