diff --git a/hbs2-git3/app/GitRemoteHelper.hs b/hbs2-git3/app/GitRemoteHelper.hs index 23632714..5acdcc0f 100644 --- a/hbs2-git3/app/GitRemoteHelper.hs +++ b/hbs2-git3/app/GitRemoteHelper.hs @@ -182,7 +182,10 @@ main = flip runContT pure do case what of [ListVal [SymbolVal "checkpoint", TextLike w, LitIntVal r]] -> do - atomically $ writeTVar cp_ (Just (w,r)) + atomically do + ts0 <- readTVar cp_ <&> fmap snd + when (Just r > ts0) do + writeTVar cp_ (Just (w,r)) [ListVal [SymbolVal "status", TextLike "FLUSH"]] -> do finished ()