Fwd: [PATCH] This simple patch allows comments in the middle of a line.

Fabiano Furtado fabianofurtado at gmail.com
Mon Jul 25 16:14:18 UTC 2022


Hi, Chris!

I didn't know about this commit 8a19c4a78251. Sorry for that.

Indeed, there is no compelling reason to rollback this code. I just
thought this '#' symbol isn't a valid value in some fields.

Thanks!

On Mon, Jul 25, 2022 at 9:54 AM Chris Down wrote:
>
> Hi Fabiano,
>
> Fabiano Furtado writes:
> >From 4a87185f577d61f51c94e9b158d602460c795330 Mon Sep 17 00:00:00 2001
> >From: Fabiano Furtado <fabianofurtado <at> gmail <dot> com>
> >Date: Sun, 24 Jul 2022 16:44:31 -0300
> >Subject: [PATCH] As described in
> > https://archlinux.org/pacman/pacman.conf.5.html#_description, "Comments are
>
> Fittingly, this URL shows why...
>
> > only supported by beginning a line with the hash (#) symbol. Comments cannot
> > begin in the middle of a line.". This patch allows comments in the middle of
> > a line. Example: LogFile = /tmp/pacman.log#/var/log/pacman.log
>
> ...this should not be allowed, because octothorpes may be valid values in some
> fields.
>
> In fact that's exactly why it was disallowed in commit 8a19c4a78251 ("ini: only
> recognize comments at beginning of line").
>
> It might be ok to allow it only after whitespace, but since it's already caused
> problems I'd be inclined not to poke the bear again unless there's some
> compelling reason.
>
> Thanks,
>
> Chris


More information about the pacman-dev mailing list