Stopping. (R)
This commit is contained in:
parent
25b0d795af
commit
1b6133b622
1 changed files with 21 additions and 12 deletions
33
magit.el
33
magit.el
|
@ -1290,18 +1290,6 @@ Please see the manual for a complete description of Magit.
|
||||||
"\n"))))
|
"\n"))))
|
||||||
(insert "\n"))))
|
(insert "\n"))))
|
||||||
|
|
||||||
(defun magit-rewrite-abort ()
|
|
||||||
(interactive)
|
|
||||||
(let* ((info (magit-read-rewrite-info))
|
|
||||||
(orig (cadr (assq 'orig info))))
|
|
||||||
(or info
|
|
||||||
(error "No rewrite in progress."))
|
|
||||||
(or (magit-everything-clean-p)
|
|
||||||
(error "You have uncommitted changes."))
|
|
||||||
(when (yes-or-no-p "Abort rewrite? ")
|
|
||||||
(magit-write-rewrite-info nil)
|
|
||||||
(magit-run "git" "reset" "--hard" orig))))
|
|
||||||
|
|
||||||
(defun magit-rewrite-start (from &optional onto)
|
(defun magit-rewrite-start (from &optional onto)
|
||||||
(interactive (list (magit-read-rev "Rewrite from" (magit-default-rev))))
|
(interactive (list (magit-read-rev "Rewrite from" (magit-default-rev))))
|
||||||
(or (magit-everything-clean-p)
|
(or (magit-everything-clean-p)
|
||||||
|
@ -1315,6 +1303,27 @@ Please see the manual for a complete description of Magit.
|
||||||
(pending ,@pending)))
|
(pending ,@pending)))
|
||||||
(magit-run "git" "reset" "--hard" base)))
|
(magit-run "git" "reset" "--hard" base)))
|
||||||
|
|
||||||
|
(defun magit-rewrite-stop ()
|
||||||
|
(interactive)
|
||||||
|
(let* ((info (magit-read-rewrite-info)))
|
||||||
|
(or info
|
||||||
|
(error "No rewrite in progress."))
|
||||||
|
(when (yes-or-no-p "Stop rewrite? ")
|
||||||
|
(magit-write-rewrite-info nil)
|
||||||
|
(magit-update-status (magit-find-status-buffer)))))
|
||||||
|
|
||||||
|
(defun magit-rewrite-abort ()
|
||||||
|
(interactive)
|
||||||
|
(let* ((info (magit-read-rewrite-info))
|
||||||
|
(orig (cadr (assq 'orig info))))
|
||||||
|
(or info
|
||||||
|
(error "No rewrite in progress."))
|
||||||
|
(or (magit-everything-clean-p)
|
||||||
|
(error "You have uncommitted changes."))
|
||||||
|
(when (yes-or-no-p "Abort rewrite? ")
|
||||||
|
(magit-write-rewrite-info nil)
|
||||||
|
(magit-run "git" "reset" "--hard" orig))))
|
||||||
|
|
||||||
;;; Updating, pull, and push
|
;;; Updating, pull, and push
|
||||||
|
|
||||||
(defun magit-remote-update ()
|
(defun magit-remote-update ()
|
||||||
|
|
Loading…
Reference in a new issue