Subject: Re: [PATCH v3 8/8] ci/style-check: add `RemoveBracesLLVM` to '.clang-format'

From: Junio C Hamano <[email-masked]>
Date: Mon, 15 Jul 2024 12:45:00 -0700

Karthik Nayak <[email-masked]> writes:

>> If we know we can write into /tmp/clang-format-rules file, then the
>> CI script can do something like
>>
>> 	{
>> 		cat .clang-format
>> 		echo echo "RemoveBracesLLVM: true"
>> 	} >/tmp/clang-format-rules
>> 	git clang-format --style=file:/tmp/clang-format-rules \
>> 		 --diff --extensions c,h "$baseCommit"
>>
>> right?  Then "git status" would even say "there is no untracked
>> cruft" (although I do not know we *need* to keep the working tree
>> that clean, without untracked cruft).
>
> Yes this is the best solution.

FWIW, I think an in-tree throw-away file is a better option, simply
because we _know_ that the working tree can be written (by the fact
that we can do "make" and have compilers write *.o and other cruft),
but we do not know if the CI environment allows us to write to /tmp
or /var/tmp or /usr/local/tmp and you do not want to run around and
see if there is a suitable temporary directory you can use.