diff options
author | Thanos Apollo <[email protected]> | 2024-01-19 15:19:41 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-01-19 15:19:41 +0200 |
commit | ade0963b47283ddf00dc37398e42d676646e129a (patch) | |
tree | 33e3083d441d0b13baf348057dff7093fce41c8d /gnosis.el | |
parent | f1d032953bae1f5dde9900cbf40364af7327bfa9 (diff) |
gnosis-review-commit: Use vc to create git repo
vc should also be used to "stage" and "commit" changes to db.
Diffstat (limited to 'gnosis.el')
-rw-r--r-- | gnosis.el | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -50,6 +50,7 @@ (require 'cl-lib) (require 'gnosis-algorithm) +(require 'vc) (defgroup gnosis nil "Spaced Repetition System For Note Taking & Self Testing." @@ -1022,9 +1023,9 @@ NOTE-NUM: The number of notes reviewed in the session." (default-directory gnosis-dir)) (unless git (error "Git not found, please install git")) - (unless (file-exists-p (concat (file-name-as-directory gnosis-dir) ".git")) - (shell-command "git init")) - (sit-for 0.2) ;; wait for shell command to finish + (unless (file-exists-p (expand-file-name ".git" gnosis-dir)) + (vc-create-repo 'Git)) + ;; TODO: Redo this using vc (shell-command (concat git " add " (shell-quote-argument "gnosis.db"))) (shell-command (concat git " commit -m " (shell-quote-argument (concat (format "Total notes for session: %d " note-num))))) |