This is one feature of ext3/4 that I miss a little bit with XFS. The ext based filesystems always reserved a percentage of space that could only be accessed by the root user, and that allocation could be set during format or after (usually just 1% was enough for large filesystems), while XFS only has reserved blocks, which provides enough space to recover without corruption, but not much space to help you move anything and can sometimes take the filesystem offline and require manual steps as above.
However, Linux and XFS do provide powerful methods to help prevent total space exhaustion via quota management. You can set disk quota by user/group, but my favorite feature of XFS is the ability to set quota for directory hierarchies via projects. Using this you can easily define a quota for your repository directory that is less than the total available free space, and you can change it at runtime if, for example, you need to temporarily allow more space, etc. It's more flexible, IMO, than dropping a large empty file which wouldn't keep from completely exhausting space on the volume and makes granular pressure release a little more difficult, although you could create mulitple large files to acheive this.
For example, you could set a quota at 85% of total disk space and then monitor against that, but, if you get near the limit and need a little more space to give time to move things around, temporarily increase to 90 or 95%, on the fly, then back to 85% once things are moved, all while protecting from total space exhaustion.
Here's a link to one resource on XFS quotas, but there are plenty others out there.
https://www.thegeekdiary.com/how-to-ena ... le-system/