mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
chore: do not print error when resolving git ref failed
This commit is contained in:
@@ -6,7 +6,8 @@
|
||||
[frontend.util :as util]
|
||||
[frontend.text :as text]
|
||||
[frontend.git :as git]
|
||||
[frontend.db :as db]))
|
||||
[frontend.db :as db]
|
||||
[lambdaisland.glogi :as log]))
|
||||
|
||||
(defn get-ref
|
||||
[repo-url]
|
||||
@@ -28,17 +29,20 @@
|
||||
(gobj/get js/window "workerThread")
|
||||
(gobj/get js/window.workerThread "getChangedFiles"))
|
||||
(->
|
||||
(p/let [files (js/window.workerThread.getChangedFiles (util/get-repo-dir repo))]
|
||||
(let [files (bean/->clj files)]
|
||||
(p/let [remote-latest-commit (get-remote-ref repo)
|
||||
local-latest-commit (get-ref repo)
|
||||
descendent? (git/descendent? repo local-latest-commit remote-latest-commit)
|
||||
diffs (git/get-diffs repo local-latest-commit remote-latest-commit)]
|
||||
(let [files (if descendent?
|
||||
(->> (concat (map :path diffs) files)
|
||||
distinct)
|
||||
files)]
|
||||
(state/set-changed-files! repo files)))))
|
||||
(p/let [files (js/window.workerThread.getChangedFiles (util/get-repo-dir repo))
|
||||
files (bean/->clj files)]
|
||||
(->
|
||||
(p/let [remote-latest-commit (get-remote-ref repo)
|
||||
local-latest-commit (get-ref repo)]
|
||||
(p/let [descendent? (git/descendent? repo local-latest-commit remote-latest-commit)
|
||||
diffs (git/get-diffs repo local-latest-commit remote-latest-commit)]
|
||||
(let [files (if descendent?
|
||||
(->> (concat (map :path diffs) files)
|
||||
distinct)
|
||||
files)]
|
||||
(state/set-changed-files! repo files))))
|
||||
(p/catch (fn [error]
|
||||
(log/warn :git/ref-not-found {:error error})))))
|
||||
(p/catch (fn [error]
|
||||
(js/console.dir error)))))))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user