Skip to content

Commit

Permalink
add gitsync opt
Browse files Browse the repository at this point in the history
  • Loading branch information
carbon-hvze committed Aug 29, 2023
1 parent 75f5da8 commit bca273a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/zd/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@
[ztx config {ev-name :ev :as ev} & opts]
(println (assoc ev ::ts (str (java.util.Date.)))))

(defn start [& [dir]]
(let [ztx (zen/new-context {:zd/dir dir})]
(defn start [& [dir gitsync]]
(let [ztx (zen/new-context {:zd/dir dir :zd/gitsync gitsync})]
(zen/read-ns ztx 'zd)
(zen/start-system ztx 'zd/system)
ztx))
Expand Down
2 changes: 1 addition & 1 deletion src/zd/store.clj
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@
:zd/all-errors true})))

(defn load-repo [ztx]
(when (:gitsync @ztx)
(when (:zd/gitsync @ztx)
(git/with-identity ident
(let [repo (git/load-repo (System/getProperty "user.dir"))
pull-result (git/git-pull repo {:ff-mode :ff :rebase-mode :none :strategy :ours})]
Expand Down
1 change: 1 addition & 0 deletions test/zd/zentext_test.clj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
(ns zd.zentext-test
(:require
;; [zd.api]
[zd.view.zentext]
[zd.zentext :as zentext]
[zen.core :as zen]
[matcho.core :as matcho]
Expand Down

0 comments on commit bca273a

Please sign in to comment.