aboutsummaryrefslogtreecommitdiff
path: root/repository/refs_timeout.go
blob: 1414cea9ad61b11edc169472d57fe1766e5f7dc1 (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package repository

import (
	"time"

	"lindenii.org/go/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
}