Annotating your commits
A gliss gloss is a simple tagged annotation in a commit message. The basic format of a gliss gloss is three identical characters at the beginning of a line, followed by a tag name, followed by the same three identical characters that opened the line, and then the tag text; for example:
===FOO=== This is a gloss tagged FOO
If you need to extend comment text beyond one line, simply indent the second line and ensure that every subsequent line is at least as indented as the second line. Here's what that would look like:
===FOO=== Here's a slightly longer-winded gloss tagged FOO.
Such a gloss will end before the beginning of the first line that is not at least as indented as the second line.
Note that it is best to place glosses after the main content of your commit message, since git treats the first line of a commit message as a summary. A clear single sentence of prose almost always provides a better summary of a commit than a single gloss!
Here are some useful tags for your gliss glosses:
GT, followed by a ticket number (starting with a pound so gittrac will recognize it), which indicates that this commit is related to a particular ticket.
GT:Fixed, followed by a ticket number (again, starting with a pound); this implies
GTand indicates that this commit resolves a particular ticket.
UpgradeNoteincludes a description of a backwards-compatibility issue introduced by this commit (e.g. "This commit changes the wire protocol for the pony server.")
VersionHistory, a summary of the state of the version history for this item. Used to communicate with the wrangler
VersionHistory glosses, AKA helping the wrangler.
Glosses with the tag ===VersionHistory=== are intended make the wrangler's job easier. Please make sure to include the ticket number somewhere in the commit message for commits that have VersionHistory glosses. The text following the VersionHistory tag is intended to help the wrangler verify the completeness of the version history. It is not a substitute for actually editing the version history tex file.
It would be helpful to the wrangler to indicate when a commit does not require any version history, or when the version history has already been completed.
Installing a commit message template
You may find it helpful to install a git commit message template, so that some basic gliss glosses are right in front of you as you're editing the commit message. You can do this with git options. First, copy the following text to a file in your home directory (call it something like
# To use any of these glosses in your commit message, uncomment # the initial # and edit the gloss text as appropriate. # See https://condor-wiki.cs.wisc.edu/index.cgi/wiki?p=GlissTool # #===GT=== #1234 #===GT:Fixed=== #1234 #===VersionHistory=== #===VersionHistory:None=== #===VersionHistory:Complete=== #===UpgradeNote===
where to find this template:
git config --global commit.template ~/.glisscommittemplate
or not depending on whether you'd rather opt-out of this template for individual repositories or opt-in per repository.)
The easiest way to install gliss is to use the
package. You may need to use the
or run as root. In order to install the gem package, though, you'll need some prerequisites installed first:
package manager itself. Some distribution-specific hints follow.
If you're on a fairly recent Fedora release (or RHEL 6/CentOS 6), you should be able to simply
yum install ruby rubygems
and get all of the necessary packages. If you're on an older RHEL or RHEL-derived distribution (like RHEL 5), then
, will be in EPEL.
is a set of extra packages for Red Hat Enterprise Linux and derived distributions; you can get access to the EPEL repositories by installing the right
package. For RHEL 5, for example, you'd do this:
rpm -ihv http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
If you're on a Mac,
probably shipped with your operating system.
The basic way to use
is to give it two branch names, like
gliss V7_5_4 V7_5_5
. It will find all of the glosses in commit messages associated with commits that are reachable from
. There are other options, too; run
for more information.