aboutsummaryrefslogtreecommitdiffstats
path: root/icons/network.png
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-06-13 13:41:09 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-06-14 13:35:33 -0700
commit8b478a969dbd10b3f07affd2f614886d27211c2a (patch)
treee6d4b6fc4b9b7754a4b2d45f5c5afbe6298ef304 /icons/network.png
parentfe9e33ccac5ec09e25dc0ea363b24a8b01ab2d88 (diff)
downloadsubsurface-8b478a969dbd10b3f07affd2f614886d27211c2a.tar.gz
git-storage: add global flag to indicate successful cloud sync
This may seem like a bit heavy handed as it adds more global state, but given the number of ways in which attempts to sync with the cloud can fail it seems much more reliable to claim success in the spots where we actually know that we have successfully synced with the remote server. Transporting that information back through the various call chains turned out to be very disruptive and ugly, so I went with global state instead. Whenever we access cloud storage (or any git repo), we always first check if it actually is a git repo by calling is_git_repository() - so this is the perfect spot to initialize the variable to false. And there are only two spots where we either clone the remote repo (create_local_repo()) or update the remote with the (potentially merged) local changes (check_remote_status()). So those are the two places where we set the variable to true. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'icons/network.png')
0 files changed, 0 insertions, 0 deletions