fix(gomod): use git-module fork

Ayman Bagabas created

Change summary

git/command.go                 | 2 +-
git/commit.go                  | 2 +-
git/errors.go                  | 2 +-
git/patch.go                   | 2 +-
git/reference.go               | 2 +-
git/repo.go                    | 2 +-
git/server.go                  | 2 +-
git/stash.go                   | 2 +-
git/tag.go                     | 2 +-
git/tree.go                    | 2 +-
git/types.go                   | 2 +-
go.mod                         | 4 +---
go.sum                         | 4 ++--
pkg/git/git.go                 | 2 +-
pkg/lfs/scanner.go             | 2 +-
pkg/ssh/cmd/branch.go          | 2 +-
pkg/ui/pages/repo/files.go     | 2 +-
pkg/ui/pages/repo/stash.go     | 2 +-
pkg/ui/pages/repo/stashitem.go | 2 +-
pkg/webhook/push.go            | 2 +-
20 files changed, 21 insertions(+), 23 deletions(-)

Detailed changes

git/command.go 🔗

@@ -1,6 +1,6 @@
 package git
 
-import "github.com/gogs/git-module"
+import "github.com/aymanbagabas/git-module"
 
 // RunInDirOptions are options for RunInDir.
 type RunInDirOptions = git.RunInDirOptions

git/commit.go 🔗

@@ -3,7 +3,7 @@ package git
 import (
 	"regexp"
 
-	"github.com/gogs/git-module"
+	"github.com/aymanbagabas/git-module"
 )
 
 // ZeroID is the zero hash.

git/errors.go 🔗

@@ -3,7 +3,7 @@ package git
 import (
 	"errors"
 
-	"github.com/gogs/git-module"
+	"github.com/aymanbagabas/git-module"
 )
 
 var (

git/patch.go 🔗

@@ -8,7 +8,7 @@ import (
 	"sync"
 
 	"github.com/dustin/go-humanize/english"
-	"github.com/gogs/git-module"
+	"github.com/aymanbagabas/git-module"
 	"github.com/sergi/go-diff/diffmatchpatch"
 )
 

git/reference.go 🔗

@@ -3,7 +3,7 @@ package git
 import (
 	"strings"
 
-	"github.com/gogs/git-module"
+	"github.com/aymanbagabas/git-module"
 )
 
 const (

git/repo.go 🔗

@@ -4,7 +4,7 @@ import (
 	"path/filepath"
 	"strings"
 
-	"github.com/gogs/git-module"
+	"github.com/aymanbagabas/git-module"
 )
 
 var (

git/server.go 🔗

@@ -3,7 +3,7 @@ package git
 import (
 	"context"
 
-	"github.com/gogs/git-module"
+	"github.com/aymanbagabas/git-module"
 )
 
 // UpdateServerInfo updates the server info file for the given repo path.

git/stash.go 🔗

@@ -1,6 +1,6 @@
 package git
 
-import "github.com/gogs/git-module"
+import "github.com/aymanbagabas/git-module"
 
 // StashDiff returns the diff of the given stash index.
 func (r *Repository) StashDiff(index int) (*Diff, error) {

git/tag.go 🔗

@@ -1,6 +1,6 @@
 package git
 
-import "github.com/gogs/git-module"
+import "github.com/aymanbagabas/git-module"
 
 // Tag is a git tag.
 type Tag = git.Tag

git/tree.go 🔗

@@ -8,7 +8,7 @@ import (
 	"path/filepath"
 	"sort"
 
-	"github.com/gogs/git-module"
+	"github.com/aymanbagabas/git-module"
 )
 
 // Tree is a wrapper around git.Tree with helper methods.

git/types.go 🔗

@@ -1,6 +1,6 @@
 package git
 
-import "github.com/gogs/git-module"
+import "github.com/aymanbagabas/git-module"
 
 // CommandOptions contain options for running a git command.
 type CommandOptions = git.CommandOptions

go.mod 🔗

@@ -2,8 +2,6 @@ module github.com/charmbracelet/soft-serve
 
 go 1.20
 
-replace github.com/gogs/git-module => github.com/aymanbagabas/git-module v1.4.1-0.20231025145308-5e8facf7a213
-
 require (
 	github.com/alecthomas/chroma v0.10.0
 	github.com/charmbracelet/bubbles v0.16.1
@@ -20,6 +18,7 @@ require (
 )
 
 require (
+	github.com/aymanbagabas/git-module v1.8.4-0.20231101154130-8d27204ac6d2
 	github.com/caarlos0/duration v0.0.0-20220103233809-8df7c22fe305
 	github.com/caarlos0/env/v10 v10.0.0
 	github.com/caarlos0/tablewriter v0.1.0
@@ -29,7 +28,6 @@ require (
 	github.com/charmbracelet/ssh v0.0.0-20230822194956-1a051f898e09
 	github.com/go-jose/go-jose/v3 v3.0.0
 	github.com/gobwas/glob v0.2.3
-	github.com/gogs/git-module v1.8.3
 	github.com/golang-jwt/jwt/v5 v5.0.0
 	github.com/google/go-querystring v1.1.0
 	github.com/google/uuid v1.4.0

go.sum 🔗

@@ -4,8 +4,8 @@ github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFI
 github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4=
 github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4=
 github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI=
-github.com/aymanbagabas/git-module v1.4.1-0.20231025145308-5e8facf7a213 h1:/tUfPeV5T/tn2UjvQedq1incFa9B9WkFHTv0fdt5Ah0=
-github.com/aymanbagabas/git-module v1.4.1-0.20231025145308-5e8facf7a213/go.mod h1:3OBxY2gWeblk83u6BlGMO1TYDEbV4bspATMP/S2Kfsk=
+github.com/aymanbagabas/git-module v1.8.4-0.20231101154130-8d27204ac6d2 h1:3w5KT+shE3hzWhORGiu2liVjEoaCEXm9uZP47+Gw4So=
+github.com/aymanbagabas/git-module v1.8.4-0.20231101154130-8d27204ac6d2/go.mod h1:d4gQ7/3/S2sPq4NnKdtAgUOVr6XtLpWFtxyVV5/+76U=
 github.com/aymanbagabas/go-osc52 v1.0.3/go.mod h1:zT8H+Rk4VSabYN90pWyugflM3ZhpTZNC7cASDfUCdT4=
 github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k=
 github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8=

pkg/git/git.go 🔗

@@ -10,7 +10,7 @@ import (
 	"github.com/charmbracelet/log"
 	"github.com/charmbracelet/soft-serve/git"
 	"github.com/go-git/go-git/v5/plumbing/format/pktline"
-	gitm "github.com/gogs/git-module"
+	gitm "github.com/aymanbagabas/git-module"
 )
 
 // WritePktline encodes and writes a pktline to the given writer.

pkg/lfs/scanner.go 🔗

@@ -11,7 +11,7 @@ import (
 	"sync"
 
 	"github.com/charmbracelet/soft-serve/git"
-	gitm "github.com/gogs/git-module"
+	gitm "github.com/aymanbagabas/git-module"
 )
 
 // SearchPointerBlobs scans the whole repository for LFS pointer files

pkg/ssh/cmd/branch.go 🔗

@@ -8,7 +8,7 @@ import (
 	"github.com/charmbracelet/soft-serve/pkg/backend"
 	"github.com/charmbracelet/soft-serve/pkg/proto"
 	"github.com/charmbracelet/soft-serve/pkg/webhook"
-	gitm "github.com/gogs/git-module"
+	gitm "github.com/aymanbagabas/git-module"
 	"github.com/spf13/cobra"
 )
 

pkg/ui/pages/repo/files.go 🔗

@@ -15,7 +15,7 @@ import (
 	"github.com/charmbracelet/soft-serve/pkg/ui/common"
 	"github.com/charmbracelet/soft-serve/pkg/ui/components/code"
 	"github.com/charmbracelet/soft-serve/pkg/ui/components/selector"
-	gitm "github.com/gogs/git-module"
+	gitm "github.com/aymanbagabas/git-module"
 )
 
 type filesView int

pkg/ui/pages/repo/stash.go 🔗

@@ -12,7 +12,7 @@ import (
 	"github.com/charmbracelet/soft-serve/pkg/ui/common"
 	"github.com/charmbracelet/soft-serve/pkg/ui/components/code"
 	"github.com/charmbracelet/soft-serve/pkg/ui/components/selector"
-	gitm "github.com/gogs/git-module"
+	gitm "github.com/aymanbagabas/git-module"
 )
 
 type stashState int

pkg/ui/pages/repo/stashitem.go 🔗

@@ -8,7 +8,7 @@ import (
 	"github.com/charmbracelet/bubbles/list"
 	tea "github.com/charmbracelet/bubbletea"
 	"github.com/charmbracelet/soft-serve/pkg/ui/common"
-	gitm "github.com/gogs/git-module"
+	gitm "github.com/aymanbagabas/git-module"
 )
 
 // StashItem represents a stash item.

pkg/webhook/push.go 🔗

@@ -9,7 +9,7 @@ import (
 	"github.com/charmbracelet/soft-serve/pkg/db"
 	"github.com/charmbracelet/soft-serve/pkg/proto"
 	"github.com/charmbracelet/soft-serve/pkg/store"
-	gitm "github.com/gogs/git-module"
+	gitm "github.com/aymanbagabas/git-module"
 )
 
 // PushEvent is a push event.