Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs inconsistent and contradictory #38

Open
jmct opened this issue Oct 7, 2014 · 13 comments
Open

Docs inconsistent and contradictory #38

jmct opened this issue Oct 7, 2014 · 13 comments
Labels

Comments

@jmct
Copy link

jmct commented Oct 7, 2014

Hello,

The docs (README and the Git.Tutorial) for the gitlib package, are inconsistent with each other and with the library itself. I'll gladly write some more up-to-date ones, but I'm so confused on even the most basic of things (how to open a repo) that I need some pointers in the right direction.

Any help is appreciated.

Thanks!

@jwiegley
Copy link
Owner

jwiegley commented Oct 8, 2014

Sure thing, @jmct. How can I help? We could talk on IRC, by Google Hangout, e-mail, or here, whichever would give you the best resource.

@jmct
Copy link
Author

jmct commented Oct 8, 2014

Hey @jwiegley! Thanks for your fast response.

I think I'm already starting to grasp it a bit more. Maybe what we can do is have me post things here when I'm stuck with some part of the library and we can work out the confusion. When I've got the hang of it I'll write up some new docs/examples and submit a pull-request.

Yesterday I was trying to use gitlib without a backend, which (of course) resulted in nothing working.

So just to start things off, this is where I'm at right now:

  • gitlib itself is agnostic to any backend
  • backends include gitlib-cmdline, gitlib-hit, gitlib-libgit2 (and probably more)
  • each backend must provide a RepositoryFactory, so that gitlib knows how to use that backend (this is what threw me off yesterday)

I'll try writing some small programs this weekend and see how it goes.

Thanks again!

@jwiegley
Copy link
Owner

jwiegley commented Oct 9, 2014

Yes! You've got it.

I think I'm going to discard the Factory notion, and just rely on qualified imports for switching between backends, though. It's a bit too complicated for too little benefit.

@craigem
Copy link

craigem commented Oct 25, 2014

I'm also having the same problem with Git.Tutorial being out of date. Particularly where it references createRepository which appears to be deprecated.

@jwiegley
Copy link
Owner

Yes, it is very out of date.

@craigem
Copy link

craigem commented Oct 26, 2014

What can we do to help? I'm trying to work out how to utilise gitlib so if there's anything I can do to help, I'd be happy too :-)

@jwiegley
Copy link
Owner

@craigem Just help get it down onto paper, so to speak. I'm more than happy to meet with you by whatever medium you desire (Google Hangouts, Skype, IRC, even telephone) and give you a brain dump, if you can turn that dump into written word for others.

@toothbrush
Copy link

Hello! How's this going? @craigem, @jmct, i'm having the same problems -- do you guys have minimal working examples available? With that i'm sure i'll be okay, but for now i can't even figure out how to instantiate RepositoryFactory. Maybe it's just late, though.

@jmct
Copy link
Author

jmct commented Nov 20, 2014

Hey @toothbrush, I did figure it out a bit, but then my PhD duties called and I had to switch away from it. My plan is to use my holiday break in a few weeks to write up some new docs and issue a PR.

As for your immediate question: Each backend provides a function that gives you a RepositoryFactory like https://github.com/jwiegley/gitlib/blob/master/gitlib-libgit2/Git/Libgit2.hs#L1502-L1509 for the Libgit2 backend.

@toothbrush
Copy link

@jmct: thanks, I also managed. All i wanted (embarrassingly enough) was to pull out the HEAD hash. (Off-topic: i was amused to note that you're also an XMonad user on Arch. I will now stop stalking and get back to my own PhD duties too ;) )

@edyu
Copy link

edyu commented Apr 10, 2015

I would second that having at least a minimal example working in the source code itself would be most helpful. I also was stuck on not figuring out how to get RepositoryFactory instantiated...

@edyu
Copy link

edyu commented Apr 10, 2015

For example, I'd like to know how do I do the equivalent of "git init" on a directory for example. I know now that you can get lgFactory assuming I'm using the gitlib-libgit2 backend but how do I fill out the action parameter?

@jwiegley
Copy link
Owner

For now, please see the git-monitor code as an example of how to use gitlib.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants