I'd like to use git-log to generate a Debian changelog file (with one
entry per commit), which has entries like this:

package-name (version-number) unstable; urgency=low

 * ...

 -- Example Person <per...@example.org>  RFC822-date

Since I'm intentionally generating one entry per commit, I can generate
*almost* all of this with git log:

git log --pretty='format:packagename (FIXME) unstable; urgency=low%n%n  * 
%s%n%w(0,4,4)%+b%w(0,0,0)%n -- %an <%ae>  %aD%n'

This produces entries like this:

packagename (FIXME) unstable; urgency=low

  * Example change

    Long description of example change.

 -- Josh Triplett <j...@joshtriplett.org>  Thu, 8 Jan 2015 16:36:52 -0800

packagename (FIXME) unstable; urgency=low

  * Initial version

 -- Josh Triplett <j...@joshtriplett.org>  Thu, 8 Jan 2015 16:36:51 -0800

Would it be possible to add a format specifier producing a commit count,
similar to that provided by git-describe?  Such a specifier would allow
filling in the version number in the format above (replacing the FIXME).
(Note that the version numbers need to monotonically increase; otherwise
I would just use the commit hash as the version numer.)

- Josh Triplett
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to