ioanrogers/Dist-Zilla-Plugin-ChangelogFromGit-CPAN-Changes — pull request #1 by jddurand (2013-06-04 22:44:44+00:00)
Title: version in the case of HEAD

Hello,

When the plugin reaches the HEAD, it outputs zilla->version, and $release->version in all other cases. But $release->version are in reality tags, and /if/ the dzil release is going to do a Git::Tag, it will then obey to the config:

[Git::Tag] ; tag repo with custom tag
tag_format = v%v

Let's go to the problem. For example, suppose we go from version 0.13 to 0.14, tagged v0.13 and v0.14:

Your plugin will generate this Changes file:

0.13
- something
v0.12
- before

which is commited under tag v0.13. The next iteration will produce:

0.14
- something else
v0.13
- something
v0.12
- before

so the diff on the commit will be:

1,3c1
< 0.14
< - something else
< v0.13
---
> 0.13

You see the problem.

IMHO the best solution would be to inherit from Git::Tag and recuperate its tag_format. In case you want a standalone solution, this could to be coded in your module. I did that in a lazy way, because it fits MY setup: coding inside the module, with /only/ the %v format string modifier. While Git::Tag allows more.

So please do not consider pulling this request as is, but, instead, please consider this pull request as a former proof of concept of the problem.
What is the best solution, /if/ you dare to tackle this problem, I do not know....

Thanks,

Regards, Jean-Damien.