gitweb: Make git_get_hash_by_path check type if provided