Extracting fixed issues
A common use case when creating a release is to create a release note, containing among other things, the bugs fixed in the release. A good practice is to write in the commit message if a bug is fixed by the commit. A better practice is to have a standard way of doing it, for example, a line with the string "Fixes-bug: "
followed by the bug identifier in the last part of the commit message. This makes it easy to compile a list of bugs fixed for a release note. The JGit project is a good example of this; their bug identifier in the commit messages is a simple "Bug: "
string followed by the bug ID.
This recipe will show you how to limit the output of git log
to list just the commits since the last release (tag), which contains a bug fix.
Getting ready
Clone the JGit repository using the following command lines:
$ git clone https://git.eclipse.org/r/jgit/jgit $ cd jgit
If you want the exact same output as in this example, reset your master
branch to the following commit...