Golang git library able to communicate with LFS?

559 views
Skip to first unread message

Johann Höchtl

unread,
Aug 2, 2016, 5:42:05 AM8/2/16
to golang-nuts
Hi,

Is there a golang library available which is able to access Git LFS https://github.com/git-lfs/lfs-test-server ?

https://github.com/libgit2/git2go ?
https://github.com/src-d/go-git ?

Thank you, Johann

Jakob Borg

unread,
Aug 2, 2016, 5:59:26 AM8/2/16
to Johann Höchtl, golang-nuts
The repo you linked to includes the official client code. That's
probably the best starting point.
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Johann Höchtl

unread,
Aug 2, 2016, 6:28:06 AM8/2/16
to golang-nuts, johann....@gmail.com
Am Dienstag, 2. August 2016 11:59:26 UTC+2 schrieb Jakob Borg:
The repo you linked to includes the official client code. That's
probably the best starting point.

Which repo do you mean? https://github.com/git-lfs/lfs-test-server is a server library exposing LFS API endpoint, it's not a client library?

Jakob Borg

unread,
Aug 2, 2016, 7:15:04 AM8/2/16
to Johann Höchtl, golang-nuts
2016-08-02 12:28 GMT+02:00 Johann Höchtl <johann....@gmail.com>:
> Am Dienstag, 2. August 2016 11:59:26 UTC+2 schrieb Jakob Borg:
>>
>> The repo you linked to includes the official client code. That's
>> probably the best starting point.
>>
> Which repo do you mean? https://github.com/git-lfs/lfs-test-server is a
> server library exposing LFS API endpoint, it's not a client library?

Ah, sorry, I just saw the "github/git-lfs" and misread. Their repo is at:

https://github.com/github/git-lfs

That's, as far as I can tell, the server, client and common libs for
the implementation. Which is written in Go. The
github.com/github/git-lfs/lfs package looks like a good starting
point. However it also says that it may change without warning, so
vendoring might be in order if it does work out.

//jb

Rick Olson

unread,
Aug 2, 2016, 8:47:59 PM8/2/16
to golang-nuts
Hi Johann,

As Jakob pointed out https://github.com/github/git-lfs/lfs is the closest to a Go library that I know of. Unfortunately, the API is not great and needs to change. I wouldn't depend on it without vendoring to a specific commit. Our focus has been working on a stable command line tool, and not a set of Go packages.

Can you open a new issue on https://github.com/github/git-lfs/issues/new with your specific needs? We can help with package usage for now, and possibly prioritize what you need as an early target for refactoring.


Reply all
Reply to author
Forward
0 new messages