Skip to content
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

new: added 'path' config option to limit commit messages #112

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dfugate
Copy link

@dfugate dfugate commented Mar 6, 2019

This introduces a new optional 'path' config file parameter which allows end-users to run 'git log ... [path]' instead of 'git log ...'. The net effect here is this makes it easy to limit commits to those that affected a certain set directory and its contents only. Hopefully this capability didn't already exist in some other capacity:)

@codecov
Copy link

codecov bot commented Mar 6, 2019

Codecov Report

Merging #112 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #112   +/-   ##
=======================================
  Coverage   88.45%   88.45%           
=======================================
  Files           2        2           
  Lines         840      840           
  Branches      168      168           
=======================================
  Hits          743      743           
  Misses         58       58           
  Partials       39       39
Impacted Files Coverage Δ
src/gitchangelog/gitchangelog.py 88.34% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 95fe8d5...7da12ad. Read the comment docs.

Copy link
Owner

@vaab vaab left a comment

Choose a reason for hiding this comment

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

Thanks for the tests... while reading your code, I was wondering if we should support a list of paths instead of only one.
Your code doesn't seem to support path containing white-spaces. A test for that would be welcome anyway.

Fixing this should not be trivial and is probably different between linux and windows.

I like the idea, and will be happy to accept the PR if the white-spaces issue is fixed (with a test).

% (GIT_FULL_FORMAT_STRING,
'--no-merges' if not include_merge else ''),
'--no-merges' if not include_merge else '',
'--' if not path else '-- ' + path),
Copy link
Owner

Choose a reason for hiding this comment

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

Why not keep "-- %s" in the main string ? And something like path or "" ?

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.

None yet

2 participants