;;
;; To start: `M-x stgit'
+(when (< emacs-major-version 22)
+ (error "Emacs older than 22 is not supported by stgit.el"))
+
(require 'git nil t)
(require 'cl)
(require 'ewoc)
("G" . stgit-goto)
("=" . stgit-diff)
("D" . stgit-delete)
- ([(control ?/)] . stgit-undo)
+ ([?\C-/] . stgit-undo)
("\C-_" . stgit-undo)
+ ([?\C-c ?\C-/] . stgit-redo)
+ ("\C-c\C-_" . stgit-redo)
("B" . stgit-branch)
("t" . ,toggle-map)
("d" . ,diff-map)
(defun stgit-undo (&optional arg)
"Run stg undo.
-With prefix argument, run it with the --hard flag."
+With prefix argument, run it with the --hard flag.
+
+See also `stgit-redo'."
(interactive "P")
(stgit-capture-output nil
(if arg
(stgit-run "undo")))
(stgit-reload))
+(defun stgit-redo (&optional arg)
+ "Run stg redo.
+With prefix argument, run it with the --hard flag.
+
+See also `stgit-undo'."
+ (interactive "P")
+ (stgit-capture-output nil
+ (if arg
+ (stgit-run "redo" "--hard")
+ (stgit-run "redo")))
+ (stgit-reload))
+
(defun stgit-refresh (&optional arg)
"Run stg refresh.
If the index contains any changes, only refresh from index.
:group 'stgit)
(defcustom stgit-default-show-worktree
- nil
+ t
"Set to non-nil to by default show the working tree in a new stgit buffer.
This value is used as the default value for `stgit-show-worktree'."