Skip to content
This repository was archived by the owner on May 24, 2024. It is now read-only.

Commit f47c3c3

Browse files
handle empty sync (#56)
Signed-off-by: Ayman <[email protected]> Signed-off-by: Ayman <[email protected]> Co-authored-by: Ayman <[email protected]>
1 parent 2a6bccb commit f47c3c3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmd/git/git.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2652,7 +2652,9 @@ func (j *DSGit) Sync(ctx *shared.Ctx) (err error) {
26522652
// NOTE: Non-generic ends here
26532653
gMaxUpstreamDtMtx.Lock()
26542654
defer gMaxUpstreamDtMtx.Unlock()
2655-
err = j.cacheProvider.SetLastSync(j.endpoint, gMaxUpstreamDt)
2655+
if !gMaxUpstreamDt.IsZero() {
2656+
err = j.cacheProvider.SetLastSync(j.endpoint, gMaxUpstreamDt)
2657+
}
26562658
return
26572659
}
26582660

0 commit comments

Comments
 (0)