gowork-snapshot: Fix it for submodules
In the presence of Git submodules, the .git of a submodule is not a directory but a regular file with content like
gitdir: ../../.git/modules/vendor/libgit2
As -C path
instructs git to cd into path this fails for submodule case
with error like:
github.com/libgit2/git2go/vendor/libgit2 fatal: cannot change to './github.com/libgit2/git2go/vendor/libgit2/.git': Это не каталог
Fix it by changing -C to --git-dir which instructs Git to consider provided path as only location for git database, not to cd into it.
/cc @alain.takoudjou, @jerome