Re: [PATCH v4 14/23] Makefile: re-add and use the "shellquote" macros
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 14, 2021, 00:31 UTC
- Message-ID
- <xmqqr1ag81tm.fsf@gitster.g>
- In-Reply-To
- <xmqq4k7c9k68.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 15 quoted lines
> All of the above may very well explain why we decided not to use > $(call shellquote) in the past, and it may also explain why it is > safe to start using it again today, but it does not explain why we > want to do so in the first place. > > Having to write > > $(call shellquote,$(VAR)) > > in longhand is much more cumbersome to read, write and merge than > defining a prepackaged VAR_SQ just once and refer it as > > '$(VAR_SQ)' > > everywhere.
Having said all that, I would not have minded if this change were more isolated and turned things like
CHAINLINTTMP_SQ = $(subst ','\'',$(CHAINLINTTMP))
to use the $(call shellquote) mechanism, if all of us found it easier to read than repeating the same line-noise substitutions for many variables.
What was irritating was primarily that the patch went one step further to eliminate the _SQ variant variables, making the resulting sites that use them harder to read and understand.