branch: elpa/gnosis commit e5a7e607dc0785b6951a73e7148b83253bfbb789 Author: Thanos Apollo <pub...@thanosapollo.org> Commit: Thanos Apollo <pub...@thanosapollo.org>
[fix] Use when statement for auto-push. --- gnosis.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gnosis.el b/gnosis.el index c5ac6e863c..65032d3a97 100644 --- a/gnosis.el +++ b/gnosis.el @@ -1346,7 +1346,7 @@ If NEW? is non-nil, increment new notes log by 1." ;;;###autoload (cl-defun gnosis-vc-pull (&optional (dir gnosis-dir)) - "Run `vc-pull' in DIR." + "Run `git pull' in DIR." (interactive) (let ((default-directory dir)) ;; TODO: Try to use a vc instead of shell-command @@ -1376,7 +1376,9 @@ the changes with a message containing the reviewed number NOTE-NUM." (format "%s add gnosis.db" git)) (gnosis--shell-cmd-with-password (format "%s commit -m 'Total notes reviewed: %d'" git note-num))) - (and gnosis-vc-auto-push (not gnosis-testing) (gnosis-vc-push)) + (sit-for 0.1) + (when (and gnosis-vc-auto-push (not gnosis-testing)) + (gnosis-vc-push)) (message "Review session finished. %d notes reviewed." note-num))) (defun gnosis-review-action--edit (success note note-count)