Make index time fields public (#750) (#753)

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

(cherry picked from commit aeb22bcf7d)

Co-authored-by: michael boulton <61595820+mbfr@users.noreply.github.com>
This commit is contained in:
github-actions[bot] 2021-02-15 13:58:19 -08:00 committed by GitHub
parent a8883c8679
commit 0e6a600b79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -57,8 +57,8 @@ type Index struct {
} }
type IndexTime struct { type IndexTime struct {
seconds int32 Seconds int32
nanoseconds uint32 Nanoseconds uint32
} }
type IndexEntry struct { type IndexEntry struct {
@ -89,10 +89,10 @@ func newIndexEntryFromC(entry *C.git_index_entry) *IndexEntry {
} }
func populateCIndexEntry(source *IndexEntry, dest *C.git_index_entry) { func populateCIndexEntry(source *IndexEntry, dest *C.git_index_entry) {
dest.ctime.seconds = C.int32_t(source.Ctime.seconds) dest.ctime.seconds = C.int32_t(source.Ctime.Seconds)
dest.ctime.nanoseconds = C.uint32_t(source.Ctime.nanoseconds) dest.ctime.nanoseconds = C.uint32_t(source.Ctime.Nanoseconds)
dest.mtime.seconds = C.int32_t(source.Mtime.seconds) dest.mtime.seconds = C.int32_t(source.Mtime.Seconds)
dest.mtime.nanoseconds = C.uint32_t(source.Mtime.nanoseconds) dest.mtime.nanoseconds = C.uint32_t(source.Mtime.Nanoseconds)
dest.mode = C.uint32_t(source.Mode) dest.mode = C.uint32_t(source.Mode)
dest.uid = C.uint32_t(source.Uid) dest.uid = C.uint32_t(source.Uid)
dest.gid = C.uint32_t(source.Gid) dest.gid = C.uint32_t(source.Gid)