Arbitrarily removal of legit .gitignore files
Closed this issue · 3 comments
When fetching Revel with gb vendor fetch github.com/revel/revel
, the .gitignore
file from https://github.com/revel/revel/tree/master/skeleton is stripped out.
Without that file, revel CLI stopped to work correctly:
revel new github.com/user/example
~
~ revel! http://revel.github.io
~
Abort: Failed to open file /home/user/myproject/vendor/src/github.com/revel/revel/skeleton/.gitignore: open /home/user/myproject/vendor/src/github.com/revel/revel/skeleton/.gitignore: no such file or directory
which in turn breaks Heroku deployment with Gb.
I think that the correct behaviour should be to have Gb removing only .gitignore
files from the root directory of a repository, while ignoring all the others within the repo's sub-directories. Not all the .git*
files are related to Git's metadata.
Thank you for raising this issue. I the way that GB vendor strips non
source code is probably not documented at all, or sufficiently. I will try
to address this.
Being practical, fixes to GB vendor are not on the road map for the next
few months at least, so I recommend that you manually copy all of the files
that revel requires. You can also use git submodules if you are favourable
to that.
On Fri, 22 Jul 2016, 23:57 Mauro Toffanin notifications@github.com wrote:
When fetching Revel https://github.com/revel/revel with gb vendor fetch
github.com/revel/revel, the .gitignore file from
https://github.com/revel/revel/tree/master/skeleton is stripped out.Without that file, revel CLI stopped to work correctly:
revel new github.com/user/example
~
~ revel! http://revel.github.io
~
Abort: Failed to open file /home/user/myproject/vendor/src/
github.com/revel/revel/skeleton/.gitignore: open
/home/user/myproject/vendor/src/github.com/revel/revel/skeleton/.gitignore:
no such file or directorywhich in turn breaks Heroku deployment with Gb.
I think that the correct behaviour should be to have Gb removing
.gitignore files only from the root directory of a repository, while
ignoring all the others within the repo's sub-directories.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#638, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAcA1dpAEywV-meypTuAVc5EF7g7YT6ks5qYMxGgaJpZM4JSyFq
.
@davecheney, I appreciate you looking. BTW, you closed the issue, but I don't see a bug fix in the logs, nor a documentation update about the way GB vendor strips non source code.
I'm fine if you're not interested in fixing the bug, but the problem remains: GB vendor is stripping Go templates, breaking packages. I previously reported Revel
as an example of a package tampered by GB, but there are others too, such as Gogs
.
I think you're missing the point, so just to be clear:
$ tree -d .
.
├── .git <-- Git's metadata; it's OK to be stripped
├── .gitignores <-- Git's metadata; it's OK to be stripped
└── foo
└── bar
└── .gitignores <-- It's not Git's metadata; it's a Go template file used internally by the lib and it should not be stripped (even if the choice of the file name is questionable)
└── foo2
└── example.bar <-- it's a Go template file used internally by the lib and it should not be stripped
Nowhere in the Go documentation such usage is condemned, and manually copying files nullifies automated deployments; so I'm still perplexed by GB's choices.
gb vendor only copies .go
files.
gb vendor is just a convenience, you can use git submodules or just copy the code you need directly if you like.