Previously, running "git changelog -x --start-tag 4.5.0 -p -l" will see
* Bump version to 4.6.0-dev. * Version 4.5.0
Because there is no newline in the end of each plain output.
using `-m` or `--merges-only` will only show the merge
commit messages. It will also use the body of the merge
commit message in addition to the subject, as github merges
usually have a useless subject line for commit messages.
If used with `-n/--no-merges`, the last one specified will win.
When the last tag is also the last commit, then we need to account
for a much longer tag output:
HEAD, tag: v1.0.1, origin/master, origin/HEAD,...
This fix strips out 'HEAD', the rest is handled by existing code.
When gitflow is used, commits on merged feature branches were
appearing in the generated output with tags labeled as:
origin/feature/BRANCH_NAME
This fix filters out any 'tags' that include forward slashes,
which eliminates this behavior. The commits then appear as part
of the tag they were merged in with.
(1) make format configurable
you can change the default changelog format by configuring
changelog.format git variable
for example:
git config changelog.format '- %s (%ae)'
gives you something like that:
- Merge pull request #298 from timfeirg/master (hemanth.hm@gmail.com)
- remove stuff from readme & form a list (kkcocogogo@gmail.com)
see git-log man for more examples
(2) make log options configurable
set `changelog.opts` to influence the way changelogs are generated
git config changelog.opts --no-merges
or:
git config changelog.opts --first-parent
fixes#285
also:
- delay calculating HEAD until needed
- remove extra line before header
The editor used will be chosen from the GIT_EDITOR environment variable,
the core.editor configuration variable, the VISUAL environment variable,
or the EDITOR environment variable (in that order).
That ensures that `git-changelog` and `git-authors` will use the same editor
as `git-commit`, `git-merge` etc.
- Revert "FIX: check if un-pushed commits". This reverts commit bd80a4e512.
- Revert "Add check for no changes in the tree (no sub-modules)". This reverts commit f2a41c54b1.
Resolves#234
- switch the check for un-pushed commits from `diff-index` to more simple check
- still ignores sub-modules
Closes#234
Clarification:
As pointed by @cristiandouce in #234 - my flow was different (and pretty stupid to be honest on some particular project of mine) so some other work flow scenarios was failing to pass.
I still feel such check is needed, because it is still populates Changelog|History files with empty lines if no un-pushed commits exist, so @hemanth merge this one or revert the [619232e](619232ef86)