tg-*.sh: make sure stripspace uses the correct comment char
commit06c63363026f189ee315968f1ea45abaf3cfd48b
authorKyle J. McKay <mackyle@gmail.com>
Wed, 1 Sep 2021 00:06:01 +0000 (31 17:06 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Wed, 1 Sep 2021 00:06:01 +0000 (31 17:06 -0700)
tree39e56c5a8a76b40cfac6cdba04906452e82af8e0
parent877b75fc339d99fcde86436211592deee71220bf
tg-*.sh: make sure stripspace uses the correct comment char

When TopGit runs the editor to request input, it often annotates
the input with "comment" lines including a comment about those
"comment" lines and that they are automatically removed.

TopGit uses the `git stripspace -s` command to remove these "comment"
lines.

However, for some time, Git has supported a `core.commentChar`
setting to change the character used to introduce comments from the
default '#' to any other single byte character.

TopGit, however, currently always uses a '#' to introduce comments.

If the `core.commentChar` setting has been changed from the default
value of `#`, then when TopGit runs `git stripspace -s` it will not
get the results it's expecting.

Remedy this by explicitly passing a `-c core.commentchar='#'` option
to every `git stripspace -s` command.

While this does not go so far as to support a custom `core.commentChar`
setting in TopGit, it does prevent the ugly mess that can result
if `core.commentChar` has been changed from the default.

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