Skip to content

feat: determine newline to write with Git - #493

Merged
Lee-W merged 1 commit into
commitizen-tools:masterfrom
pan93412:fix/492
Aug 14, 2022
Merged

Lee-W merged 1 commit into
commitizen-tools:masterfrom
pan93412:fix/492

Conversation

@pan93412

Copy link
Copy Markdown
Contributor

Description

Determine the newline character to write with git config core.eof.

Checklist

  • Add test cases to all the changes you introduce
  • Run ./script/format and ./script/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

It will adopt the newline character from the configuration key core.elf of Git while writing to any file.

Steps to Test This Pull Request

See tests.

Additional context

Help me cc CanisHelix check this commit. Thanks!

@codecov

codecov Bot commented Mar 13, 2022 •

Copy link
Copy Markdown

Codecov Report

Merging #493 (b135f76) into master (ed636ba) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #493      +/-   ##
==========================================
+ Coverage   98.26%   98.28%   +0.02%     
==========================================
  Files          39       39              
  Lines        1556     1575      +19     
==========================================
+ Hits         1529     1548      +19     
  Misses         27       27              
Flag Coverage Δ
unittests 98.28% <100.00%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
commitizen/__version__.py 100.00% <100.00%> (ø)
commitizen/bump.py 100.00% <100.00%> (ø)
commitizen/cmd.py 100.00% <100.00%> (ø)
commitizen/commands/changelog.py 96.62% <100.00%> (+0.03%) ⬆️
commitizen/commands/commit.py 98.43% <100.00%> (+0.02%) ⬆️
commitizen/commands/init.py 91.66% <100.00%> (ø)
commitizen/config/json_config.py 100.00% <100.00%> (ø)
commitizen/config/yaml_config.py 100.00% <100.00%> (ø)
commitizen/git.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.

@woile

woile commented Jul 15, 2022

Copy link
Copy Markdown
Member

LGTM.Is there an issue associated? What's the problem that it's trying to solve?

@pan93412

pan93412 commented Jul 15, 2022 •

Copy link
Copy Markdown
Contributor Author

LGTM.Is there an issue associated? What's the problem that it's trying to solve?

I think it is #492. I'll look into the conflict later.

@woile woile left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Could you rebase it? And if possible just one commit containing the feature added instead of multiple independent "feats". Something like:
feat: detect OS specific EOF

Thanks!

Comment thread commitizen/git.py Resolved
@Lee-W

Lee-W commented Aug 7, 2022

Copy link
Copy Markdown
Member

I notice there's a conflict. Could you please rebase and resolve it? If you don't have the time to do so. I'm happy to work on it next week :)

@pan93412
pan93412 force-pushed the fix/492 branch 3 times, most recently from 6c298d2 to 4e5750c Compare August 10, 2022 04:21
Determine the newline character to write with `git config core.eof`.

Close commitizen-tools#492
@pan93412

Copy link
Copy Markdown
Contributor Author

@Lee-W resolved ;) thanks!

@Lee-W

Lee-W commented Aug 14, 2022

Copy link
Copy Markdown
Member

@pan93412 Sorry for taking so long. Thanks for your contribution! Let's merge it 🎉

@Lee-W
Lee-W merged commit 644675b into commitizen-tools:master Aug 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants