summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-02-10 07:08:37 +0200
committerThanos Apollo <[email protected]>2024-02-10 07:08:37 +0200
commitba186fb17aa30e7a589066f91cc2e6db51a2f80a (patch)
tree4eadde66fe31c4147d59fd925c1093a85494303e /gnosis.el
parentf13e1ddfef4d0a492d7ba738ff7d08b9a18ea138 (diff)
Add gnosis-auto-push-command
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el15
1 files changed, 13 insertions, 2 deletions
diff --git a/gnosis.el b/gnosis.el
index 5f9212d..b73aaa5 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -65,10 +65,21 @@ between two strings to consider them as similar."
:group 'gnosis)
(defcustom gnosis-auto-push nil
- "Automatically run `git push' at the end of every review session."
+ "Automatically run `gnosis-auto-push-command' at the end of every review session."
:type 'boolean
:group 'gnosis)
+(defcustom gnosis-auto-push-command "push"
+ "Git shell command to run at the end of a review session.
+
+Command specified will be executed when `gnosis-auto-push' is enabled.
+
+It should be provided as a string without the `git' prefix, assuming
+that git is available in the system's PATH. For example, setting it
+to \"push\" will execute the command 'git push'."
+ :type 'string
+ :group 'gnosis)
+
(defvar gnosis-images-dir (expand-file-name "images" gnosis-dir)
"Gnosis images directory.")
@@ -1027,7 +1038,7 @@ NOTE-NUM: The number of notes reviewed in the session."
(shell-command (concat git " commit -m "
(shell-quote-argument (concat (format "Total notes for session: %d " note-num)))))
(when gnosis-auto-push
- (shell-command (concat git " push")))
+ (shell-command (concat git " " gnosis-auto-push-command)))
(message "Review session finished. %d notes reviewed." note-num)))
(defun gnosis-review--session (notes)