Re: git: 566cc005812b - main - safe_set treat ':' and '#' differently

From: Simon J. Gerraty <sjg_at_juniper.net>
Date: Mon, 27 Apr 2026 18:24:23 UTC
Dag-Erling Smørgrav <des@freebsd.org> wrote:
> >     Treat '#' as a comment anywhere,
> >     but ':' only at start of line.
> 
> I can't quite figure out what your goal is with this, but it doesn't
> seem right: `:` is not at all a comment, it is just a built-in alias for
> the `true` command.  Among other things, this means that (assuming a
> clean environment) these lines do absolutely nothing:

Not quite.
I use lines like:

	: tag=$tag

to aid debugging.  Eg:

	for tag in `IFS=,; echo $DEBUG_SH`
        do
                : tag=$tag
                case "$tag" in

without the : tag=$tag one cannot tell what the value of tag is
in the set -x output.

The goal here is to ensure a line like that will be ignored.