Skip to content

test: fix git_sandbox for git<2.33 - #713

Merged
woile merged 1 commit into
commitizen-tools:v3from
Apkawa:fix_git_sandbox
Apr 19, 2023
Merged

test: fix git_sandbox for git<2.33#713
woile merged 1 commit into
commitizen-tools:v3from
Apkawa:fix_git_sandbox

Conversation

@Apkawa

@ApkawaApkawa commented Apr 19, 2023

Copy link
Copy Markdown
Contributor

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

codecovBot commented Apr 19, 2023

Copy link
Copy Markdown

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 
FlagCoverage Δ
unittests97.87% <94.11%> (-0.24%)⬇️

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

Impacted FilesCoverage Δ
commitizen/version_types.py90.74% <90.74%> (ø)
commitizen/bump.py100.00% <100.00%> (ø)
commitizen/changelog.py99.49% <100.00%> (-0.51%)⬇️
commitizen/cli.py94.11% <100.00%> (ø)
commitizen/commands/bump.py98.14% <100.00%> (+0.02%)⬆️
commitizen/commands/changelog.py98.91% <100.00%> (+0.02%)⬆️
commitizen/defaults.py100.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:v3Apr 19, 2023
Sign up for freeto 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

@Apkawa@woile