tg-create.sh: only preload "[PATCH]" commit msgs
commit4497522b9b7b7b9612e28ac90f2789bb7091eff5
authorKyle J. McKay <mackyle@gmail.com>
Fri, 24 Feb 2017 03:49:20 +0000 (23 19:49 -0800)
committerKyle J. McKay <mackyle@gmail.com>
Fri, 24 Feb 2017 03:49:20 +0000 (23 19:49 -0800)
tree3d443b65991efc909e711a70d873dd84301ecede
parent8e9a6668f7633101df2682feaee3e18ce0beb002
tg-create.sh: only preload "[PATCH]" commit msgs

When creating a new topic branch (and NOT using --no-commit) the
first thing likely to be done after the branch is created is to
commit the initial patch.

Since the message for this patch will likely closely resemble the
message already stored in .topmsg, that message (with the headers
suitably stripped) is "preloaded" into the "MERGE_MSG" file so
that it will automatically show up for convenience when the first
commit is made.

Howevver, if the TopGit branch being created is a base, root,
stage or release (or actually any non-patch) branch then there
will probably NOT be a follow-up commit with the patch contents
because such a branch generally does not contain any changes of
its own.

Therefore avoid pre-loading the "MERGE_MSG" unless the .topmsg
"Subject:" contains "[PATCH]".

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
tg-create.sh