From ae4268658ff45d98a1514845d9a6d40be8242563 Mon Sep 17 00:00:00 2001 From: vindarel Date: Wed, 20 Nov 2024 10:12:30 +0100 Subject: [PATCH 1/6] legit: list stashes in status, stash push, stash pop --- extensions/legit/legit-common.lisp | 1 + extensions/legit/legit.lisp | 38 +++++++++++++++++++++++++++-- extensions/legit/porcelain-git.lisp | 18 ++++++++++++++ extensions/legit/porcelain.lisp | 23 +++++++++++++++++ 4 files changed, 78 insertions(+), 2 deletions(-) diff --git a/extensions/legit/legit-common.lisp b/extensions/legit/legit-common.lisp index 338503891..ce97ec947 100644 --- a/extensions/legit/legit-common.lisp +++ b/extensions/legit/legit-common.lisp @@ -5,6 +5,7 @@ (:export :legit-status :*prompt-for-commit-abort-p* :*ignore-all-space* + :*show-stashes* :*vcs-existence-order* :*peek-legit-keymap* :peek-legit-discard-file diff --git a/extensions/legit/legit.lisp b/extensions/legit/legit.lisp index 5541caa89..89fccfa33 100644 --- a/extensions/legit/legit.lisp +++ b/extensions/legit/legit.lisp @@ -44,6 +44,9 @@ Ongoing: Currently Git-only. Concretely, this calls Git with the -w option.") +(defvar *show-stashes* t "List stashes on the Legit status buffer.") + + ;; Supercharge patch-mode with our keys. (define-major-mode legit-diff-mode lem-patch-mode:patch-mode (:name "legit-diff" @@ -103,6 +106,10 @@ Currently Git-only. Concretely, this calls Git with the -w option.") (define-key *peek-legit-keymap* "r c" 'rebase-continue) (define-key *peek-legit-keymap* "r s" 'rebase-skip) +;; Stashes +(define-key *peek-legit-keymap* "z z" 'legit-stash-push) +(define-key *peek-legit-keymap* "z p" 'legit-stash-pop) + ;; redraw everything: (define-key *peek-legit-keymap* "g" 'legit-status) @@ -466,7 +473,7 @@ Currently Git-only. Concretely, this calls Git with the -w option.") (define-command legit-status () () - "Show changes, untracked files and latest commits in an interactive window." + "Show changes, untracked files, stashes and latest commits in an interactive window." (with-current-project (vcs) (multiple-value-bind (untracked-files unstaged-files staged-files) (lem/porcelain:components vcs) @@ -503,6 +510,15 @@ Currently Git-only. Concretely, this calls Git with the -w option.") (insert-string point file :attribute 'filename-attribute :read-only t))) (collector-insert "")) + + ;; Stashes. + (collector-insert "") + (let ((stashes (lem/porcelain:stash-list vcs))) + (collector-insert (format nil "Stashes (~a)" (length stashes)) :header t) + (when *show-stashes* + (loop for line in stashes + do (collector-insert line)))) + ;; Unstaged changes (collector-insert "") (collector-insert (format nil "Unstaged changes (~a):" (length unstaged-files)) :header t) @@ -748,6 +764,21 @@ Currently Git-only. Concretely, this calls Git with the -w option.") commits-per-page))) (display-commits-log vcs last-page-offset)))) +(define-command legit-stash-push () () + "Ask for a message and stash the current changes." + (with-current-project (vcs) + (let ((message (prompt-for-string "Stash message: "))) + (lem/porcelain::stash-push vcs :message message) + (legit-status)))) + +(define-command legit-stash-pop () () + "Pop the latest staged changes" + (with-current-project (vcs) + (let ((confirm (prompt-for-y-or-n-p "Pop the latest stash to the current branch? "))) + (when confirm + (lem/porcelain::stash-pop vcs) + (legit-status))))) + (define-command legit-quit () () "Quit" (%legit-quit) @@ -767,10 +798,12 @@ Currently Git-only. Concretely, this calls Git with the -w option.") (format s "(b)ranches-> checkout another (b)ranch.~&") (format s " -> (c)reate.~&") (format s "(l)og-> (l) commits log~&") - (format s " -> (F) first page of the commits history~&") + (format s " -> (F) first page of the commits history.~&") + (format s " Navigate commit pages with (b) and (f).~&") (format s "(F)etch, pull-> (p) from remote branch~&") (format s "(P)push -> (p) to remote branch~&") (format s "(r)ebase -> (i)nteractively from commit at point, (a)bort~&") + (format s "(z) stashes -> (z) stash changes (p)op latest stash~&") (format s "(g) -> refresh~&") (format s "~%") (format s "Navigate: n and p, C-n and C-p, M-n and M-p.~&") @@ -781,6 +814,7 @@ Currently Git-only. Concretely, this calls Git with the -w option.") (format s "~%") (format s "You can customize:~&") (format s "~%") + (format s "lem/legit:*show-stashes* : set to nil to not see the list of stashes in the status buffer~&") (format s "lem/porcelain:*nb-latest-commits* which defaults to 10~&") (format s "(and more)~&") )) diff --git a/extensions/legit/porcelain-git.lisp b/extensions/legit/porcelain-git.lisp index 47bc8ebad..7241218ea 100644 --- a/extensions/legit/porcelain-git.lisp +++ b/extensions/legit/porcelain-git.lisp @@ -437,3 +437,21 @@ I am stopping in case you still have something valuable there.")) (run-git (list "rebase" "--skip"))) (t (porcelain-error "No git rebase in process? PID not found.")))) + +(defmethod stash-push ((vcs vcs-git) &key message) + "Stash the current changes. Ask for a stash message." + (if message + (run-git (list "stash" "push" "-m" message)) + (run-git (list "stash" "push")))) + +(defmethod stash-pop ((vcs vcs-git) &key (position 0)) + "Pop the latest stashed changes." + (declare (ignorable position)) + (run-git (list "stash" "pop"))) + +(defmethod stash-list ((vcs vcs-git)) + ;; each line is like + ;; stash@{7}: On main: notes: legit vim interference + ;; just display them. + (str:lines + (run-git (list "stash" "list")))) diff --git a/extensions/legit/porcelain.lisp b/extensions/legit/porcelain.lisp index a331f34ce..5fb806578 100644 --- a/extensions/legit/porcelain.lisp +++ b/extensions/legit/porcelain.lisp @@ -28,6 +28,9 @@ :show-commit-diff :stage :unstage + :stash-list + :stash-pop + :stash-push :*diff-context-lines* :commits-log :*commits-log-page-size* @@ -257,3 +260,23 @@ M src/ext/porcelain.lisp (defgeneric rebase-skip (vcs) (:method (vcs) (porcelain-error "lem/porcelain:rebase-skip not implemented for vcs ~a" (vcs-name vcs)))) + +;;; +;;; Stash. +;;; +(defgeneric stash-push (vcs &key message) + (:method (vcs &key message) + (declare (ignorable message)) + (porcelain-error "lem/porcelain:stash not implemented for vcs ~a" (vcs-name vcs))) + (:documentation "Stash the current changes. Ask for a stash message.")) + +(defgeneric stash-pop (vcs &key position) + (:method (vcs &key position) + (declare (ignorable position)) + (porcelain-error "lem/porcelain:stash-pop not implemented for vcs ~a" (vcs-name vcs))) + (:documentation "Pop saved stashes. Defaults to the latest stash.")) + +(defgeneric stash-list (vcs) + (:method (vcs) + (values)) + (:documentation "List stashes")) From 4d53570a12529046fcb7a57092c51a4a77582354 Mon Sep 17 00:00:00 2001 From: vindarel Date: Wed, 20 Nov 2024 10:42:39 +0100 Subject: [PATCH 2/6] legit: view stash diff --- extensions/legit/legit.lisp | 19 +++++++++++++++++-- extensions/legit/porcelain-git.lisp | 9 +++++++++ extensions/legit/porcelain.lisp | 7 +++++++ 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/extensions/legit/legit.lisp b/extensions/legit/legit.lisp index 89fccfa33..082019af2 100644 --- a/extensions/legit/legit.lisp +++ b/extensions/legit/legit.lisp @@ -27,6 +27,7 @@ Done: - basic Fossil support (current branch, add change, commit) - basic Mercurial support - show the commits log, with pagination +- view stashes, stash push, stash pop Ongoing: @@ -168,6 +169,16 @@ Currently Git-only. Concretely, this calls Git with the -w option.") (setf (buffer-read-only-p buffer) t) (move-to-line (buffer-point buffer) 1))) +(defun make-stash-show-function (stash) + (lambda () + (with-current-project (vcs) + (cond + ((and (numberp stash) + (not (minusp stash))) + (show-diff (lem/porcelain:stash-show vcs :position stash))) + (t + (show-diff (format nil "=== this stash reference is not valid: ~s" stash))))))) + (defun make-diff-function (file &key cached type) (lambda () (with-current-project (vcs) @@ -516,8 +527,12 @@ Currently Git-only. Concretely, this calls Git with the -w option.") (let ((stashes (lem/porcelain:stash-list vcs))) (collector-insert (format nil "Stashes (~a)" (length stashes)) :header t) (when *show-stashes* - (loop for line in stashes - do (collector-insert line)))) + (loop :for line :in stashes + :for position := 0 :then (incf position) + :do (with-appending-source + (point :move-function (make-stash-show-function position)) + (insert-string point line + :attribute 'filename-attribute :read-only t))))) ;; Unstaged changes (collector-insert "") diff --git a/extensions/legit/porcelain-git.lisp b/extensions/legit/porcelain-git.lisp index 7241218ea..137133664 100644 --- a/extensions/legit/porcelain-git.lisp +++ b/extensions/legit/porcelain-git.lisp @@ -455,3 +455,12 @@ I am stopping in case you still have something valuable there.")) ;; just display them. (str:lines (run-git (list "stash" "list")))) + +(defmethod stash-show ((vcs vcs-git) &key position) + (if (and (numberp position) + (not (minusp position))) + (run-git (list "stash" + "show" + "-p" ;; view as patch = view diff + (princ-to-string position))) + (format nil "Invalid stash reference: ~s. We expect a positive number." position))) diff --git a/extensions/legit/porcelain.lisp b/extensions/legit/porcelain.lisp index 5fb806578..e763352b1 100644 --- a/extensions/legit/porcelain.lisp +++ b/extensions/legit/porcelain.lisp @@ -31,6 +31,7 @@ :stash-list :stash-pop :stash-push + :stash-show :*diff-context-lines* :commits-log :*commits-log-page-size* @@ -280,3 +281,9 @@ M src/ext/porcelain.lisp (:method (vcs) (values)) (:documentation "List stashes")) + +(defgeneric stash-show (vcs &key position) + (:method (vcs &key position) + (declare (ignorable position)) + (porcelain-error "lem/porcelain:stash-show not implement for vcs ~a" (vcs-name vcs))) + (:documentation "Show this stash, as a diff. Return text.")) From f60f14002dad156c7494414958fda5d9491e6821 Mon Sep 17 00:00:00 2001 From: vindarel Date: Wed, 20 Nov 2024 12:44:51 +0100 Subject: [PATCH 3/6] legit: pop stash at point --- extensions/legit/legit.lisp | 24 ++++++++++++++++++++++-- extensions/legit/peek-legit.lisp | 29 ++++++++++++++++++++++++++++- extensions/legit/porcelain-git.lisp | 9 +++++++-- 3 files changed, 57 insertions(+), 5 deletions(-) diff --git a/extensions/legit/legit.lisp b/extensions/legit/legit.lisp index 082019af2..32522a547 100644 --- a/extensions/legit/legit.lisp +++ b/extensions/legit/legit.lisp @@ -179,6 +179,18 @@ Currently Git-only. Concretely, this calls Git with the -w option.") (t (show-diff (format nil "=== this stash reference is not valid: ~s" stash))))))) +(defun make-stash-pop-function (stash) + (lambda () + (with-current-project (vcs) + (cond + ((and (numberp stash) + (not (minusp stash))) + ;; (message (format nil "let's unstash n° ~s" stash)) + (lem/porcelain:stash-pop vcs :position stash) + ) + (t + (message (format nil "=== this stash reference is not valid: ~s" stash))))))) + (defun make-diff-function (file &key cached type) (lambda () (with-current-project (vcs) @@ -530,7 +542,13 @@ Currently Git-only. Concretely, this calls Git with the -w option.") (loop :for line :in stashes :for position := 0 :then (incf position) :do (with-appending-source - (point :move-function (make-stash-show-function position)) + (point :move-function (make-stash-show-function position) + :visit-file-function (lambda () + (message "Apply this stash with (s)") + ;; Have a side effect, + ;; don't try to open a file. + (values)) + :stage-function (make-stash-pop-function position)) (insert-string point line :attribute 'filename-attribute :read-only t))))) @@ -808,7 +826,8 @@ Currently Git-only. Concretely, this calls Git with the -w option.") (format s "~%") (format s "Commands:~&") (format s "(s)tage and (u)nstage a file. Inside a diff, (s)tage or (u)nstage a hunk.~&") - (format s "(k) discard changes.~&") + (format s " pop the stash at point.~&") + (format s "(k) discard changes, drop the stash at point.~&") (format s "(c)ommit~&") (format s "(b)ranches-> checkout another (b)ranch.~&") (format s " -> (c)reate.~&") @@ -819,6 +838,7 @@ Currently Git-only. Concretely, this calls Git with the -w option.") (format s "(P)push -> (p) to remote branch~&") (format s "(r)ebase -> (i)nteractively from commit at point, (a)bort~&") (format s "(z) stashes -> (z) stash changes (p)op latest stash~&") + (format s " -> also use (s) on a stash.~&") (format s "(g) -> refresh~&") (format s "~%") (format s "Navigate: n and p, C-n and C-p, M-n and M-p.~&") diff --git a/extensions/legit/peek-legit.lisp b/extensions/legit/peek-legit.lisp index 3920e4695..31f00b439 100644 --- a/extensions/legit/peek-legit.lisp +++ b/extensions/legit/peek-legit.lisp @@ -290,7 +290,22 @@ Notes: stage-function unstage-function discard-file-function) &body body) - "Macro to use inside `with-collecting-sources' to print stuff." + "Macro to use inside `with-collecting-sources' to print stuff. + + Save the lambda functions :move-function etc to their corresponding string properties. + + A keybinding is associated to these functions. + They will dig up the lambda functions associated with these markers and run them. + + Devel note 2024: the key arguments move-function, visit-file-function etc + are now badly named. They should represent a function tied to an action: + - what to do when the point moves on this line (this is currently move-function to show diffs) + - what to do on Enter (this is currently visit-file-function) + - what to do on the `s` keybinding (currently stage-function) + etc + + Not everything represented on legit status represents a file. + We now use :visit-file-function and :stage-function to have actions on stashes." `(call-with-appending-source (lambda (,point) ,@body) ,move-function ,visit-file-function @@ -352,6 +367,16 @@ Notes: (define-command peek-legit-select () () + "Run the action stored in the :visit-file-function marker. Bound to Enter. + + By default, this function works on files: + - execute the lambda function from the marker, + - expect its return value is a file name + - and visit the file, in the context of the current VCS. + + It is possible to run actions not tied to files, for example do + something when pressing Enter on a line representing a commit stash. + The lambda function needs to return nil or (values)." (alexandria:when-let ((path (get-matched-file))) (%legit-quit) (with-current-project (vcs) @@ -378,6 +403,7 @@ Notes: (previous-move-point (current-point))) (define-command peek-legit-stage-file () () + "Get the lambda function associated with the :stage-function marker, call it, ignore side effects and refresh legit status." (alexandria:when-let* ((stage (get-stage-function (buffer-point (window-buffer *peek-window*)))) (point (funcall stage))) ;; Update the buffer, to see that a staged file goes to the staged section. @@ -386,6 +412,7 @@ Notes: point)) (define-command peek-legit-unstage-file () () + "Get the lambda function associated with the :unstage-function marker, call it, ignore side effects and refresh legit status." (alexandria:when-let* ((unstage (get-unstage-function (buffer-point (window-buffer *peek-window*)))) (point (funcall unstage))) ;; Update the buffer, to see that a staged file goes to the staged section. diff --git a/extensions/legit/porcelain-git.lisp b/extensions/legit/porcelain-git.lisp index 137133664..0cff115ec 100644 --- a/extensions/legit/porcelain-git.lisp +++ b/extensions/legit/porcelain-git.lisp @@ -446,8 +446,13 @@ I am stopping in case you still have something valuable there.")) (defmethod stash-pop ((vcs vcs-git) &key (position 0)) "Pop the latest stashed changes." - (declare (ignorable position)) - (run-git (list "stash" "pop"))) + (when (not (and (numberp position) + (not (minusp position)))) + (porcelain-error "Bad stash index: ~a. We expect a non-negative number." position)) + (run-git (list "stash" + "pop" + (format nil "stash@{~a}" position) ;; position alone works too. + ))) (defmethod stash-list ((vcs vcs-git)) ;; each line is like From 7d9e6348a0f911d5ede556c83d9fb3da66af0010 Mon Sep 17 00:00:00 2001 From: vindarel Date: Wed, 20 Nov 2024 12:49:59 +0100 Subject: [PATCH 4/6] core: set echo timeout to 2s --- src/echo.lisp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/echo.lisp b/src/echo.lisp index 6b8059a5b..39222c77e 100644 --- a/src/echo.lisp +++ b/src/echo.lisp @@ -1,6 +1,6 @@ (in-package :lem-core) -(defparameter *message-timeout* 1) +(defparameter *message-timeout* 2) (defgeneric show-message (string &key timeout style &allow-other-keys)) (defgeneric clear-message ()) From fdead4fd3190a30fdeb0e8d3fec93c2d83b21df9 Mon Sep 17 00:00:00 2001 From: vindarel Date: Wed, 20 Nov 2024 12:54:22 +0100 Subject: [PATCH 5/6] legit: drop stash at point --- extensions/legit/legit.lisp | 19 +++++++++++++++---- extensions/legit/porcelain-git.lisp | 9 +++++++++ extensions/legit/porcelain.lisp | 9 ++++++++- 3 files changed, 32 insertions(+), 5 deletions(-) diff --git a/extensions/legit/legit.lisp b/extensions/legit/legit.lisp index 32522a547..7b7fbf7a5 100644 --- a/extensions/legit/legit.lisp +++ b/extensions/legit/legit.lisp @@ -27,7 +27,7 @@ Done: - basic Fossil support (current branch, add change, commit) - basic Mercurial support - show the commits log, with pagination -- view stashes, stash push, stash pop +- view stashes, stash push, pop and drop stash at point Ongoing: @@ -185,12 +185,22 @@ Currently Git-only. Concretely, this calls Git with the -w option.") (cond ((and (numberp stash) (not (minusp stash))) - ;; (message (format nil "let's unstash n° ~s" stash)) (lem/porcelain:stash-pop vcs :position stash) ) (t (message (format nil "=== this stash reference is not valid: ~s" stash))))))) +(defun make-stash-drop-function (stash) + (lambda () + (with-current-project (vcs) + (cond + ((and (numberp stash) + (not (minusp stash))) + (when (prompt-for-y-or-n-p "Drop stash? ")) + (lem/porcelain:stash-drop vcs :position stash)) + (t + (message (format nil "=== this stash reference is not valid: ~s" stash))))))) + (defun make-diff-function (file &key cached type) (lambda () (with-current-project (vcs) @@ -548,7 +558,8 @@ Currently Git-only. Concretely, this calls Git with the -w option.") ;; Have a side effect, ;; don't try to open a file. (values)) - :stage-function (make-stash-pop-function position)) + :stage-function (make-stash-pop-function position) + :discard-file-function (make-stash-drop-function position)) (insert-string point line :attribute 'filename-attribute :read-only t))))) @@ -838,7 +849,7 @@ Currently Git-only. Concretely, this calls Git with the -w option.") (format s "(P)push -> (p) to remote branch~&") (format s "(r)ebase -> (i)nteractively from commit at point, (a)bort~&") (format s "(z) stashes -> (z) stash changes (p)op latest stash~&") - (format s " -> also use (s) on a stash.~&") + (format s " -> also use (s) and (k) on a stash.~&") (format s "(g) -> refresh~&") (format s "~%") (format s "Navigate: n and p, C-n and C-p, M-n and M-p.~&") diff --git a/extensions/legit/porcelain-git.lisp b/extensions/legit/porcelain-git.lisp index 0cff115ec..2d4e30f42 100644 --- a/extensions/legit/porcelain-git.lisp +++ b/extensions/legit/porcelain-git.lisp @@ -454,6 +454,15 @@ I am stopping in case you still have something valuable there.")) (format nil "stash@{~a}" position) ;; position alone works too. ))) +(defmethod stash-drop ((vcs vcs-git) &key position) + "drop this stash." + (when (not (and (numberp position) + (not (minusp position)))) + (porcelain-error "Bad stash index: ~a. We expect a non-negative number." position)) + (run-git (list "stash" + "drop" + (format nil "stash@{~a}" position)))) + (defmethod stash-list ((vcs vcs-git)) ;; each line is like ;; stash@{7}: On main: notes: legit vim interference diff --git a/extensions/legit/porcelain.lisp b/extensions/legit/porcelain.lisp index e763352b1..50288571d 100644 --- a/extensions/legit/porcelain.lisp +++ b/extensions/legit/porcelain.lisp @@ -37,7 +37,8 @@ :*commits-log-page-size* :commit-count :*nb-latest-commits* - :vcs-project) + :vcs-project + :stash-drop) (:documentation "Functions to run VCS operations: get the list of changes, of untracked files, commit, push… Git support is the main goal, a simple layer is used with other VCS systems (Fossil, Mercurial). On interactive commands, Legit will check what VCS is in use in the current project. @@ -277,6 +278,12 @@ M src/ext/porcelain.lisp (porcelain-error "lem/porcelain:stash-pop not implemented for vcs ~a" (vcs-name vcs))) (:documentation "Pop saved stashes. Defaults to the latest stash.")) +(defgeneric stash-drop (vcs &key position) + (:method (vcs &key position) + (declare (ignorable position)) + (porcelain-error "lem/porcelain:stash-drop not implemented for vcs ~a" (vcs-name vcs))) + (:documentation "drop this stash.")) + (defgeneric stash-list (vcs) (:method (vcs) (values)) From 7c4d41965c8ab9e4c46d34a21dfb2690e0ba9fd4 Mon Sep 17 00:00:00 2001 From: vindarel Date: Wed, 20 Nov 2024 13:08:47 +0100 Subject: [PATCH 6/6] legit: don't shadow cl:push, add notification on git push --- extensions/legit/legit.lisp | 4 +++- extensions/legit/porcelain-git.lisp | 4 +--- extensions/legit/porcelain.lisp | 10 ++++------ 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/extensions/legit/legit.lisp b/extensions/legit/legit.lisp index 7b7fbf7a5..850515ac9 100644 --- a/extensions/legit/legit.lisp +++ b/extensions/legit/legit.lisp @@ -700,7 +700,9 @@ Currently Git-only. Concretely, this calls Git with the -w option.") (define-command legit-push () () "Push changes to the current remote." (with-current-project (vcs) - (run-function (lambda () (lem/porcelain:push vcs))))) + (run-function (lambda () + (lem/porcelain:push-default vcs)) + :message "Done"))) (define-command legit-rebase-interactive () () "Rebase interactively, from the commit the point is on. diff --git a/extensions/legit/porcelain-git.lisp b/extensions/legit/porcelain-git.lisp index 2d4e30f42..d73cc0cbf 100644 --- a/extensions/legit/porcelain-git.lisp +++ b/extensions/legit/porcelain-git.lisp @@ -2,8 +2,6 @@ (:use :cl ;; let's import all the classes and methods defined in the main porcelain: :lem/porcelain) - ;; beware, we still shadow cl:push to have a "push" method: - (:shadow :push) (:import-from :trivial-types :proper-list) (:export :git-project-p) @@ -166,7 +164,7 @@ allows to learn about the file state: modified, deleted, ignored… " ;; xxx: recurse submodules, etc. (run-git (list "pull"))) -(defmethod push ((vcs vcs-git)) +(defmethod push-default ((vcs vcs-git)) (run-git (list "push"))) (defmethod current-branch ((vcs vcs-git)) diff --git a/extensions/legit/porcelain.lisp b/extensions/legit/porcelain.lisp index 50288571d..8999691c0 100644 --- a/extensions/legit/porcelain.lisp +++ b/extensions/legit/porcelain.lisp @@ -1,8 +1,6 @@ (uiop:define-package :lem/porcelain (:use :cl) - ;; beware, we shadow cl:push to have a "push" method: - (:shadow :push) (:import-from :trivial-types :proper-list) (:export @@ -19,7 +17,7 @@ :file-diff :latest-commits :pull - :push + :push-default :rebase-abort :rebase-continue :rebase-interactively @@ -237,10 +235,10 @@ M src/ext/porcelain.lisp (:method (vcs) (porcelain-error "lem/porcelain:pull not implemented for vcs ~a" (vcs-name vcs)))) -(defgeneric push (vcs) - (:documentation "Pushes to remotes") +(defgeneric push-default (vcs) + (:documentation "Pushes to default remote.") (:method (vcs) - (porcelain-error "lem/porcelain:push not implemented for vcs ~a" (vcs-name vcs)))) + (porcelain-error "lem/porcelain:push-default not implemented for vcs ~a" (vcs-name vcs)))) ;; Interactive rebase (defgeneric rebase-interactively (vcs &key from)