change update-gitdir function to support finding repository feature