Non-blob .gitmodules and .gitattributes
- From
Alexey Pelykh <alexey.pelykh@gmail.com>
- Date
- Jun 14, 2024, 12:03 UTC
- Message-ID
- <4F3AD9A8-DA3E-43E2-BF9A-9D7458EED7EA@gmail.com>
Greetings to all!
I've stumbled upon a check that ensures that .gitmodules and .gitattributes must be blobs, yet while I get why they should not be e.g. a symlink, what's the downside of permitting (and ignoring for the actual purpose) e.g. .gitattributes folder?
To better understand my use-case:
$ ls -lA dev/shared total 8 drwxr-xr-x 3 alexey-pelykh staff 96 Jun 14 11:53 .editorconfig drwxr-xr-x 3 alexey-pelykh staff 96 Jun 14 13:32 .gitattributes drwxr-xr-x 14 alexey-pelykh staff 448 Jun 14 11:53 .gitignore -rwxr-xr-x 1 alexey-pelykh staff 613 Jun 14 13:33 share
and
$ ls -lA dev/shared/.* dev/shared/.editorconfig: total 8 -rw-r--r-- 1 alexey-pelykh staff 377 Jun 14 11:53 shared.editorconfig
dev/shared/.gitattributes: total 8 -rw-r--r-- 1 alexey-pelykh staff 143 Jun 14 13:32 shared.gitattributes
dev/shared/.gitignore: total 8 -rw-r--r-- 1 alexey-pelykh staff 4450 Jun 14 11:53 shared.gitignore
Surely, the immediate workaround is use a "_gitattributes" or ".gitattributes_" name for the folder, yet if a directory with .gitignore can exist - why can't .gitmodule or .gitattributes?
Be well, Alexey