wyag init should use gitdir instead of worktree
celloward opened this issue · comments
Jeremy Ward commented
Right now as the tutorial is written, repo_create
creates a new worktree if one doesn't already exist and will throw an exception if the worktree has any files in it. Whereas git init
will simply add a .git
directory to .
if one doesn't already exist and fill it out if it is empty.
In order for wyag init
to work like git init
it should be checking the existence of the GitRepository.gitdir
instead of the GitRepository.worktree
.
Thibault Polge commented
Indeed, thanks for pointing that out, I'll try and fix this soon. Don't hesitate to send a PR if you can !