tg-update.sh: improve --base message handling
commitb21ea99ef79a3f78b244a71a461533bba1887bb3
authorKyle J. McKay <mackyle@gmail.com>
Thu, 15 Jun 2017 17:27:58 +0000 (15 10:27 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Thu, 15 Jun 2017 17:27:58 +0000 (15 10:27 -0700)
tree76a12709d28dc6d0f228d5825daba3c7226fe3e0
parentd1fe6413bf4feb218a9674259581b997aa1bcc29
tg-update.sh: improve --base message handling

The git merge command does not accept a "-F <file>" option for
some reason.  Fake it by reading the contents and passing them as
a string literal with "-m" instead.

Allow "--message 'without ='" and "--file 'without ='" to work.

With "--no-edit" and no explicit message (i.e. no -m or -F type
option), make sure the default message used for the base update
is TopGit's and not the underlying git merge's because the default
provided by "git merge" is completely unhelpful in recording the
fact that the merge is the result of updating a "[BASE]" branch
which is rather quite helpful to see in the log and what using
"--no-edit" should have been doing all along.

Since the default remains to always "--edit" when doing a base
update, use of "--no-edit" may be quite common and it needs to do
the right thing (which now it does) without requiring the user to
resort to an "EDITOR=:" hack instead.

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