repository::clone()
giterr_last should always called atomically