[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi] Minor problem with checking executable files under .git
From: |
Vadim Zeitlin |
Subject: |
[lmi] Minor problem with checking executable files under .git |
Date: |
Sun, 21 Mar 2021 21:10:51 +0100 |
Hello,
I have a minor problem with the CI builds, which was probably there since
the beginning but which I hadn't noticed before: running "make
check_concinnity" there results in a couple of warnings:
file .../lmi/.git/info/exclude is executable, but should it be?
file .../lmi/.git/description is executable, but should it be?
see
https://github.com/let-me-illustrate/lmi/runs/2160993006?check_suite_focus=true#step:20:39
It is indeed surprising that these files are executable, but they indeed
are, as could be confirmed by just running "ls -l .git", as shown a bit
higher in the output of the same job.
I have a few solutions here, but neither seems ideal:
0. Don't do anything, just ignore these warnings.
I am not sure if it's actually normal that check_script.sh warns without
giving an error or if it's just an oversight -- I'd prefer if the script
was more certain about its conclusions and exited with an error, rather
than complaining not too intrusively. It's also annoying to see these
warnings in the logs, so I'd rather get rid of them.
1. Ignore these files in check_script.sh, just as it's already done for
.git/hooks-orig*.
This seems a bit too ad hoc, I have no idea why are these particular
files executable in GitHub Actions environment, and so am not sure at
all that other files under .git might not become executable too one
day.
2. Ignore all files under .git in GNUmakefile, i.e. replace the existing
"-path .git/modules -prune" with "-path .git" prune.
I think the reason it hadn't been done like this originally was to check
the files in .git/hooks, but they're supposed to be just symlinks to the
files present in the repository, so I don't think we'd lose anything if
we just didn't look under .git at all. I also think this is the most
robust approach as future versions of Git (and, I'm willing to bet,
will) add more executable files under .git and we really don't need to
care about them.
So this is the solution I prefer, but I also suspect that it might be
the one you like the least. Could I be wrong about it?
3. Just run "chmod -x" on the relevant files in the CI script itself.
This is what I did for now (in a not yet merged PR), because it solves
the immediate problem and doesn't touch lmi code, but I don't like it
all because it combines the drawbacks of (2) and (3).
So ideally, I think, we should:
(a) Make check_script.sh return an error, not just log a warning, if
something is wrong, so that problems have no chance of going unnoticed.
(b) Fix makefile or script to skip the files under .git.
What do you think?
VZ
pgpOtsnGGqYuY.pgp
Description: PGP signature
- [lmi] Minor problem with checking executable files under .git,
Vadim Zeitlin <=