fix: git diff doesn't work because we don't store the raw file content

This commit is contained in:
Tienson Qin
2021-05-09 11:25:41 +08:00
parent a1fd8425c5
commit 7349910e6f
3 changed files with 74 additions and 73 deletions

View File

@@ -22,7 +22,7 @@
(= "add" type)
(when-not (db/file-exists? repo path)
(let [_ (file-handler/alter-file repo path content {:re-render-root? true
:from-disk? true})]
:from-disk? true})]
(db/set-file-last-modified-at! repo path mtime)))
(and (= "change" type)
@@ -33,7 +33,6 @@
(not= content (db/get-file path))
(when-let [last-modified-at (db/get-file-last-modified-at repo path)]
(> mtime last-modified-at)))
(let [_ (file-handler/alter-file repo path content {:re-render-root? true
:from-disk? true})]
(db/set-file-last-modified-at! repo path mtime))