Grit's clone method is undefined?

不打扰是莪最后的温柔 提交于 2019-12-30 06:53:25

问题


I've recently started working on a project that uses git for storage and ruby as a front-end. The first version of my script used ruby-git, which was ok though pretty simple. When I needed to do more specific work with my commits and logs it was recommended that I move to grit. However, I've a road block early on- grit seems incapable of cloning remote repositories. All examples I've found using the Repository class create a local repository and searching through the source I've found Grit's clone method is undefined. What gives?

This is my first StackOverflow question, so thanks in advance for any help.


回答1:


Since Git is well structured, Grit uses a method missing (Grit::Git#method_missing) to 'systematically' execute Git commands.

See link below for an example that should help you.

https://gist.github.com/731502



来源:https://stackoverflow.com/questions/4370628/grits-clone-method-is-undefined

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!