diff options
Diffstat (limited to 'object/ident.go')
| -rw-r--r-- | object/ident.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/object/ident.go b/object/ident.go index 432a0977..83503c89 100644 --- a/object/ident.go +++ b/object/ident.go @@ -4,10 +4,11 @@ import ( "bytes" "errors" "fmt" - "math" "strconv" "strings" "time" + + "codeberg.org/lindenii/furgit/internal/intconv" ) // Ident represents a Git identity (author/committer/tagger). @@ -76,11 +77,10 @@ func ParseIdent(line []byte) (*Ident, error) { return nil, errors.New("object: ident: invalid timezone minutes range") } total := int64(hh)*60 + int64(mm) - if total > math.MaxInt32 { + offset, err := intconv.Int64ToInt32(total) + if err != nil { return nil, errors.New("object: ident: timezone overflow") } - - offset := int32(total) if sign < 0 { offset = -offset } |
