aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2015-08-15 14:44:21 +0200
committerJonas Bernoulli <jonas@bernoul.li>2015-08-15 14:44:21 +0200
commit2d60e1596fd3927b4a983aade1f9b4dd9b59b23c (patch)
treedfc2f713c31ee77dfd417f929f5575fa367e0754 /lisp
parent6b2931f57e5514fe565fd4608e60c6f91c97fb6d (diff)
magit-run-gitk-{all,branches}: new commands
Add new commands `magit-run-gitk-all' and `magit-run-gitk-branches' which call `gitk' with the respective argument. Existing command `magit-run-gitk' now always calls `gitk' without any arguments.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/magit-extras.el23
-rw-r--r--lisp/magit.el7
2 files changed, 20 insertions, 10 deletions
diff --git a/lisp/magit-extras.el b/lisp/magit-extras.el
index 6565583..28faa7d 100644
--- a/lisp/magit-extras.el
+++ b/lisp/magit-extras.el
@@ -76,13 +76,22 @@ blame to center around the line point is on."
,filename))))
;;;###autoload
-(defun magit-run-gitk (arg)
- "Run Gitk for the current git repository.
-Without a prefix argument run `gitk --all', with
-a prefix argument run gitk without any arguments."
- (interactive "P")
- (apply #'call-process magit-gitk-executable nil 0 nil
- (if arg nil (list "--all"))))
+(defun magit-run-gitk ()
+ "Run `gitk' in the current repository."
+ (interactive)
+ (call-process magit-gitk-executable nil 0))
+
+;;;###autoload
+(defun magit-run-gitk-branches ()
+ "Run `gitk --branches' in the current repository."
+ (interactive)
+ (call-process magit-gitk-executable nil 0 nil "--branches"))
+
+;;;###autoload
+(defun magit-run-gitk-all ()
+ "Run `gitk --all' in the current repository."
+ (interactive)
+ (call-process magit-gitk-executable nil 0 nil "--all"))
;;; Clean
diff --git a/lisp/magit.el b/lisp/magit.el
index 08f7f9e..70964b6 100644
--- a/lisp/magit.el
+++ b/lisp/magit.el
@@ -1990,10 +1990,11 @@ Currently this only adds the following key bindings.
:actions '((?! "Git Subcommand (in topdir)" magit-git-command-topdir)
(?k "Gitk" magit-run-gitk)
(?p "Git Subcommand (in pwd)" magit-git-command)
- (?g "Git Gui" magit-run-git-gui)
+ (?a "Gitk --all" magit-run-gitk-all)
(?s "Shell command (in topdir)" magit-shell-command-topdir)
- nil
- (?S "Shell command (in pwd)" magit-shell-command))
+ (?b "Gitk --branches" magit-run-gitk-branches)
+ (?S "Shell command (in pwd)" magit-shell-command)
+ (?g "Git Gui" magit-run-git-gui))
:default-action 'magit-git-command
:max-action-columns 2)