diff options
author | Thanos Apollo <[email protected]> | 2024-02-17 21:56:26 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-02-17 21:56:26 +0200 |
commit | c3d9f9b1b1ccb1018e66b6767ee5cb0b191858d0 (patch) | |
tree | 8793965fe8b0e6830cc1d59683150fde4351c3e2 /gnosis.el | |
parent | 2b05af78537170bd53ccbd07f998b9a4082eb3b6 (diff) |
Add gnosis-git--process
Diffstat (limited to 'gnosis.el')
-rw-r--r-- | gnosis.el | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -1025,6 +1025,18 @@ Used to reveal all clozes left with `gnosis-face-cloze-unanswered' face." (funcall func-name id))) (error "Malformed note type: '%s'" type)))) +(defun gnosis-git--process (command) + "Start a git process with COMMAND." + (let ((proc (start-process "*git-gnosis*" nil "git" command))) + ;; Filter for password prompt + (set-process-filter proc (lambda (proc string) + (when (string-match "Password\\|password\\|passphrase" string) + (process-send-string proc (read-passwd "Password: "))))) + ;; Set sentinel to delete process when done + (set-process-sentinel proc (lambda (proc event) + (when (eq 'exit (process-status proc)) + (unless (process-live-p proc) + (delete-process proc))))))) (defun gnosis-review-commit (note-num) "Commit review session on git repository. |