On 27/02/2026 05:21, Collin Funk wrote:
When 'stat' is given a format string using the --printf option, it checks the QUOTING_STYLE environment variable if there is a %N substring in the format string. This leads to the following behavior:$ QUOTING_STYLE='invalid' ./src/stat-prev --printf='%N\n' HACKING stat-prev: ignoring invalid value of environment variable QUOTING_STYLE: ‘invalid’ 'HACKING' $ QUOTING_STYLE='invalid' ./src/stat-prev --printf='%%N\n' HACKING stat-prev: ignoring invalid value of environment variable QUOTING_STYLE: ‘invalid’ %N I don't think we should warn in the second case, because QUOTING_STYLE has no effect on the output. Here is the behavior after this patch: $ QUOTING_STYLE='invalid' ./src/stat --printf='%N\n' HACKING stat: ignoring invalid value of environment variable QUOTING_STYLE: ‘invalid’ 'HACKING' $ QUOTING_STYLE='invalid' ./src/stat --printf='%%N\n' HACKING %N
Very comprehensive. thanks! Padraig
