-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split out test git user configuration
- Loading branch information
Showing
1 changed file
with
9 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,9 +27,16 @@ else { | |
plan skip_all => 'Can not find git command'; | ||
} | ||
|
||
my $git_user_name = 'Rex'; | ||
my $git_user_email = '[email protected]'; | ||
|
||
my $git_environment = { | ||
GIT_CONFIG_GLOBAL => File::Spec->devnull(), | ||
GIT_CONFIG_SYSTEM => File::Spec->devnull(), | ||
GIT_CONFIG_GLOBAL => File::Spec->devnull(), | ||
GIT_CONFIG_SYSTEM => File::Spec->devnull(), | ||
GIT_AUTHOR_NAME => $git_user_name, | ||
GIT_AUTHOR_EMAIL => $git_user_email, | ||
GIT_COMMITTER_NAME => $git_user_name, | ||
GIT_COMMITTER_EMAIL => $git_user_email, | ||
}; | ||
|
||
ok( $git, "Found git command at $git" ); | ||
|
@@ -83,11 +90,6 @@ sub prepare_test_repo { | |
|
||
i_run 'git init', cwd => $directory, env => $git_environment; | ||
|
||
i_run 'git config user.name Rex', cwd => $directory, env => $git_environment; | ||
i_run 'git config user.email [email protected]', | ||
cwd => $directory, | ||
env => $git_environment; | ||
|
||
i_run 'git commit --allow-empty -m commit', | ||
cwd => $directory, | ||
env => $git_environment; | ||
|