mirror of
https://github.com/bluenviron/mediamtx
synced 2025-02-25 16:10:54 +00:00
fix wrong -dirty prefix in version (#3869)
This commit is contained in:
parent
f231837591
commit
6188ee1886
@ -76,11 +76,12 @@ func tagFromGit() error {
|
|||||||
// where .git/objects/info/alternates points to a directory outside of the .git directory.
|
// 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.
|
// To work around this, specify an AlternatesFS that allows access to the entire filesystem.
|
||||||
fs := osfs.New("../../.git", osfs.WithBoundOS())
|
storerFs := osfs.New("../../.git", osfs.WithBoundOS())
|
||||||
storer := filesystem.NewStorageWithOptions(fs, cache.NewObjectLRUDefault(), filesystem.Options{
|
storer := filesystem.NewStorageWithOptions(storerFs, cache.NewObjectLRUDefault(), filesystem.Options{
|
||||||
AlternatesFS: osfs.New("/", osfs.WithBoundOS()),
|
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 {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to open repository: %w", err)
|
return fmt.Errorf("failed to open repository: %w", err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user