test-sourcegraph-integration #1

Open
ajet wants to merge 5 commits from test-sourcegraph-integration into main
+12 -4
View File
@@ -6,6 +6,8 @@
[lazygitclj.git :as git]
[clojure.string :as str]))
(def temp tui/run)
;; === Model ===
(defn load-git-data []
@@ -56,7 +58,7 @@
s))
(defn get-current-diff
"Get the diff for the currently selected item based on panel and cursor."
"Change doc string for test"
[model]
(let [panel (:panel model)
items (current-items model)
@@ -90,7 +92,8 @@
;; === Update ===
(defn update-diff [model]
(assoc model :diff (get-current-diff model)))
;; never update lol
model)
(defn initial-model []
(let [base (merge
@@ -879,15 +882,20 @@
:else
background)))
(defn test-view-2 [& args]
[:box "foo"])
;; === Main ===
(def temp2 get-current-diff)
(defn -main [& _args]
(if (git/repo-root)
(do
(println "Starting lazygitclj...")
(println (str "String with initial model: " (initial-model)))
(tui/run {:init (initial-model)
:update update-model
:view view})
:view test-view-2})
(println "Goodbye!"))
(do
(println "Error: Not a git repository")