From 43c25d457becb64ed2f76fbe2935475056a1081a Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 16 Nov 2025 00:00:00 +0000 Subject: Documentation overhaul --- ident.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'ident.go') diff --git a/ident.go b/ident.go index 5a01d8ea..b5cb38b2 100644 --- a/ident.go +++ b/ident.go @@ -10,8 +10,7 @@ import ( "time" ) -// Ident models an author/committer identity together with its timestamp -// and timezone offset, mirroring the fields that appear in Git objects. +// Ident represents a Git identity (author/committer/tagger). type Ident struct { Name []byte Email []byte @@ -116,7 +115,7 @@ func (ident Ident) Serialize() ([]byte, error) { return []byte(b.String()), nil } -// When returns the timestamp as time.Time using the embedded offset. +// When returns the ident's time.Time with the correct timezone. func (ident Ident) When() time.Time { loc := time.FixedZone("git", int(ident.OffsetMinutes)*60) return time.Unix(ident.WhenUnix, 0).In(loc) -- cgit v1.3.1-10-gc9f91