gogs / git

Package GoGits - Git is a pure Go implementation of Git manipulation.
Apache License 2.0
176 stars 32 forks source link

Doesn't parse packed refs #27

Open spheromak opened 7 years ago

spheromak commented 7 years ago

Operations only work on repos that have 'loose' refs to tags i.e. have not been GC'd. Probably also goes for packed heads/remotes

spheromak commented 7 years ago

that might be the case of the lower level object implementation but the high level repo.GetTags() will not find any tags if the repo has been gc'd or if it's a fresh checkout of a packed repo.

https://github.com/gogits/git/blob/master/repo_tag.go#L20

On Mon, Nov 7, 2016 at 6:36 PM, Lunny Xiao notifications@github.com wrote:

It supports packed refs, you can find the code here https://github.com/gogits/git/blob/master/repo_object.go#L73.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gogits/git/issues/27#issuecomment-259028661, or mute the thread https://github.com/notifications/unsubscribe-auth/AAC81BBWpLq4zoKuwCh2e7t5dXd4TvKnks5q7-AWgaJpZM4KroDw .

lemmi commented 7 years ago

@spheromak #28 was just pushed and reworked the handling of packed files. Does this maybe fix this issue?

necrophonic commented 7 years ago

Hi, I was wondering if anyone has had time to take a look at my pull request #31 attempting to fix this issue? Thanks

lunny commented 7 years ago

@necrophonic maybe you can also send to https://github.com/go-gitea/git

spheromak commented 6 years ago

I think #28 fixed it. I went back to using the git bunary in the project I was using this lib with so I haven’t tested it.