Closed pedro-psb closed 11 months ago
Sure, this is something I wanted since the beginning but never got to implement :slightly_smiling_face: See #16.
What do you think of --initial-ref
or --start-ref
(because it can be any Git ref, not just a commit hash)? Most letters are already taken for short options, so maybe -f
, --first-ref
instead (which leaves room for an eventual -l
, --last-ref
)?
I've missed that issue. I believe modifying get_log
covers "we should also be able to limit the commits being parsed"? In the sense that it filters before parsing.
-f, --first-ref
+ -l, --last-ref
sounds good.
Or maybe --range
and clarify it'll be passed directly to git log
? This may provide more flexibility for users.
Yes using a range is a good idea too, I like it. Not sure about the option name: --filter
, --filter-commits
, --range-filter
:thinking: Ideally the short option is the first letter of the long option, but if that makes an ugly long option we can definitely use whatever short letter is available, like -F
, --range
. For what it's worth, it's called "revision range" in git-log
's manual page.
Is your feature request related to a problem? Please describe.
In a project I work on, we have changed to semver recently and decided to update the CI release scripts. I want to keep my old changelog untouched and make git-changelog use only commits after we've introduced semver.
Describe the solution you'd like
Add a
--initial-commit
or option to define a hash or tagname to be used as the initial commit used bygit-changelog
. If this is approved, I'd like some suggestions for short/long names.Describe alternatives you've considered
Change history, but no.
Additional context
I've done a quick experiment locally and got it working. I believe I could do a PR next week. Basically: