cli/git
Eng Zer Jun 471cbea4fa
test: use t.Setenv to set env vars in tests (#6333)
This commit replaces `os.Setenv` with `t.Setenv` in tests. The
environment variable is automatically restored to its original value
when the test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.Setenv
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-09-26 08:46:02 +00:00
..
fixtures Add live tests for some methods in the git package 2021-02-24 15:05:56 +01:00
git.go pr create: allow git push step to prompt on stdin 2022-09-21 20:57:53 +02:00
git_test.go test: use t.Setenv to set env vars in tests (#6333) 2022-09-26 08:46:02 +00:00
remote.go Migrate to binary style extensions when detected 2021-11-17 13:15:04 -06:00
remote_test.go Equal: flip arguments position 2021-01-18 21:00:59 -03:00
url.go Fixes #4346: allow git+https URL protocol 2021-09-20 19:35:06 +03:00
url_test.go Fixes #4346: allow git+https URL protocol 2021-09-20 19:35:06 +03:00