Skip to content

fix(args): split env path lists for clap parsing - #1450

Merged
ognis1205 merged 3 commits into
orhun:mainfrom
saudademjj:saudademjj/fix-1447-env-multi-value-paths
Mar 22, 2026
Merged

ognis1205 merged 3 commits into
orhun:mainfrom
saudademjj:saudademjj/fix-1447-env-multi-value-paths

Conversation

@saudademjj

Copy link
Copy Markdown
Contributor

Description

Split GIT_CLIFF_INCLUDE_PATH and GIT_CLIFF_EXCLUDE_PATH environment variable values on spaces so clap parses them as multiple path patterns instead of a single string.

Motivation and Context

This fixes environment-variable parsing for the multi-value path arguments described in issue #1447.

Closes #1447

How Has This Been Tested?

  • cargo test
  • cargo clippy --tests --verbose -- -D warnings
  • cargo +nightly fmt --all -- --check --verbose

Screenshots / Logs (if applicable)

N/A

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (no code change)
  • Refactor (refactoring production code)
  • Other

Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly (if applicable).
  • I have formatted the code with rustfmt.
    • cargo +nightly fmt --all
  • I checked the lints with clippy.
    • cargo clippy --tests --verbose -- -D warnings
  • I have added tests to cover my changes.
  • All new and existing tests passed.
    • cargo test

@saudademjj
saudademjj requested a review from orhun as a code owner March 19, 2026 11:16
@codecov-commenter

codecov-commenter commented Mar 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 47.53%. Comparing base (775beb0) to head (7040577).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1450      +/-   ##
==========================================
- Coverage   47.57%   47.53%   -0.04%     
==========================================
  Files          24       24              
  Lines        2119     2119              
==========================================
- Hits         1008     1007       -1     
- Misses       1111     1112       +1     
Flag Coverage Δ
unit-tests 47.53% <ø> (-0.04%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@saudademjj

Copy link
Copy Markdown
Contributor Author

All checks have passed except Docker Build and Push, which is still running.

@saudademjj saudademjj mentioned this pull request Mar 19, 2026
9 of 15 tasks

@ognis1205 ognis1205 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Using a single space as the value_delimiter looks reasonable to me, but I'd be interested in hearing @orhun 's thoughts on this as well.

Comment thread git-cliff/src/args.rs Resolved
Comment thread git-cliff/src/args.rs Resolved

@ognis1205 ognis1205 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Following up on my previous review, these are just suggestions and not blocking from my side.

@orhun
orhun requested a review from ognis1205 March 20, 2026 15:37
Comment thread git-cliff/src/args.rs Resolved
Comment thread git-cliff/src/args.rs Resolved
Comment thread git-cliff/src/args.rs Resolved
@saudademjj

Copy link
Copy Markdown
Contributor Author

Added a comment above #[serial] explaining why it's needed. Thanks for the feedback!

Comment thread git-cliff/src/args.rs Resolved
Comment thread git-cliff/src/args.rs Resolved
@saudademjj
saudademjj force-pushed the saudademjj/fix-1447-env-multi-value-paths branch from e20074d to 3c76ef4 Compare March 21, 2026 16:34
@orhun
orhun requested a review from ognis1205 March 21, 2026 16:37
@saudademjj

Copy link
Copy Markdown
Contributor Author

Thanks for the suggestion!

Reverted to the EnvVarGuard approach as suggested — the branch now sits at 3c76ef4, which already had scoped guards with Drop-based cleanup and a Mutex for exclusive access.

The two later commits (serial_test swap + comment) have been dropped, so the dependency footprint is unchanged from main.

Ready for another look when you get a chance.

@ognis1205 ognis1205 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry for the ambiguity in my previous review comments and for asking you to make multiple revisions.

I've added suggestions to clarify how I was hoping it would be updated. Please let me know if anything is still unclear.

Comment thread git-cliff/src/args.rs Resolved
Comment thread git-cliff/src/args.rs Resolved

@ognis1205 ognis1205 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. Thanks!

@orhun orhun left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

neat!

@ognis1205
ognis1205 merged commit f1874b8 into orhun:main Mar 22, 2026
98 checks passed
@welcome

welcome Bot commented Mar 22, 2026

Copy link
Copy Markdown

Congrats on merging your first pull request! ⛰️

ognis1205 pushed a commit that referenced this pull request Mar 23, 2026
…ths (#1450)

* fix(args): split env path lists for clap parsing

* test(args): isolate env var test with serial_test

* style: format env var test comment
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.

GIT_CLIFF_INCLUDE_PATH does not correctly parse multiple values due to missing value_delimiter configuration

4 participants