Im struggling for a couple of hours to make git store metadata (permissions/flags/etc) of the files using metastore and I use hooks/pre-commit for this.
The script is invoked correctly, and the file "metadata" is modified but not added into commit.
I tried calling:
git add ./metadata
and
git add -u ./metadata
from the pre-commit script, but there is no effect. The file ends up uncommited and marked as modified or staged BUT not commited, ever.
Is there any way to make this work? Basically, I want it to update and commit the file "metadata" on each commit (preferably, as the same commit, so I can restore all permissions after checkout)
Thanks!
P.S. If you are wondering why I need this, the answer is I store OS files for an embedded device which needs permisions/suid flags etc.