diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/km-magit.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/km-magit.el b/lisp/km-magit.el index 7f339cd..953b8f9 100644 --- a/lisp/km-magit.el +++ b/lisp/km-magit.el @@ -220,15 +220,15 @@ START-POINT set to the current branch. (error "bug: version re should always match")))) (km/magit-branch-get-set branch suffix))))) -(defun km/magit-branch-backup-current (&optional suffix) +(defun km/magit-branch-checkpoint (&optional suffix) "Create a backup branch for the current branch. -Name it as '<current-branch>__v<n>', where <n> is incremented +Name it as '<current-branch>__cp<n>', where <n> is incremented to form a refname that doesn't already exist. With the prefix argument SUFFIX, prompt for a suffix to use instead of 'v'." (interactive (list (and current-prefix-arg (magit-read-string-ns "Backup suffix")))) - (setq suffix (or suffix "v")) + (setq suffix (or suffix "cp")) (let* ((current (or (magit-get-current-branch) (user-error "No current branch"))) (versions (km/magit-branch--get-versions current suffix))) @@ -239,6 +239,10 @@ argument SUFFIX, prompt for a suffix to use instead of suffix (if (null versions) 1 (1+ (apply #'max versions))))))) +(defun km/magit-branch-version () + (interactive) + (km/magit-branch-checkpoint "v")) + (defun km/magit-branch-archive (branches) "Move BRANCHES from refs/heads/ to refs/archive/." (interactive |