Closed metakeule closed 7 years ago
If you want to vendor the code, isn't godep the tool for that?
If glock deletes the VCS directories, then it would have to refetch them every time you sync, because there's no way to know if it's up to date. That would be incredibly slow.
I could be an option, not the default. Maybe pre and post sync hooks could allow the user to config such an behavior.
As far as I know godep does not change / use the src tree but makes copies inside a subdir of a package.
Fetching a package via
go get
creates a repository clone or working directory (svn). It would be nice to have an option for removing the.git
,.svn
and the like directories below$GOPATH/src
to get something like thiscd $GOPATH/src && find . -name .git -print0 | xargs -0 rm -rf
If the
$GOPATH
is the project repository (see #13), this would allow the dependencies inside$GOPATH/src
to be checked in just like vendoring.If
glock sync
could then rerungo get
, then doing the sync and then remove the.git
etc folders again a very nice workflow would be possible where not just the GLOCKFILE diffs are tracked inside the repo, but also the changes inside the 3rd party packages.Also the main repo would be self contained.