summaryrefslogtreecommitdiff
path: root/lisp/km-magit.el
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2018-08-04 10:17:40 -0400
committerKyle Meyer <kyle@kyleam.com>2018-12-09 12:30:26 -0500
commitf068d95816878e4335f7ce293c2e93e639d5d197 (patch)
tree79e6c1af159ba1af1f5c793a50143b577c86b105 /lisp/km-magit.el
parent6474a25cda7585a611172320b84a137e50749cfc (diff)
downloademacs.d-f068d95816878e4335f7ce293c2e93e639d5d197.tar.gz
Delete some infrequently used custom Magit commands
I used many of these heavily at some point, but due to some combination of changes in my preferences/workflows and changes in Magit, I rarely use any of these now.
Diffstat (limited to 'lisp/km-magit.el')
-rw-r--r--lisp/km-magit.el65
1 files changed, 0 insertions, 65 deletions
diff --git a/lisp/km-magit.el b/lisp/km-magit.el
index 663fcde..69f5f2b 100644
--- a/lisp/km-magit.el
+++ b/lisp/km-magit.el
@@ -146,30 +146,6 @@ namespace."
((magit-remote-branch-p rev)
(format "Merge pull request #%s from %s" pr rev)))))
-(defun km/magit-push-all ()
- "Push all branches."
- (interactive)
- (magit-run-git-async "push" "-v"
- (magit-read-remote "Remote")
- "--all"))
-
-(defun km/magit-push-head (remote &optional args)
- "Push the current branch to same name on REMOTE.
-\n(git push [ARGS] REMOTE HEAD)"
- (interactive (list (magit-read-remote "Remote") (magit-push-arguments)))
- (magit-run-git-async "push" "-v" args remote "HEAD"))
-
-(defun km/magit-checkout-local-tracking (remote-branch)
- "Create and check out a local tracking branch for REMOTE-BRANCH.
-\n(git checkout -t REMOTE-BRANCH\)"
- (interactive
- (list (let ((branches (magit-list-remote-branch-names)))
- (magit-completing-read
- "Remote branch" branches nil t nil nil
- (car (member (magit-branch-or-commit-at-point)
- branches))))))
- (magit-run-git "checkout" "-t" remote-branch))
-
(defun km/magit-branch-rename (old new &optional force)
"Like `magit-branch-rename', but use old branch as initial prompt."
(interactive
@@ -181,47 +157,6 @@ namespace."
(unless (string= old new)
(magit-run-git "branch" (if force "-M" "-m") old new)))
-(defun km/magit-delete-previous-branch (&optional force)
- "Delete the previous branch.
-\n(git branch -d @{-1})"
- (interactive "P")
- (magit-run-git "branch" (if force "-D" "-d") "@{-1}"))
-
-(defun km/magit-checkout-previous-branch ()
- "Check out the previous branch.
-\n(git checkout -)"
- (interactive)
- (magit-run-git "checkout" "-"))
-
-(defun km/magit-list-recent-refs (n &optional remote)
- "List the N-most recent refs.
-If REMOTE is non-nil, limit the results to remote refs."
- (magit-git-lines
- "for-each-ref" "--sort=-committerdate" "--format=%(refname:short)"
- (format "--count=%s" n)
- (if remote "refs/remotes" "refs/heads")))
-
-(defun km/magit-checkout-recent-ref (n)
- "Check out branch from N-most recent refs.
-Refs are sorted by committer date."
- (interactive (list (or (and current-prefix-arg
- (prefix-numeric-value current-prefix-arg))
- 5)))
- (magit-run-git "checkout"
- (magit-completing-read
- "Ref" (km/magit-list-recent-refs n))))
-
-(defun km/magit-checkout-track-recent-ref (n)
- "Create and check out a local tracking branch.
-Listed refs are limited to th eN-most recent, sorted by committer
-date."
- (interactive (list (or (and current-prefix-arg
- (prefix-numeric-value current-prefix-arg))
- 5)))
- (magit-run-git "checkout" "-t"
- (magit-completing-read
- "Ref" (km/magit-list-recent-refs n 'remote))))
-
(defun km/magit-checkout-master ()
"Check out master branch.
\n(git checkout master)"