I tried, just to see if that would work. Turns out it did. I am not sure this is a good behaviour.
I didn't tried to record the patch, but I can see how troublesome it can become if I try to record, for instance, .pijul/pristin/db.
Yes, git refuses to add paths in its .git folder. We should too. When we want to version hooks, the best practice is putting them in a hooks folder in the root of the repo, then symlink them into .pijul/hooks. We don't want to interfere with an other user's hooks.
This is a good opportunity to fix pijul add with regards to ignored files… or to deprecate it in favour of pijul record -n, which is getting it right as far as I know.
pijul record -n
Having -n to become the default behaviour would be great, especially as now we have the possibility to add the file to .ignore or .pijul/local/ignore from pijul record.
I just fixed this! Files containing a .pijul component cannot be added to the repository anymore.