(stgit-reload))
(defun stgit-goto ()
- "Go to the patch on the current line."
+ "Go to the patch on the current line.
+
+Pops or pushes patches to make this patch topmost."
(interactive)
(stgit-assert-mode)
(let ((patchsym (stgit-patch-name-at-point t)))
(set (make-local-variable 'stgit-edit-patchsym) patchsym)
(setq default-directory dir)
(let ((standard-output edit-buf))
- (stgit-run-silent "edit" "--save-template=-" patchsym))))
+ (save-excursion
+ (stgit-run-silent "edit" "--save-template=-" patchsym)))))
(defun stgit-confirm-edit ()
(interactive)
(set (make-local-variable 'stgit-patchsyms) sorted-patchsyms)
(setq default-directory dir)
(let ((result (let ((standard-output edit-buf))
- (apply 'stgit-run-silent "squash"
- "--save-template=-" sorted-patchsyms))))
+ (save-excursion
+ (apply 'stgit-run-silent "squash"
+ "--save-template=-" sorted-patchsyms)))))
;; stg squash may have reordered the patches or caused conflicts
(with-current-buffer stgit-buffer