Skip to content

Commit

Permalink
fix wrong -dirty prefix in version (#3869)
Browse files Browse the repository at this point in the history
  • Loading branch information
aler9 authored Oct 12, 2024
1 parent f231837 commit 6188ee1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/core/versiongetter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,12 @@ func tagFromGit() error {
// where .git/objects/info/alternates points to a directory outside of the .git directory.
//
// To work around this, specify an AlternatesFS that allows access to the entire filesystem.
fs := osfs.New("../../.git", osfs.WithBoundOS())
storer := filesystem.NewStorageWithOptions(fs, cache.NewObjectLRUDefault(), filesystem.Options{
storerFs := osfs.New("../../.git", osfs.WithBoundOS())
storer := filesystem.NewStorageWithOptions(storerFs, cache.NewObjectLRUDefault(), filesystem.Options{
AlternatesFS: osfs.New("/", osfs.WithBoundOS()),
})
repo, err := git.Open(storer, fs)
worktreeFs := osfs.New("../..", osfs.WithBoundOS())
repo, err := git.Open(storer, worktreeFs)
if err != nil {
return fmt.Errorf("failed to open repository: %w", err)
}
Expand Down

0 comments on commit 6188ee1

Please sign in to comment.