diff options
author | Amine <hilalyamine@gmail.com> | 2019-11-03 17:34:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-03 17:34:51 +0100 |
commit | 163ea9c93306c387f84ff0b85c2d8fca4c01e449 (patch) | |
tree | 05ab55090bf196b940a4f6b0e4aaec9975b997bc /repository/config_mem.go | |
parent | 16bd116971bb7abc7308e95c474b433512672432 (diff) | |
parent | 57e23c8ada0a9d921a6b68187a76eb5c8b8a407d (diff) | |
download | git-bug-163ea9c93306c387f84ff0b85c2d8fca4c01e449.tar.gz |
Merge pull request #236 from MichaelMure/import-after
commands: support bridge imports after a given date
Diffstat (limited to 'repository/config_mem.go')
-rw-r--r-- | repository/config_mem.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/repository/config_mem.go b/repository/config_mem.go index e2cffd9c..bd680d03 100644 --- a/repository/config_mem.go +++ b/repository/config_mem.go @@ -59,18 +59,18 @@ func (mc *memConfig) ReadBool(key string) (bool, error) { return strconv.ParseBool(val) } -func (mc *memConfig) ReadTimestamp(key string) (*time.Time, error) { +func (mc *memConfig) ReadTimestamp(key string) (time.Time, error) { value, err := mc.ReadString(key) if err != nil { - return nil, err + return time.Time{}, err } + timestamp, err := strconv.Atoi(value) if err != nil { - return nil, err + return time.Time{}, err } - t := time.Unix(int64(timestamp), 0) - return &t, nil + return time.Unix(int64(timestamp), 0), nil } // RmConfigs remove all key/value pair matching the key prefix |