shithub: furgit

ref: d314d1f7e933ca83081eec289aa0cb6e75a7eeac
dir: /repository/refs_timeout.go/

View raw version
package repository

import (
	"time"

	"codeberg.org/lindenii/furgit/config"
)

func detectPackedRefsTimeout(cfg *config.Config) time.Duration {
	timeoutValue, err := cfg.Lookup("core", "", "packedrefstimeout").Int()
	if err != nil {
		return time.Second
	}

	return time.Duration(timeoutValue) * time.Millisecond
}