[git] hook: avoid error log when not in a DW repo