tg-export: add subject [...] handling modes
The --collapse and --linearize modes of tg export remove the
leading [PATCH] (as they should) when creating the pristine
collapsed commits.
This was being done as a side-effect of using git mailinfo.
Unfortunately (or fortunately depending on your perspective)
much more was being stripped than just the initial [PATCH] tag.
TopGit is aware of four different initial tags, [PATCH], [BASE],
[ROOT] and (even though this one must be created manually) [STAGE].
Introduce a new `-s <mode>` option to control handling of the
subject during commit collapsing. The default (quelle surprise)
is the "topgit" mode which will only strip the first tag and then
only if it's one of the four it knows about. It does recognize
PATCH tags with extra stuff after them but only for PATCH. It
will recognize those four tags with the `topgit.subjectPrefix` too.
Additional modes are provided (see the help) to get full mailinfo
stripping, no stripping, whitespace trimming only or just the
first [PATCH]. Additionally the default can be changed by setting
the `topgit.subjectMode` config item.
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>