Bug 298162 - devel/go-git: Update to 5.19.2, take maintainership
Summary: devel/go-git: Update to 5.19.2, take maintainership
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Yusuf Yaman
URL: https://github.com/go-git/go-git/comp...
Keywords:
: 298161 (view as bug list)
Depends on:
Blocks:
 
Reported: 2026-09-04 09:10 UTC by Aydar Gareev
Modified: 2026-09-04 22:22 UTC (History)
1 user (show)

See Also:


Attachments
patch (15.12 KB, patch)
2026-09-04 09:12 UTC, Aydar Gareev
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aydar Gareev 2026-09-04 09:10:59 UTC
Update devel/go-git from 5.10.0 to 5.19.2, and take maintainership
(currently ports@).

Why a plain version bump does not work
--------------------------------------
Upstream moved the command line client into its own nested Go module around
v5.10.1 ("cli: separate go module for cli"). cli/go-git now has its own
go.mod, and the Go toolchain excludes nested modules from the parent module
zip. The archive fetched via GO_MODULE=github.com/go-git/go-git/v5 therefore
does not contain cli/ at all:

  unzip -l .../@v/v5.19.2.zip | grep cli   # no matches

The nested module is not published either -- proxy.golang.org returns an
empty version list for github.com/go-git/go-git/cli/go-git, and there are no
cli/* tags in the repository.

What this patch does
--------------------
- Fetch sources from GitHub by tag (USE_GITHUB, WRKSRC_SUBDIR=cli/go-git)
  instead of the module proxy, with dependencies pinned via GH_TUPLE.
- Add files/modules.txt, generated by "go mod vendor" in cli/go-git at tag
  v5.19.2. GH_TUPLE lays out vendor/ but does not create the vendoring
  manifest, and the build fails without it under -mod=vendor.

Notes
-----
The CLI at tag v5.19.2 depends on github.com/go-git/go-git/v5 v5.19.1. The
CLI module carries no version of its own, so the port tracks the repository
tag rather than the library version.

Testing
-------
portlint -A: clean
poudriere testport: 15.0-RELEASE amd64, 14.3-RELEASE amd64 -- in progress

  $ go-git version
  go-git (5.19.2) - build FreeBSD
Comment 1 Aydar Gareev 2026-09-04 09:12:07 UTC
Created attachment 274401 [details]
patch
Comment 2 Aydar Gareev 2026-09-04 10:51:10 UTC
*** Bug 298161 has been marked as a duplicate of this bug. ***
Comment 3 commit-hook freebsd_committer freebsd_triage 2026-09-04 22:18:29 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=53174cb66cc7bc332d5bdc5b99855a1c0484bc0b

commit 53174cb66cc7bc332d5bdc5b99855a1c0484bc0b
Author:     Aydar Gareev <gareev@aydar.me>
AuthorDate: 2026-09-03 22:10:50 +0000
Commit:     Yusuf Yaman <nxjoseph@FreeBSD.org>
CommitDate: 2026-09-04 22:15:18 +0000

    devel/go-git: Update 5.10.0 => 5.19.2, take maintainership

    While here, sort Makefile (pet portclippy).

    Upstream moved the CLI into a nested Go module (cli/go-git has its own
    go.mod), which excludes it from the parent module zip. GO_MODULE can no
    longer deliver it at any version, which is why the port has been stuck
    at 5.10.0.

    Switch to fetching sources from GitHub by tag and supply
    vendor/modules.txt, which GH_TUPLE does not generate.

    Commit log:
    https://github.com/go-git/go-git/compare/v5.10.0...v5.19.2

    PR:             298162
    Reported by:    Aydar Gareev <gareev@aydar.me> (takes maintainership)
    Approved by:    osa, vvd (Mentors, implicit)

 devel/go-git/Makefile                |  40 ++++++--
 devel/go-git/distinfo                |  52 +++++++++-
 devel/go-git/files/modules.txt (new) | 186 +++++++++++++++++++++++++++++++++++
 3 files changed, 266 insertions(+), 12 deletions(-)
Comment 4 Yusuf Yaman freebsd_committer freebsd_triage 2026-09-04 22:22:21 UTC
Hi,

Thank you for your work!

While here, I have used portclippy to sort Makefile and replaced post-extract with post-patch instead (since the latter feels more appropriate to me).

I have tested build in Poudriere on 14.4-RELEASE-amd64-main-de505fe3a567 and it
seems OK.

Committed, thanks.