Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ curl -sSL https://raw.githubusercontent.com/polymorcodeus/lnk/main/install.sh |
Or grab a binary from [releases](https://github.com/polymorcodeus/lnk/releases), or build from source:

```bash
go install github.com/polymorcodeus/lnk@latest
go install github.com/polymorcodeus/lnk/v2@latest
```

*NOTE:*
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.4.0
v2.4.1
4 changes: 2 additions & 2 deletions cmd/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (

"github.com/spf13/cobra"

"github.com/polymorcodeus/lnk/internal/lnkerror"
"github.com/polymorcodeus/lnk/service"
"github.com/polymorcodeus/lnk/v2/internal/lnkerror"
"github.com/polymorcodeus/lnk/v2/service"
)

// newCreateCmd returns the "create" subcommand.
Expand Down
6 changes: 3 additions & 3 deletions cmd/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"strings"
"testing"

"github.com/polymorcodeus/lnk/cmd"
"github.com/polymorcodeus/lnk/internal/lnkerror"
"github.com/polymorcodeus/lnk/internal/testhelpers"
"github.com/polymorcodeus/lnk/v2/cmd"
"github.com/polymorcodeus/lnk/v2/internal/lnkerror"
"github.com/polymorcodeus/lnk/v2/internal/testhelpers"
)

func TestCreateCmd_MixedFileAndDir(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions cmd/hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

"github.com/spf13/cobra"

"github.com/polymorcodeus/lnk/internal/gitboundary"
"github.com/polymorcodeus/lnk/internal/hooks"
"github.com/polymorcodeus/lnk/v2/internal/gitboundary"
"github.com/polymorcodeus/lnk/v2/internal/hooks"
)

// newHooksCmd returns the "hooks" command group.
Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/spf13/cobra"

"github.com/polymorcodeus/lnk/service"
"github.com/polymorcodeus/lnk/v2/service"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions cmd/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"strings"
"testing"

"github.com/polymorcodeus/lnk/cmd"
"github.com/polymorcodeus/lnk/service"
"github.com/polymorcodeus/lnk/v2/cmd"
"github.com/polymorcodeus/lnk/v2/service"
)

func TestPrintRestore(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/polymorcodeus/lnk
module github.com/polymorcodeus/lnk/v2

go 1.26

Expand Down
2 changes: 1 addition & 1 deletion internal/bootstrapper/bootstrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"os/exec"
"path/filepath"

"github.com/polymorcodeus/lnk/internal/lnkerror"
"github.com/polymorcodeus/lnk/v2/internal/lnkerror"
)

type commandRunner func(ctx context.Context, name string, arg ...string) *exec.Cmd
Expand Down
4 changes: 2 additions & 2 deletions internal/bootstrapper/bootstrapper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"strings"
"testing"

"github.com/polymorcodeus/lnk/internal/bootstrapper"
"github.com/polymorcodeus/lnk/internal/lnkerror"
"github.com/polymorcodeus/lnk/v2/internal/bootstrapper"
"github.com/polymorcodeus/lnk/v2/internal/lnkerror"
)

// --- stubs ---
Expand Down
2 changes: 1 addition & 1 deletion internal/filemanager/filemanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"path/filepath"
"slices"

"github.com/polymorcodeus/lnk/internal/lnkerror"
"github.com/polymorcodeus/lnk/v2/internal/lnkerror"
)

type fileSystem interface {
Expand Down
2 changes: 1 addition & 1 deletion internal/filemanager/filemanager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"testing"
"time"

"github.com/polymorcodeus/lnk/internal/filemanager"
"github.com/polymorcodeus/lnk/v2/internal/filemanager"
)

// ---------- fakes ----------
Expand Down
2 changes: 1 addition & 1 deletion internal/fs/filesystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"slices"
"strings"

"github.com/polymorcodeus/lnk/internal/lnkerror"
"github.com/polymorcodeus/lnk/v2/internal/lnkerror"
)

// Sentinel errors for file system operations.
Expand Down
4 changes: 2 additions & 2 deletions internal/fs/filesystem_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"path/filepath"
"testing"

"github.com/polymorcodeus/lnk/internal/fs"
"github.com/polymorcodeus/lnk/internal/lnkerror"
"github.com/polymorcodeus/lnk/v2/internal/fs"
"github.com/polymorcodeus/lnk/v2/internal/lnkerror"
)

func TestFileSystem_ValidateFileInfoForAdd(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"strings"
"time"

"github.com/polymorcodeus/lnk/internal/lnkerror"
"github.com/polymorcodeus/lnk/v2/internal/lnkerror"
)

// Sentinel errors for git operations.
Expand Down
4 changes: 2 additions & 2 deletions internal/git/git_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"strings"
"testing"

"github.com/polymorcodeus/lnk/internal/git"
"github.com/polymorcodeus/lnk/internal/testhelpers"
"github.com/polymorcodeus/lnk/v2/internal/git"
"github.com/polymorcodeus/lnk/v2/internal/testhelpers"
)

// ---------- helpers ----------
Expand Down
2 changes: 1 addition & 1 deletion internal/gitboundary/gitboundary_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"path/filepath"
"testing"

"github.com/polymorcodeus/lnk/internal/gitboundary"
"github.com/polymorcodeus/lnk/v2/internal/gitboundary"
)

func initGitRepo(t *testing.T, dir string) {
Expand Down
2 changes: 1 addition & 1 deletion internal/hooks/hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"path/filepath"
"strings"

"github.com/polymorcodeus/lnk/internal/lnkerror"
"github.com/polymorcodeus/lnk/v2/internal/lnkerror"
)

// Marker comments bracket a hook script written by lnk.
Expand Down
4 changes: 2 additions & 2 deletions internal/hooks/hooks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"strings"
"testing"

"github.com/polymorcodeus/lnk/internal/hooks"
"github.com/polymorcodeus/lnk/internal/lnkerror"
"github.com/polymorcodeus/lnk/v2/internal/hooks"
"github.com/polymorcodeus/lnk/v2/internal/lnkerror"
)

func TestInstallLnkRepo_WritesPostMergeHook(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/lnkerror/error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"errors"
"testing"

"github.com/polymorcodeus/lnk/internal/lnkerror"
"github.com/polymorcodeus/lnk/v2/internal/lnkerror"
)

func TestSentinels(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/patterns/patterns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"path/filepath"
"testing"

"github.com/polymorcodeus/lnk/internal/patterns"
"github.com/polymorcodeus/lnk/v2/internal/patterns"
)

func TestLoad_MissingFile(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/resolver/resolver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strings"
"testing"

"github.com/polymorcodeus/lnk/internal/resolver"
"github.com/polymorcodeus/lnk/v2/internal/resolver"
)

func TestNormalizeRemoteURL(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/scope/scope_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strings"
"testing"

"github.com/polymorcodeus/lnk/internal/scope"
"github.com/polymorcodeus/lnk/v2/internal/scope"
)

func TestHomeRelativeResolver_ToStorage(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions internal/testhelpers/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"strings"
"testing"

"github.com/polymorcodeus/lnk/internal/tracker"
"github.com/polymorcodeus/lnk/service"
"github.com/polymorcodeus/lnk/v2/internal/tracker"
"github.com/polymorcodeus/lnk/v2/service"
)

// ---------- Repo setup helpers ----------
Expand Down
2 changes: 1 addition & 1 deletion internal/tracker/tracker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"slices"
"testing"

"github.com/polymorcodeus/lnk/internal/tracker"
"github.com/polymorcodeus/lnk/v2/internal/tracker"
)

func TestTracker_LnkFileName(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
_ "embed"
"strings"

"github.com/polymorcodeus/lnk/cmd"
"github.com/polymorcodeus/lnk/v2/cmd"
)

//go:embed VERSION
Expand Down
6 changes: 3 additions & 3 deletions service/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"path/filepath"
"strings"

"github.com/polymorcodeus/lnk/internal/filemanager"
"github.com/polymorcodeus/lnk/internal/gitboundary"
"github.com/polymorcodeus/lnk/internal/lnkerror"
"github.com/polymorcodeus/lnk/v2/internal/filemanager"
"github.com/polymorcodeus/lnk/v2/internal/gitboundary"
"github.com/polymorcodeus/lnk/v2/internal/lnkerror"
)

// Add tracks one or more paths in common or one host scope.
Expand Down
6 changes: 3 additions & 3 deletions service/add_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"path/filepath"
"testing"

"github.com/polymorcodeus/lnk/internal/fs"
"github.com/polymorcodeus/lnk/internal/lnkerror"
"github.com/polymorcodeus/lnk/internal/testhelpers"
"github.com/polymorcodeus/lnk/v2/internal/fs"
"github.com/polymorcodeus/lnk/v2/internal/lnkerror"
"github.com/polymorcodeus/lnk/v2/internal/testhelpers"
)

// ---------- Add tests ----------
Expand Down
2 changes: 1 addition & 1 deletion service/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"io"

bootpkg "github.com/polymorcodeus/lnk/internal/bootstrapper"
bootpkg "github.com/polymorcodeus/lnk/v2/internal/bootstrapper"
)

// Bootstrap runs bootstrap.sh explicitly.
Expand Down
4 changes: 2 additions & 2 deletions service/bootstrap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"path/filepath"
"testing"

"github.com/polymorcodeus/lnk/internal/testhelpers"
"github.com/polymorcodeus/lnk/service"
"github.com/polymorcodeus/lnk/v2/internal/testhelpers"
"github.com/polymorcodeus/lnk/v2/service"
)

// ---------- Bootstrap tests ----------
Expand Down
8 changes: 4 additions & 4 deletions service/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"path/filepath"
"strings"

"github.com/polymorcodeus/lnk/internal/filemanager"
"github.com/polymorcodeus/lnk/internal/fs"
"github.com/polymorcodeus/lnk/internal/gitboundary"
"github.com/polymorcodeus/lnk/internal/lnkerror"
"github.com/polymorcodeus/lnk/v2/internal/filemanager"
"github.com/polymorcodeus/lnk/v2/internal/fs"
"github.com/polymorcodeus/lnk/v2/internal/gitboundary"
"github.com/polymorcodeus/lnk/v2/internal/lnkerror"
)

const lnkKeepFileName = ".lnkkeep"
Expand Down
8 changes: 4 additions & 4 deletions service/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"path/filepath"
"testing"

"github.com/polymorcodeus/lnk/internal/fs"
"github.com/polymorcodeus/lnk/internal/lnkerror"
"github.com/polymorcodeus/lnk/internal/testhelpers"
"github.com/polymorcodeus/lnk/service"
"github.com/polymorcodeus/lnk/v2/internal/fs"
"github.com/polymorcodeus/lnk/v2/internal/lnkerror"
"github.com/polymorcodeus/lnk/v2/internal/testhelpers"
"github.com/polymorcodeus/lnk/v2/service"
)

// ---------- Success cases ----------
Expand Down
8 changes: 4 additions & 4 deletions service/doctor.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
"slices"
"strings"

"github.com/polymorcodeus/lnk/internal/fs"
"github.com/polymorcodeus/lnk/internal/gitboundary"
"github.com/polymorcodeus/lnk/internal/lnkerror"
"github.com/polymorcodeus/lnk/internal/tracker"
"github.com/polymorcodeus/lnk/v2/internal/fs"
"github.com/polymorcodeus/lnk/v2/internal/gitboundary"
"github.com/polymorcodeus/lnk/v2/internal/lnkerror"
"github.com/polymorcodeus/lnk/v2/internal/tracker"
)

// ScopeResult captures doctor findings for one profile or storage scope.
Expand Down
4 changes: 2 additions & 2 deletions service/doctor_project_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"strings"
"testing"

"github.com/polymorcodeus/lnk/internal/testhelpers"
"github.com/polymorcodeus/lnk/service"
"github.com/polymorcodeus/lnk/v2/internal/testhelpers"
"github.com/polymorcodeus/lnk/v2/service"
)

func TestDoctor_ProjectIssues_OrphanedStorage(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions service/doctor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"path/filepath"
"testing"

"github.com/polymorcodeus/lnk/internal/lnkerror"
"github.com/polymorcodeus/lnk/internal/testhelpers"
"github.com/polymorcodeus/lnk/v2/internal/lnkerror"
"github.com/polymorcodeus/lnk/v2/internal/testhelpers"
)

// ---------- Doctor scan tests ----------
Expand Down
6 changes: 3 additions & 3 deletions service/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"strconv"
"strings"

fspkg "github.com/polymorcodeus/lnk/internal/fs"
"github.com/polymorcodeus/lnk/internal/lnkerror"
"github.com/polymorcodeus/lnk/internal/tracker"
fspkg "github.com/polymorcodeus/lnk/v2/internal/fs"
"github.com/polymorcodeus/lnk/v2/internal/lnkerror"
"github.com/polymorcodeus/lnk/v2/internal/tracker"
)

// commonPath describes both legacy and v2 paths for commonScope
Expand Down
4 changes: 2 additions & 2 deletions service/format_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"strings"
"testing"

"github.com/polymorcodeus/lnk/internal/testhelpers"
"github.com/polymorcodeus/lnk/service"
"github.com/polymorcodeus/lnk/v2/internal/testhelpers"
"github.com/polymorcodeus/lnk/v2/service"
)

// setupV2Repo creates a v2 repo with a set of tracked files ready for format
Expand Down
2 changes: 1 addition & 1 deletion service/hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os"
"time"

"github.com/polymorcodeus/lnk/internal/gitboundary"
"github.com/polymorcodeus/lnk/v2/internal/gitboundary"
)

// hookTimeout limits how long a hook body may block the git operation.
Expand Down
Loading
Loading