Update go-git dependency to get performance fixes #3487

Closed
opened 2025-11-02 05:14:36 -06:00 by GiteaMirror · 14 comments
Owner

Originally created by @filipnavara on GitHub (Jun 18, 2019).

Go-git 4.12 (https://github.com/src-d/go-git/releases/tag/v4.12.0) was released now so Gitea should pick it up for the performance improvements.

Originally created by @filipnavara on GitHub (Jun 18, 2019). Go-git 4.12 (https://github.com/src-d/go-git/releases/tag/v4.12.0) was released now so Gitea should pick it up for the performance improvements.
GiteaMirror added the type/enhancement label 2025-11-02 05:14:36 -06:00
Author
Owner

@filipnavara commented on GitHub (Jun 20, 2019):

Unfortunately the new commitgraph packages are still missing after the update (the plumbing/format/commitgraph and plumbing/object/commitgraph directories).

@filipnavara commented on GitHub (Jun 20, 2019): Unfortunately the new commitgraph packages are still missing after the update (the plumbing/format/commitgraph and plumbing/object/commitgraph directories).
Author
Owner

@zeripath commented on GitHub (Jun 20, 2019):

Oh that's odd they should be there - try make vendor and see if they appear and were missed in the commit.

@zeripath commented on GitHub (Jun 20, 2019): Oh that's odd they should be there - try make vendor and see if they appear and were missed in the commit.
Author
Owner

@filipnavara commented on GitHub (Jun 20, 2019):

I cannot see them on GitHub web (for Gitea repo) so they must have been missed somewhere along the way. make vendor makes a mess on my Windows machine which is why I always ask others to do it for me.

@filipnavara commented on GitHub (Jun 20, 2019): I cannot see them on GitHub web (for Gitea repo) so they must have been missed somewhere along the way. `make vendor` makes a mess on my Windows machine which is why I always ask others to do it for me.
Author
Owner

@zeripath commented on GitHub (Jun 21, 2019):

Ok they definitely should be there - but they're missing because git doesn't complain about new untracked directories. So our make vendor test will miss that they weren't added.

Could you open an issue and either myself or someone else will be able to fix the missing vendor files.

(What happens when you run make vendor?)

@zeripath commented on GitHub (Jun 21, 2019): Ok they definitely should be there - but they're missing because git doesn't complain about new untracked directories. So our make vendor test will miss that they weren't added. Could you open an issue and either myself or someone else will be able to fix the missing vendor files. (What happens when you run make vendor?)
Author
Owner

@lunny commented on GitHub (Jun 21, 2019):

So is this a bug of go?

@lunny commented on GitHub (Jun 21, 2019): So is this a bug of `go`?
Author
Owner

@lunny commented on GitHub (Jun 21, 2019):

It seems plumbing/format/commitgraph and plumbing/object/commitgraph have never been referenced by other packages on go-git. Is that the reason the directories missing when vendoring?

@lunny commented on GitHub (Jun 21, 2019): It seems `plumbing/format/commitgraph` and `plumbing/object/commitgraph` have never been referenced by other packages on go-git. Is that the reason the directories missing when vendoring?
Author
Owner

@zeripath commented on GitHub (Jun 21, 2019):

Nope I suspect the files get added when we do make vendor, but that we missed them when creating the pr and our make test-vendor case misses the fact that they're not added.

I suspect these commit graph functions are not used anywhere in go git at present so it doesn't cause compilation issues that they're not present.

@zeripath commented on GitHub (Jun 21, 2019): Nope I suspect the files get added when we do make vendor, but that we missed them when creating the pr and our make test-vendor case misses the fact that they're not added. I suspect these commit graph functions are not used anywhere in go git at present so it doesn't cause compilation issues that they're not present.
Author
Owner

@lunny commented on GitHub (Jun 21, 2019):

@zeripath I have executed make vendor locally again. But it also didn't copy that two directories.

@lunny commented on GitHub (Jun 21, 2019): @zeripath I have executed `make vendor` locally again. But it also didn't copy that two directories.
Author
Owner

@zeripath commented on GitHub (Jun 21, 2019):

So just checking quickly it doesn't appear to be fixed using make vendor. Damn.

@zeripath commented on GitHub (Jun 21, 2019): So just checking quickly it doesn't appear to be fixed using make vendor. Damn.
Author
Owner

@sapk commented on GitHub (Jun 21, 2019):

@filipnavara I forced the vendoring of package by using _ import of commitgraph packages. You can cherry-pick this commit ac4ebacf17 from the PR #7276 to have the needed deps vendored. Let me know if you need more deps.

@sapk commented on GitHub (Jun 21, 2019): @filipnavara I forced the vendoring of package by using _ import of commitgraph packages. You can cherry-pick this commit ac4ebacf17409f42ef7456959ac64ea11679040e from the PR #7276 to have the needed deps vendored. Let me know if you need more deps.
Author
Owner

@filipnavara commented on GitHub (Jun 21, 2019):

@sapk Thanks! That's exactly what I needed.

@filipnavara commented on GitHub (Jun 21, 2019): @sapk Thanks! That's exactly what I needed.
Author
Owner

@lunny commented on GitHub (Jun 21, 2019):

@filipnavara @sapk So I think that #7276 is unnecessary.
@filipnavara You can just send a PR which reference the two directories and if you cannot run make vendor correctly, maintainers could help you with make vendor on that PR.

@lunny commented on GitHub (Jun 21, 2019): @filipnavara @sapk So I think that #7276 is unnecessary. @filipnavara You can just send a PR which reference the two directories and if you cannot run `make vendor` correctly, maintainers could help you with `make vendor` on that PR.
Author
Owner

@sapk commented on GitHub (Jun 21, 2019):

Yes @lunny it doesn't need to be merged (and it shouldn't). I just did it to verify that it only vendor referenced folder and it could ease the process of vendor for @filipnavara by just cherry-picking the commit (and removing _ import).

@sapk commented on GitHub (Jun 21, 2019): Yes @lunny it doesn't need to be merged (and it shouldn't). I just did it to verify that it only vendor referenced folder and it could ease the process of vendor for @filipnavara by just cherry-picking the commit (and removing _ import).
Author
Owner

@zeripath commented on GitHub (Jun 21, 2019):

This is an interesting finding for me - it basically means that's whilst developing there may be more useful functionality in our already vendored packages that we could use but don't know that is there - I did wonder why go-git appeared so sparse when I was looking for functionality. I'll have to have another look at it.

@zeripath commented on GitHub (Jun 21, 2019): This is an interesting finding for me - it basically means that's whilst developing there may be more useful functionality in our already vendored packages that we could use but don't know that is there - I did wonder why go-git appeared so sparse when I was looking for functionality. I'll have to have another look at it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3487