Compare commits

5 Commits

Author SHA1 Message Date
a2ed40d348 Update src/lazygitclj/core.clj
SCIP Index / index (push) Successful in 2m38s
2026-02-04 06:16:48 -10:00
65f7d184bc Update src/lazygitclj/core.clj
SCIP Index / index (push) Successful in 2m41s
2026-02-04 06:14:22 -10:00
a7773b77d1 Update src/lazygitclj/core.clj
SCIP Index / index (push) Successful in 7m34s
2026-02-04 05:21:41 -10:00
ca1e90f130 Update src/lazygitclj/core.clj
SCIP Index / index (push) Successful in 3m38s
2026-02-04 05:12:30 -10:00
e63230af71 Update src/lazygitclj/core.clj
SCIP Index / index (push) Successful in 1m40s
2026-02-03 21:51:07 -10:00
+12 -4
View File
@@ -6,6 +6,8 @@
[lazygitclj.git :as git] [lazygitclj.git :as git]
[clojure.string :as str])) [clojure.string :as str]))
(def temp tui/run)
;; === Model === ;; === Model ===
(defn load-git-data [] (defn load-git-data []
@@ -56,7 +58,7 @@
s)) s))
(defn get-current-diff (defn get-current-diff
"Get the diff for the currently selected item based on panel and cursor." "Change doc string for test"
[model] [model]
(let [panel (:panel model) (let [panel (:panel model)
items (current-items model) items (current-items model)
@@ -90,7 +92,8 @@
;; === Update === ;; === Update ===
(defn update-diff [model] (defn update-diff [model]
(assoc model :diff (get-current-diff model))) ;; never update lol
model)
(defn initial-model [] (defn initial-model []
(let [base (merge (let [base (merge
@@ -879,15 +882,20 @@
:else :else
background))) background)))
(defn test-view-2 [& args]
[:box "foo"])
;; === Main === ;; === Main ===
(def temp2 get-current-diff)
(defn -main [& _args] (defn -main [& _args]
(if (git/repo-root) (if (git/repo-root)
(do (do
(println "Starting lazygitclj...") (println (str "String with initial model: " (initial-model)))
(tui/run {:init (initial-model) (tui/run {:init (initial-model)
:update update-model :update update-model
:view view}) :view test-view-2})
(println "Goodbye!")) (println "Goodbye!"))
(do (do
(println "Error: Not a git repository") (println "Error: Not a git repository")