summaryrefslogtreecommitdiff
path: root/index.go
diff options
context:
space:
mode:
authormichael boulton <[email protected]>2021-02-15 15:37:55 +0000
committerGitHub <[email protected]>2021-02-15 07:37:55 -0800
commitaeb22bcf7dd6b3b8f75363a20790b84ea4d5de9f (patch)
treeed2c4d7793d3494f3beb38e231092148c8e9f056 /index.go
parentf6c5753df885e8511cf7d6437ee10e81c91a9651 (diff)
Make index time fields public (#750)
From gorelease: ``` Compatible changes: - IndexTime.Nanoseconds: added - IndexTime.Seconds: added ``` There are no extra tests because there isn't really anything to test closes #304
Diffstat (limited to 'index.go')
-rw-r--r--index.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/index.go b/index.go
index f1f2e9d..99dbd7a 100644
--- a/index.go
+++ b/index.go
@@ -57,8 +57,8 @@ type Index struct {
}
type IndexTime struct {
- seconds int32
- nanoseconds uint32
+ Seconds int32
+ Nanoseconds uint32
}
type IndexEntry struct {
@@ -89,10 +89,10 @@ func newIndexEntryFromC(entry *C.git_index_entry) *IndexEntry {
}
func populateCIndexEntry(source *IndexEntry, dest *C.git_index_entry) {
- dest.ctime.seconds = C.int32_t(source.Ctime.seconds)
- dest.ctime.nanoseconds = C.uint32_t(source.Ctime.nanoseconds)
- dest.mtime.seconds = C.int32_t(source.Mtime.seconds)
- dest.mtime.nanoseconds = C.uint32_t(source.Mtime.nanoseconds)
+ dest.ctime.seconds = C.int32_t(source.Ctime.Seconds)
+ dest.ctime.nanoseconds = C.uint32_t(source.Ctime.Nanoseconds)
+ dest.mtime.seconds = C.int32_t(source.Mtime.Seconds)
+ dest.mtime.nanoseconds = C.uint32_t(source.Mtime.Nanoseconds)
dest.mode = C.uint32_t(source.Mode)
dest.uid = C.uint32_t(source.Uid)
dest.gid = C.uint32_t(source.Gid)