(sig *C.git_signature)
| 17 | } |
| 18 | |
| 19 | func newSignatureFromC(sig *C.git_signature) *Signature { |
| 20 | if sig == nil { |
| 21 | return nil |
| 22 | } |
| 23 | |
| 24 | // git stores minutes, go wants seconds |
| 25 | loc := time.FixedZone("", int(sig.when.offset)*60) |
| 26 | return &Signature{ |
| 27 | C.GoString(sig.name), |
| 28 | C.GoString(sig.email), |
| 29 | time.Unix(int64(sig.when.time), 0).In(loc), |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | // Offset returns the time zone offset of v.When in minutes, which is what git wants. |
| 34 | func (v *Signature) Offset() int { |
no outgoing calls
no test coverage detected
searching dependent graphs…