ref-filter: add test for --contains on a non-commit