get_maintainer: fix detection of git repository