Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

test: fix git_sandbox for git<2.33 #713

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

Merged
merged 1 commit into from
Apr 19, 2023

Conversation

Apkawa
Copy link
Contributor

@Apkawa Apkawa commented Apr 19, 2023

for old git like git-2.30 the tests broke my ~/.gitconfig file and created thousands of name=GitHub lines

Description

I checked the git documentation and worked out a workaround for my situation. I think it should work for a fresh git too

ENVIRONMENT
       GIT_CONFIG
           Take the configuration from the given file instead of .git/config. Using the "--global" option forces this to ~/.gitconfig. Using the "--system" option forces this to
           $(prefix)/etc/gitconfig.

       GIT_CONFIG_NOSYSTEM
           Whether to skip reading settings from the system-wide $(prefix)/etc/gitconfig file. See git(1) for details.

       See also the section called “FILES”.

Checklist

  • Add test cases to all the changes you introduce
  • Run ./scripts/format and ./scripts/test locally to ensure this change passes linter check and test
  • Test the changes on the local machine manually
  • Update the documentation for the changes

Expected behavior

no touch my ~/.gitconfig

Steps to Test This Pull Request

run tests

Additional context

image

➜  ~ cat /etc/issue
Debian GNU/Linux 11 \n \l
➜  ~ git --version
git version 2.30.2

#638

for old git like git-2.30 the tests broke my ~/.gitconfig file and created thousands of `name=GitHub` lines

Signed-off-by: apkawa <apkawa@gmail.com>
@codecov
Copy link

codecov bot commented Apr 19, 2023

Codecov Report

Patch coverage: 94.11% and project coverage change: -0.24 ⚠️

Comparison is base (e34de55) 98.11% compared to head (89978e1) 97.87%.

Additional details and impacted files
@@            Coverage Diff             @@
##               v3     #713      +/-   ##
==========================================
- Coverage   98.11%   97.87%   -0.24%     
==========================================
  Files          41       42       +1     
  Lines        1855     1928      +73     
==========================================
+ Hits         1820     1887      +67     
- Misses         35       41       +6     
Flag Coverage Δ
unittests 97.87% <94.11%> (-0.24%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
commitizen/version_types.py 90.74% <90.74%> (ø)
commitizen/bump.py 100.00% <100.00%> (ø)
commitizen/changelog.py 99.49% <100.00%> (-0.51%) ⬇️
commitizen/cli.py 94.11% <100.00%> (ø)
commitizen/commands/bump.py 98.14% <100.00%> (+0.02%) ⬆️
commitizen/commands/changelog.py 98.91% <100.00%> (+0.02%) ⬆️
commitizen/defaults.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@woile woile merged commit a829488 into commitizen-tools:v3 Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants