aboutsummaryrefslogtreecommitdiffstats
path: root/repository/config.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-11-03 16:46:51 +0100
committeramine <hilalyamine@gmail.com>2019-11-03 17:23:05 +0100
commit57e23c8ada0a9d921a6b68187a76eb5c8b8a407d (patch)
tree05ab55090bf196b940a4f6b0e4aaec9975b997bc /repository/config.go
parent614bc5a2c53409a8e9c85ab31a104428069aa7b3 (diff)
downloadgit-bug-57e23c8ada0a9d921a6b68187a76eb5c8b8a407d.tar.gz
bridge: improvement on the import resume feature
Diffstat (limited to 'repository/config.go')
-rw-r--r--repository/config.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/repository/config.go b/repository/config.go
index ec5094e0..d72e7b4e 100644
--- a/repository/config.go
+++ b/repository/config.go
@@ -32,18 +32,17 @@ type Config interface {
// ReadTimestamp read a single timestamp value from the config
// Return ErrNoConfigEntry or ErrMultipleConfigEntry if
// there is zero or more than one entry for this key
- ReadTimestamp(key string) (*time.Time, error)
+ ReadTimestamp(key string) (time.Time, error)
// RemoveAll removes all key/value pair matching the key prefix
RemoveAll(keyPrefix string) error
}
-func parseTimestamp(s string) (*time.Time, error) {
+func parseTimestamp(s string) (time.Time, error) {
timestamp, err := strconv.Atoi(s)
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
}