-
Notifications
You must be signed in to change notification settings - Fork 153
test: ignore global config in tests #485
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
Conversation
9d8fd88 to
7340b00
Compare
7340b00 to
c0e8ba6
Compare
|
Is there a way to be able to pass "ignore the gitconfig" to these git commands? I think ideally all these tests would be completely independent of local gitconfig. It would be unexpected to have flakiness from that. |
carlfriedrich
left a comment
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.
I would also vote for trying to find a way to completely ignore the user's .gitconfig. As far as I can see, there is no option for git to do so, though.
Maybe we can set the HOME env variable for a test to a temp directory? This way, the user's config shouldn't be picked up at first. Not sure if this might have side effects, though.
|
Possibly relevant? https://superuser.com/questions/53030/run-git-commands-without-default-gitconfig May be removed though, someone does recommend doing something like |
|
@cjappl Good find, and good idea setting |
|
I've found another option, which I'd prefer. When |
c0e8ba6 to
0e1de0b
Compare
|
@sandr01d Ah, great find. That makes sense. Approved! |
Check list
Description
When creating commits in tests, it's best to pass the
--no-gpg-signflag. I havecommit.gpgsignset totruein my git config. Without--no-gpg-sign, git wants me to enter a passphrase when running the tests, which is a bit annoying.Type of change
Test environment