Closed Freed-Wu closed 1 year ago
that file should not be executable by convention
But, even if this file is not +x
, the PR from pre-commit.ci still should respect the file mode, for example, if .pre-commit-config.yaml
is rw-rw-rw-
, the PR shouldn't change it to rw-r--r--
, I think.
yes I understand, but you're doing something pretty weird and I don't want to write special code to support such a weird case when it's a common mistake to make the file executable
you're doing something pretty weird
I know. (A weird hack :smile:)
if .pre-commit-config.yaml is rw-rw-rw-, the PR shouldn't change it to rw-r--r--.
How about this? I think it is reasonable. Because in some situation, umask is not 022. We should not break it.
git doesn't store the rest of the umask -- git only has modes 0644 and 0755 -- it already isn't going to change 0666 to 0644 because that doesn't mean anything to git
I add a shebang to
.pre-commit-config.yaml
to allow me to replacepre-commit run -a
with./.pre-commit-config.yaml
which is more easy to input (just press./.p<TAB>
).However, pre-commit-ci changes the file mode
x
.Can it respect the file mode? TIA!