chdir into docdir before running git