mirror of
https://github.com/logseq/logseq.git
synced 2026-05-24 20:54:09 +00:00
fix(sync): revert sync immediately
This commit is contained in:
@@ -511,7 +511,8 @@
|
||||
:else
|
||||
(move-block-in-different-repos target-block-repo to-block-repo target-block to-block top-block bottom-block nested? top? target-child? direction target-content target-file original-top-block-start-pos block-changes))
|
||||
|
||||
(when (state/git-auto-push?)
|
||||
(doseq [repo (->> #{target-block-repo to-block-repo}
|
||||
(remove nil?))]
|
||||
(repo-handler/push repo nil)))))))
|
||||
;; (when (state/git-auto-push?)
|
||||
;; (doseq [repo (->> #{target-block-repo to-block-repo}
|
||||
;; (remove nil?))]
|
||||
;; (repo-handler/push repo nil)))
|
||||
))))
|
||||
|
||||
@@ -545,8 +545,9 @@
|
||||
(when (or (seq retract-refs) pre-block?)
|
||||
(ui-handler/re-render-root!))
|
||||
|
||||
(when (state/git-auto-push?)
|
||||
(repo-handler/push repo nil)))
|
||||
;; (when (state/git-auto-push?)
|
||||
;; (repo-handler/push repo nil))
|
||||
)
|
||||
|
||||
:else
|
||||
nil))))))
|
||||
|
||||
@@ -318,16 +318,14 @@
|
||||
(db/cloned? repo-url)
|
||||
token)
|
||||
(let [status (db/get-key-value repo-url :git/status)]
|
||||
(when (and
|
||||
(not= status :pulling)
|
||||
(or
|
||||
force-pull?
|
||||
(and
|
||||
;; (not= status :push-failed)
|
||||
(not= status :pushing)
|
||||
(empty? (state/get-changed-files repo-url))
|
||||
(not (state/get-edit-input-id))
|
||||
(not (state/in-draw-mode?)))))
|
||||
(when (or
|
||||
force-pull?
|
||||
(and
|
||||
;; (not= status :push-failed)
|
||||
(not= status :pushing)
|
||||
(empty? (state/get-changed-files repo-url))
|
||||
(not (state/get-edit-input-id))
|
||||
(not (state/in-draw-mode?))))
|
||||
(git-handler/set-git-status! repo-url :pulling)
|
||||
(let [latest-commit (db/get-key-value repo-url :git/latest-commit)]
|
||||
(->
|
||||
@@ -405,8 +403,7 @@
|
||||
(let [status (db/get-key-value repo-url :git/status)]
|
||||
(when (and
|
||||
(db/cloned? repo-url)
|
||||
(not (state/get-edit-input-id))
|
||||
(not= status :pushing))
|
||||
(not (state/get-edit-input-id)))
|
||||
(-> (p/let [files (js/window.workerThread.getChangedFiles (util/get-repo-dir (state/get-current-repo)))]
|
||||
(when (or
|
||||
;; FIXME:
|
||||
|
||||
Reference in New Issue
Block a user