Update packages
This commit is contained in:
parent
370e6e91af
commit
23962832ec
@ -1,9 +1,9 @@
|
|||||||
;;; async-autoloads.el --- automatically extracted autoloads
|
;;; async-autoloads.el --- automatically extracted autoloads
|
||||||
;;
|
;;
|
||||||
;;; Code:
|
;;; Code:
|
||||||
(add-to-list 'load-path (or (file-name-directory #$) (car load-path)))
|
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
|
||||||
|
|
||||||
;;;### (autoloads nil "async" "async.el" (22404 60275 161929 555000))
|
;;;### (autoloads nil "async" "async.el" (22525 59329 588470 914000))
|
||||||
;;; Generated autoloads from async.el
|
;;; Generated autoloads from async.el
|
||||||
|
|
||||||
(autoload 'async-start-process "async" "\
|
(autoload 'async-start-process "async" "\
|
||||||
@ -68,8 +68,8 @@ returns nil. It can still be useful, however, as an argument to
|
|||||||
|
|
||||||
;;;***
|
;;;***
|
||||||
|
|
||||||
;;;### (autoloads nil "async-bytecomp" "async-bytecomp.el" (22404
|
;;;### (autoloads nil "async-bytecomp" "async-bytecomp.el" (22525
|
||||||
;;;;;; 60275 153929 514000))
|
;;;;;; 59329 584470 885000))
|
||||||
;;; Generated autoloads from async-bytecomp.el
|
;;; Generated autoloads from async-bytecomp.el
|
||||||
|
|
||||||
(autoload 'async-byte-recompile-directory "async-bytecomp" "\
|
(autoload 'async-byte-recompile-directory "async-bytecomp" "\
|
||||||
@ -80,7 +80,8 @@ All *.elc files are systematically deleted before proceeding.
|
|||||||
|
|
||||||
(defvar async-bytecomp-package-mode nil "\
|
(defvar async-bytecomp-package-mode nil "\
|
||||||
Non-nil if Async-Bytecomp-Package mode is enabled.
|
Non-nil if Async-Bytecomp-Package mode is enabled.
|
||||||
See the command `async-bytecomp-package-mode' for a description of this minor mode.
|
See the `async-bytecomp-package-mode' command
|
||||||
|
for a description of this minor mode.
|
||||||
Setting this variable directly does not take effect;
|
Setting this variable directly does not take effect;
|
||||||
either customize it (see the info node `Easy Customization')
|
either customize it (see the info node `Easy Customization')
|
||||||
or call the function `async-bytecomp-package-mode'.")
|
or call the function `async-bytecomp-package-mode'.")
|
||||||
@ -96,13 +97,14 @@ Async compilation of packages can be controlled by
|
|||||||
|
|
||||||
;;;***
|
;;;***
|
||||||
|
|
||||||
;;;### (autoloads nil "dired-async" "dired-async.el" (22404 60275
|
;;;### (autoloads nil "dired-async" "dired-async.el" (22525 59329
|
||||||
;;;;;; 137929 430000))
|
;;;;;; 572470 801000))
|
||||||
;;; Generated autoloads from dired-async.el
|
;;; Generated autoloads from dired-async.el
|
||||||
|
|
||||||
(defvar dired-async-mode nil "\
|
(defvar dired-async-mode nil "\
|
||||||
Non-nil if Dired-Async mode is enabled.
|
Non-nil if Dired-Async mode is enabled.
|
||||||
See the command `dired-async-mode' for a description of this minor mode.
|
See the `dired-async-mode' command
|
||||||
|
for a description of this minor mode.
|
||||||
Setting this variable directly does not take effect;
|
Setting this variable directly does not take effect;
|
||||||
either customize it (see the info node `Easy Customization')
|
either customize it (see the info node `Easy Customization')
|
||||||
or call the function `dired-async-mode'.")
|
or call the function `dired-async-mode'.")
|
||||||
@ -116,8 +118,8 @@ Do dired actions asynchronously.
|
|||||||
|
|
||||||
;;;***
|
;;;***
|
||||||
|
|
||||||
;;;### (autoloads nil nil ("async-pkg.el" "smtpmail-async.el") (22404
|
;;;### (autoloads nil nil ("async-pkg.el" "smtpmail-async.el") (22525
|
||||||
;;;;;; 60275 190952 741000))
|
;;;;;; 59329 592470 942000))
|
||||||
|
|
||||||
;;;***
|
;;;***
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
(define-package "async" "20160711.2235" "Asynchronous processing in Emacs" 'nil :keywords
|
(define-package "async" "20161010.2322" "Asynchronous processing in Emacs" 'nil :keywords
|
||||||
'("async")
|
'("async")
|
||||||
:url "https://github.com/jwiegley/emacs-async")
|
:url "https://github.com/jwiegley/emacs-async")
|
||||||
;; Local Variables:
|
;; Local Variables:
|
@ -262,7 +262,7 @@ ESC or `q' to not overwrite any of the remaining files,
|
|||||||
for destp = (file-exists-p to)
|
for destp = (file-exists-p to)
|
||||||
do (and bf destp
|
do (and bf destp
|
||||||
(with-current-buffer bf
|
(with-current-buffer bf
|
||||||
(set-visited-file-name to nil t))))))))
|
(set-visited-file-name to t t))))))))
|
||||||
;; Start async process.
|
;; Start async process.
|
||||||
(when async-fn-list
|
(when async-fn-list
|
||||||
(async-start `(lambda ()
|
(async-start `(lambda ()
|
@ -3,8 +3,8 @@
|
|||||||
;;; Code:
|
;;; Code:
|
||||||
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
|
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
|
||||||
|
|
||||||
;;;### (autoloads nil "git-rebase" "git-rebase.el" (22523 21243 636405
|
;;;### (autoloads nil "git-rebase" "git-rebase.el" (22525 59336 620520
|
||||||
;;;;;; 758000))
|
;;;;;; 53000))
|
||||||
;;; Generated autoloads from git-rebase.el
|
;;; Generated autoloads from git-rebase.el
|
||||||
|
|
||||||
(autoload 'git-rebase-mode "git-rebase" "\
|
(autoload 'git-rebase-mode "git-rebase" "\
|
||||||
@ -23,7 +23,7 @@ running 'man git-rebase' at the command line) for details.
|
|||||||
|
|
||||||
;;;***
|
;;;***
|
||||||
|
|
||||||
;;;### (autoloads nil "magit" "magit.el" (22523 21243 716406 348000))
|
;;;### (autoloads nil "magit" "magit.el" (22525 59336 712520 692000))
|
||||||
;;; Generated autoloads from magit.el
|
;;; Generated autoloads from magit.el
|
||||||
|
|
||||||
(autoload 'magit-status "magit" "\
|
(autoload 'magit-status "magit" "\
|
||||||
@ -501,8 +501,8 @@ Git, and Emacs in the echo area.
|
|||||||
|
|
||||||
;;;***
|
;;;***
|
||||||
|
|
||||||
;;;### (autoloads nil "magit-apply" "magit-apply.el" (22523 21243
|
;;;### (autoloads nil "magit-apply" "magit-apply.el" (22525 59336
|
||||||
;;;;;; 656405 906000))
|
;;;;;; 648520 248000))
|
||||||
;;; Generated autoloads from magit-apply.el
|
;;; Generated autoloads from magit-apply.el
|
||||||
|
|
||||||
(autoload 'magit-stage-file "magit-apply" "\
|
(autoload 'magit-stage-file "magit-apply" "\
|
||||||
@ -538,8 +538,8 @@ Remove all changes from the staging area.
|
|||||||
|
|
||||||
;;;***
|
;;;***
|
||||||
|
|
||||||
;;;### (autoloads nil "magit-autorevert" "magit-autorevert.el" (22523
|
;;;### (autoloads nil "magit-autorevert" "magit-autorevert.el" (22525
|
||||||
;;;;;; 21243 588405 405000))
|
;;;;;; 59336 588519 830000))
|
||||||
;;; Generated autoloads from magit-autorevert.el
|
;;; Generated autoloads from magit-autorevert.el
|
||||||
|
|
||||||
(defvar magit-revert-buffers t)
|
(defvar magit-revert-buffers t)
|
||||||
@ -568,8 +568,8 @@ See `auto-revert-mode' for more information on Auto-Revert mode.
|
|||||||
|
|
||||||
;;;***
|
;;;***
|
||||||
|
|
||||||
;;;### (autoloads nil "magit-bisect" "magit-bisect.el" (22523 21243
|
;;;### (autoloads nil "magit-bisect" "magit-bisect.el" (22525 59336
|
||||||
;;;;;; 652405 876000))
|
;;;;;; 640520 192000))
|
||||||
;;; Generated autoloads from magit-bisect.el
|
;;; Generated autoloads from magit-bisect.el
|
||||||
(autoload 'magit-bisect-popup "magit-bisect" nil t)
|
(autoload 'magit-bisect-popup "magit-bisect" nil t)
|
||||||
|
|
||||||
@ -620,8 +620,8 @@ bisect run'.
|
|||||||
|
|
||||||
;;;***
|
;;;***
|
||||||
|
|
||||||
;;;### (autoloads nil "magit-blame" "magit-blame.el" (22523 21243
|
;;;### (autoloads nil "magit-blame" "magit-blame.el" (22525 59336
|
||||||
;;;;;; 704406 260000))
|
;;;;;; 700520 609000))
|
||||||
;;; Generated autoloads from magit-blame.el
|
;;; Generated autoloads from magit-blame.el
|
||||||
(autoload 'magit-blame-popup "magit-blame" nil t)
|
(autoload 'magit-blame-popup "magit-blame" nil t)
|
||||||
|
|
||||||
@ -645,8 +645,8 @@ only arguments available from `magit-blame-popup' should be used.
|
|||||||
|
|
||||||
;;;***
|
;;;***
|
||||||
|
|
||||||
;;;### (autoloads nil "magit-commit" "magit-commit.el" (22523 21243
|
;;;### (autoloads nil "magit-commit" "magit-commit.el" (22525 59336
|
||||||
;;;;;; 604405 523000))
|
;;;;;; 592519 858000))
|
||||||
;;; Generated autoloads from magit-commit.el
|
;;; Generated autoloads from magit-commit.el
|
||||||
|
|
||||||
(autoload 'magit-commit "magit-commit" "\
|
(autoload 'magit-commit "magit-commit" "\
|
||||||
@ -728,8 +728,8 @@ Create a squash commit targeting COMMIT and instantly rebase.
|
|||||||
|
|
||||||
;;;***
|
;;;***
|
||||||
|
|
||||||
;;;### (autoloads nil "magit-diff" "magit-diff.el" (22523 21243 696406
|
;;;### (autoloads nil "magit-diff" "magit-diff.el" (22525 59336 696520
|
||||||
;;;;;; 200000))
|
;;;;;; 581000))
|
||||||
;;; Generated autoloads from magit-diff.el
|
;;; Generated autoloads from magit-diff.el
|
||||||
|
|
||||||
(autoload 'magit-diff-popup "magit-diff" "\
|
(autoload 'magit-diff-popup "magit-diff" "\
|
||||||
@ -813,8 +813,8 @@ for a revision.
|
|||||||
|
|
||||||
;;;***
|
;;;***
|
||||||
|
|
||||||
;;;### (autoloads nil "magit-ediff" "magit-ediff.el" (22523 21243
|
;;;### (autoloads nil "magit-ediff" "magit-ediff.el" (22525 59336
|
||||||
;;;;;; 684406 112000))
|
;;;;;; 684520 498000))
|
||||||
;;; Generated autoloads from magit-ediff.el
|
;;; Generated autoloads from magit-ediff.el
|
||||||
(autoload 'magit-ediff-popup "magit-ediff" nil t)
|
(autoload 'magit-ediff-popup "magit-ediff" nil t)
|
||||||
|
|
||||||
@ -902,8 +902,8 @@ stash that were staged.
|
|||||||
|
|
||||||
;;;***
|
;;;***
|
||||||
|
|
||||||
;;;### (autoloads nil "magit-extras" "magit-extras.el" (22523 21243
|
;;;### (autoloads nil "magit-extras" "magit-extras.el" (22525 59336
|
||||||
;;;;;; 608405 552000))
|
;;;;;; 596519 887000))
|
||||||
;;; Generated autoloads from magit-extras.el
|
;;; Generated autoloads from magit-extras.el
|
||||||
|
|
||||||
(autoload 'magit-run-git-gui "magit-extras" "\
|
(autoload 'magit-run-git-gui "magit-extras" "\
|
||||||
@ -973,8 +973,8 @@ on a position in a file-visiting buffer.
|
|||||||
|
|
||||||
;;;***
|
;;;***
|
||||||
|
|
||||||
;;;### (autoloads nil "magit-log" "magit-log.el" (22523 21243 692406
|
;;;### (autoloads nil "magit-log" "magit-log.el" (22525 59336 692520
|
||||||
;;;;;; 171000))
|
;;;;;; 553000))
|
||||||
;;; Generated autoloads from magit-log.el
|
;;; Generated autoloads from magit-log.el
|
||||||
|
|
||||||
(autoload 'magit-log-buffer-file-popup "magit-log" "\
|
(autoload 'magit-log-buffer-file-popup "magit-log" "\
|
||||||
@ -1056,8 +1056,8 @@ Show commits in a branch that are not merged in the upstream branch.
|
|||||||
|
|
||||||
;;;***
|
;;;***
|
||||||
|
|
||||||
;;;### (autoloads nil "magit-remote" "magit-remote.el" (22523 21243
|
;;;### (autoloads nil "magit-remote" "magit-remote.el" (22525 59336
|
||||||
;;;;;; 740406 526000))
|
;;;;;; 728520 804000))
|
||||||
;;; Generated autoloads from magit-remote.el
|
;;; Generated autoloads from magit-remote.el
|
||||||
|
|
||||||
(autoload 'magit-clone "magit-remote" "\
|
(autoload 'magit-clone "magit-remote" "\
|
||||||
@ -1289,8 +1289,8 @@ is asked to pull. START has to be reachable from that commit.
|
|||||||
|
|
||||||
;;;***
|
;;;***
|
||||||
|
|
||||||
;;;### (autoloads nil "magit-sequence" "magit-sequence.el" (22523
|
;;;### (autoloads nil "magit-sequence" "magit-sequence.el" (22525
|
||||||
;;;;;; 21243 724406 407000))
|
;;;;;; 59336 716520 720000))
|
||||||
;;; Generated autoloads from magit-sequence.el
|
;;; Generated autoloads from magit-sequence.el
|
||||||
|
|
||||||
(autoload 'magit-sequencer-continue "magit-sequence" "\
|
(autoload 'magit-sequencer-continue "magit-sequence" "\
|
||||||
@ -1440,8 +1440,8 @@ Abort the current rebase operation, restoring the original branch.
|
|||||||
|
|
||||||
;;;***
|
;;;***
|
||||||
|
|
||||||
;;;### (autoloads nil "magit-stash" "magit-stash.el" (22523 21243
|
;;;### (autoloads nil "magit-stash" "magit-stash.el" (22525 59336
|
||||||
;;;;;; 672406 24000))
|
;;;;;; 668520 386000))
|
||||||
;;; Generated autoloads from magit-stash.el
|
;;; Generated autoloads from magit-stash.el
|
||||||
(autoload 'magit-stash-popup "magit-stash" nil t)
|
(autoload 'magit-stash-popup "magit-stash" nil t)
|
||||||
|
|
||||||
@ -1540,8 +1540,8 @@ Show all diffs of a stash in a buffer.
|
|||||||
|
|
||||||
;;;***
|
;;;***
|
||||||
|
|
||||||
;;;### (autoloads nil "magit-submodule" "magit-submodule.el" (22523
|
;;;### (autoloads nil "magit-submodule" "magit-submodule.el" (22525
|
||||||
;;;;;; 21243 760406 672000))
|
;;;;;; 59336 744520 915000))
|
||||||
;;; Generated autoloads from magit-submodule.el
|
;;; Generated autoloads from magit-submodule.el
|
||||||
(autoload 'magit-submodule-popup "magit-submodule" nil t)
|
(autoload 'magit-submodule-popup "magit-submodule" nil t)
|
||||||
|
|
||||||
@ -1631,8 +1631,8 @@ Display a list of the current repository's submodules.
|
|||||||
|
|
||||||
;;;***
|
;;;***
|
||||||
|
|
||||||
;;;### (autoloads nil "magit-subtree" "magit-subtree.el" (22523 21243
|
;;;### (autoloads nil "magit-subtree" "magit-subtree.el" (22525 59336
|
||||||
;;;;;; 640405 788000))
|
;;;;;; 628520 107000))
|
||||||
;;; Generated autoloads from magit-subtree.el
|
;;; Generated autoloads from magit-subtree.el
|
||||||
(autoload 'magit-subtree-popup "magit-subtree" nil t)
|
(autoload 'magit-subtree-popup "magit-subtree" nil t)
|
||||||
|
|
||||||
@ -1668,8 +1668,8 @@ Extract the history of the subtree PREFIX.
|
|||||||
|
|
||||||
;;;***
|
;;;***
|
||||||
|
|
||||||
;;;### (autoloads nil "magit-wip" "magit-wip.el" (22523 21243 620405
|
;;;### (autoloads nil "magit-wip" "magit-wip.el" (22525 59336 608519
|
||||||
;;;;;; 640000))
|
;;;;;; 969000))
|
||||||
;;; Generated autoloads from magit-wip.el
|
;;; Generated autoloads from magit-wip.el
|
||||||
|
|
||||||
(defvar magit-wip-after-save-mode nil "\
|
(defvar magit-wip-after-save-mode nil "\
|
||||||
@ -1739,7 +1739,7 @@ command which is about to be called are committed.
|
|||||||
|
|
||||||
;;;### (autoloads nil nil ("magit-core.el" "magit-git.el" "magit-mode.el"
|
;;;### (autoloads nil nil ("magit-core.el" "magit-git.el" "magit-mode.el"
|
||||||
;;;;;; "magit-pkg.el" "magit-process.el" "magit-section.el" "magit-utils.el")
|
;;;;;; "magit-pkg.el" "magit-process.el" "magit-section.el" "magit-utils.el")
|
||||||
;;;;;; (22523 21243 744406 555000))
|
;;;;;; (22525 59336 732520 832000))
|
||||||
|
|
||||||
;;;***
|
;;;***
|
||||||
|
|
@ -1065,8 +1065,7 @@ the buffer in another window."
|
|||||||
(--when-let (car magit-refresh-args)
|
(--when-let (car magit-refresh-args)
|
||||||
(and (string-match "\\.\\.\\([^.].*\\)?[ \t]*\\'" it)
|
(and (string-match "\\.\\.\\([^.].*\\)?[ \t]*\\'" it)
|
||||||
(match-string 1 it))))
|
(match-string 1 it))))
|
||||||
((derived-mode-p 'magit-status-mode)
|
))
|
||||||
(magit-rev-name "HEAD"))))
|
|
||||||
(unmerged-p (magit-anything-unmerged-p file))
|
(unmerged-p (magit-anything-unmerged-p file))
|
||||||
hunk line col buffer)
|
hunk line col buffer)
|
||||||
(pcase (magit-diff-scope)
|
(pcase (magit-diff-scope)
|
||||||
@ -1083,6 +1082,8 @@ the buffer in another window."
|
|||||||
(`list
|
(`list
|
||||||
(setq hunk (car (magit-section-children
|
(setq hunk (car (magit-section-children
|
||||||
(car (magit-section-children current)))))))
|
(car (magit-section-children current)))))))
|
||||||
|
(when (and rev (magit-rev-head-p rev))
|
||||||
|
(setq rev nil))
|
||||||
(when (and hunk
|
(when (and hunk
|
||||||
;; Currently the `hunk' type is also abused for file
|
;; Currently the `hunk' type is also abused for file
|
||||||
;; mode changes. Luckily such sections have no value.
|
;; mode changes. Luckily such sections have no value.
|
||||||
@ -1096,12 +1097,16 @@ the buffer in another window."
|
|||||||
(magit-display-file-buffer buffer)
|
(magit-display-file-buffer buffer)
|
||||||
(with-current-buffer buffer
|
(with-current-buffer buffer
|
||||||
(when line
|
(when line
|
||||||
(save-restriction
|
(let ((pos (save-restriction
|
||||||
(widen)
|
(widen)
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(forward-line (1- line))
|
(forward-line (1- line))
|
||||||
(when col
|
(when col
|
||||||
(move-to-column col))))
|
(move-to-column col))
|
||||||
|
(point))))
|
||||||
|
(unless (<= (point-min) pos (point-max))
|
||||||
|
(widen)
|
||||||
|
(goto-char pos))))
|
||||||
(when unmerged-p
|
(when unmerged-p
|
||||||
(smerge-start-session))
|
(smerge-start-session))
|
||||||
(run-hooks 'magit-diff-visit-file-hook)))))
|
(run-hooks 'magit-diff-visit-file-hook)))))
|
||||||
@ -1151,9 +1156,12 @@ or `HEAD'."
|
|||||||
(stop (line-number-at-pos))
|
(stop (line-number-at-pos))
|
||||||
(cstart (save-excursion (goto-char cpos)
|
(cstart (save-excursion (goto-char cpos)
|
||||||
(line-number-at-pos)))
|
(line-number-at-pos)))
|
||||||
(prior (save-excursion (goto-char (line-beginning-position))
|
(prior (and (= (length value) 3)
|
||||||
(looking-at "-")))
|
(save-excursion (goto-char (line-beginning-position))
|
||||||
(line (nth (if prior 1 2) value)))
|
(looking-at "-"))))
|
||||||
|
(line (if prior
|
||||||
|
(cadr value)
|
||||||
|
(car (last value)))))
|
||||||
(string-match (format "^%s\\([0-9]+\\)" (if prior "-" "\\+")) line)
|
(string-match (format "^%s\\([0-9]+\\)" (if prior "-" "\\+")) line)
|
||||||
(setq line (string-to-number (match-string 1 line)))
|
(setq line (string-to-number (match-string 1 line)))
|
||||||
(when (> cstart stop)
|
(when (> cstart stop)
|
@ -1,4 +1,4 @@
|
|||||||
(define-package "magit" "20161009.1658" "A Git porcelain inside Emacs"
|
(define-package "magit" "20161011.1700" "A Git porcelain inside Emacs"
|
||||||
'((emacs "24.4")
|
'((emacs "24.4")
|
||||||
(async "20160711.223")
|
(async "20160711.223")
|
||||||
(dash "20160820.501")
|
(dash "20160820.501")
|
@ -791,7 +791,8 @@ as argument."
|
|||||||
default-dir (process-get arg 'default-dir)
|
default-dir (process-get arg 'default-dir)
|
||||||
section (process-get arg 'section)
|
section (process-get arg 'section)
|
||||||
arg (process-exit-status arg)))
|
arg (process-exit-status arg)))
|
||||||
(magit-process-unset-mode-line)
|
(with-current-buffer process-buf
|
||||||
|
(magit-process-unset-mode-line))
|
||||||
(when (featurep 'dired)
|
(when (featurep 'dired)
|
||||||
(dired-uncache default-dir))
|
(dired-uncache default-dir))
|
||||||
(when (buffer-live-p process-buf)
|
(when (buffer-live-p process-buf)
|
||||||
@ -866,8 +867,8 @@ as argument."
|
|||||||
|
|
||||||
;;; magit-process.el ends soon
|
;;; magit-process.el ends soon
|
||||||
|
|
||||||
(define-obsolete-variable-alias 'magit-git-output-coding-system
|
(define-obsolete-variable-alias 'magit-log-output-coding-system
|
||||||
'magit-log-output-coding-system "Magit 2.9.0")
|
'magit-git-output-coding-system "Magit 2.9.0")
|
||||||
|
|
||||||
(provide 'magit-process)
|
(provide 'magit-process)
|
||||||
;; Local Variables:
|
;; Local Variables:
|
@ -559,9 +559,15 @@ Both the source and the target are read in the minibuffer."
|
|||||||
(interactive
|
(interactive
|
||||||
(let ((source (magit-read-local-branch-or-commit "Push")))
|
(let ((source (magit-read-local-branch-or-commit "Push")))
|
||||||
(list source
|
(list source
|
||||||
(magit-read-remote-branch (format "Push %s to" source) nil
|
(magit-read-remote-branch
|
||||||
(magit-get-upstream-branch source)
|
(format "Push %s to" source) nil
|
||||||
source 'confirm)
|
(if (magit-local-branch-p source)
|
||||||
|
(or (magit-get-push-branch source)
|
||||||
|
(magit-get-upstream-branch source))
|
||||||
|
(and (magit-rev-ancestor-p source "HEAD")
|
||||||
|
(or (magit-get-push-branch)
|
||||||
|
(magit-get-upstream-branch))))
|
||||||
|
source 'confirm)
|
||||||
(magit-push-arguments))))
|
(magit-push-arguments))))
|
||||||
(magit-git-push source target args))
|
(magit-git-push source target args))
|
||||||
|
|
@ -490,6 +490,22 @@ FORMAT-STRING to be displayed, then don't."
|
|||||||
(unless (--first (string-prefix-p it format-string) magit-no-message)
|
(unless (--first (string-prefix-p it format-string) magit-no-message)
|
||||||
(apply #'message format-string args)))
|
(apply #'message format-string args)))
|
||||||
|
|
||||||
|
(defvar whitespace-mode)
|
||||||
|
|
||||||
|
(defun whitespace-dont-turn-on-in-magit-mode ()
|
||||||
|
"Prevent `whitespace-mode' from being turned on in Magit buffers.
|
||||||
|
Because `whitespace-mode' uses font-lock and Magit does not,
|
||||||
|
they are not compatible. See `magit-diff-paint-whitespace'
|
||||||
|
for an alternative."
|
||||||
|
(when (derived-mode-p 'magit-mode)
|
||||||
|
(setq whitespace-mode nil)
|
||||||
|
(user-error
|
||||||
|
"Whitespace-Mode isn't compatible with Magit. %s"
|
||||||
|
"See `magit-diff-paint-whitespace' for an alternative.")))
|
||||||
|
|
||||||
|
(advice-add 'whitespace-turn-on :before
|
||||||
|
'whitespace-dont-turn-on-in-magit-mode)
|
||||||
|
|
||||||
;;; magit-utils.el ends soon
|
;;; magit-utils.el ends soon
|
||||||
(provide 'magit-utils)
|
(provide 'magit-utils)
|
||||||
;; Local Variables:
|
;; Local Variables:
|
@ -4,8 +4,8 @@
|
|||||||
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
|
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
|
||||||
|
|
||||||
;;;### (autoloads nil nil ("magithub-cache.el" "magithub-ci.el" "magithub-core.el"
|
;;;### (autoloads nil nil ("magithub-cache.el" "magithub-ci.el" "magithub-core.el"
|
||||||
;;;;;; "magithub-issue.el" "magithub-pkg.el" "magithub.el") (22516
|
;;;;;; "magithub-issue.el" "magithub-pkg.el" "magithub.el") (22525
|
||||||
;;;;;; 57895 765484 157000))
|
;;;;;; 59330 912480 205000))
|
||||||
|
|
||||||
;;;***
|
;;;***
|
||||||
|
|
@ -81,7 +81,7 @@ If CACHE is nil, the entire cache is cleared."
|
|||||||
(defun magithub-refresh ()
|
(defun magithub-refresh ()
|
||||||
"Refresh all GitHub data."
|
"Refresh all GitHub data."
|
||||||
(interactive)
|
(interactive)
|
||||||
(magithub-cache-clear)
|
(magithub-cache-clear (magithub-repo-id))
|
||||||
(magit-refresh))
|
(magit-refresh))
|
||||||
|
|
||||||
(provide 'magithub-cache)
|
(provide 'magithub-cache)
|
@ -27,10 +27,27 @@
|
|||||||
(require 'magit)
|
(require 'magit)
|
||||||
(require 'magit-section)
|
(require 'magit-section)
|
||||||
(require 'magit-popup)
|
(require 'magit-popup)
|
||||||
|
(require 'dash)
|
||||||
|
|
||||||
(require 'magithub-core)
|
(require 'magithub-core)
|
||||||
(require 'magithub-cache)
|
(require 'magithub-cache)
|
||||||
|
|
||||||
|
(defconst magithub-ci-status-symbol-alist
|
||||||
|
'(("✔" . success)
|
||||||
|
("✖" . failure) ; also means `error'... gross
|
||||||
|
("●" . pending))
|
||||||
|
"Because hub 2.3 is silly and does silly things.
|
||||||
|
Reference: https://github.com/github/hub/blob/master/commands/ci_status.go#L107")
|
||||||
|
|
||||||
|
(defconst magithub-ci-status-regex
|
||||||
|
(rx bos
|
||||||
|
(group any) (* any) "\t"
|
||||||
|
(group (* any)) "\t"
|
||||||
|
(? (group (* any))) eos))
|
||||||
|
|
||||||
|
(defvar magithub-ci-urls nil
|
||||||
|
"An alist mapping of repositories to CI urls.")
|
||||||
|
|
||||||
(defun magithub-ci-enabled-p ()
|
(defun magithub-ci-enabled-p ()
|
||||||
"Non-nil if CI is enabled for this repository.
|
"Non-nil if CI is enabled for this repository.
|
||||||
If magithub.ci.enabled is not set, CI is considered to be enabled."
|
If magithub.ci.enabled is not set, CI is considered to be enabled."
|
||||||
@ -79,34 +96,75 @@ If magithub.ci.enabled is not set, CI is considered to be enabled."
|
|||||||
(if new-value (apply #'magit-set new-value keys)
|
(if new-value (apply #'magit-set new-value keys)
|
||||||
(apply #'magit-get keys))))
|
(apply #'magit-get keys))))
|
||||||
|
|
||||||
|
(defun magithub-ci-update-urls (statuses)
|
||||||
|
"Updates `magithub-ci-urls' according to STATUSES.
|
||||||
|
See also `magithub-repo-id'."
|
||||||
|
(let* ((id (magithub-repo-id))
|
||||||
|
(repo-urls (assoc id magithub-ci-urls))
|
||||||
|
(urls (mapcar (lambda (s) (plist-get s :url)) statuses)))
|
||||||
|
(if repo-urls (setcdr repo-urls urls)
|
||||||
|
(add-to-list 'magithub-ci-urls (cons id urls))
|
||||||
|
urls)))
|
||||||
|
|
||||||
|
(defun magithub-ci-status--parse-2.2.8 (output)
|
||||||
|
"Backwards compatibility for old versions of hub.
|
||||||
|
See `magithub-ci-status--parse'."
|
||||||
|
(--when-let (cdr (s-match (rx bos (group (+ (any alpha space)))
|
||||||
|
(? ": " (group (+ (not (any " "))))) eos)
|
||||||
|
output))
|
||||||
|
(let ((status (list :status (intern (replace-regexp-in-string "\s" "-" (car it)))
|
||||||
|
:url (cadr it))))
|
||||||
|
(magithub-ci-update-urls (list status))
|
||||||
|
status)))
|
||||||
|
|
||||||
(defun magithub-ci-status--internal (&optional for-commit)
|
(defun magithub-ci-status--internal (&optional for-commit)
|
||||||
"One of 'success, 'error, 'failure, 'pending, or 'no-status."
|
"One of 'success, 'error, 'failure, 'pending, or 'no-status."
|
||||||
(with-temp-message "Updating CI status..."
|
(let* ((current-commit (magit-rev-parse "HEAD"))
|
||||||
(let* ((current-commit (magit-rev-parse "HEAD"))
|
(last-commit (or for-commit current-commit))
|
||||||
(last-commit (or for-commit current-commit))
|
(output (magithub--command-output "ci-status" `("-v" ,last-commit))))
|
||||||
(output (car (magithub--command-output "ci-status" `("-v" ,last-commit)))))
|
(--if-let (if (magithub-hub-version-at-least "2.3")
|
||||||
(if (string-match (rx bos (group (+ (any alpha space)))
|
(car (magithub-ci-status--parse output))
|
||||||
(? ": " (group (+ (not (any " "))))) eos)
|
(magithub-ci-status--parse-2.2.8 (car output)))
|
||||||
output)
|
(prog1 (or (plist-get it :status) 'no-status)
|
||||||
(let (status url)
|
(if (not (or for-commit (plist-get it :status)))
|
||||||
(setq status (intern (replace-regexp-in-string "\s" "-" (match-string 1 output)))
|
(let ((last-commit (magithub-ci-status--last-commit)))
|
||||||
url (match-string 2 output))
|
(unless (string-equal current-commit last-commit)
|
||||||
(when url (magit-set url "magithub" "ci" "url"))
|
(magithub-ci-status--internal last-commit))
|
||||||
(if (and (not for-commit) (eq status 'no-status))
|
(magithub-ci-status-current-commit current-commit))
|
||||||
(let ((last-commit (magithub-ci-status--last-commit)))
|
(magithub-ci-status-current-commit current-commit)))
|
||||||
(unless (string-equal current-commit last-commit)
|
(beep)
|
||||||
(magithub-ci-status--internal last-commit))
|
(setq magithub-hub-error
|
||||||
(magithub-ci-status-current-commit current-commit)
|
(message
|
||||||
status)
|
(concat "Hub didn't have any recognizable output for \"ci-status\"!\n"
|
||||||
(magithub-ci-status-current-commit current-commit)
|
"Are you connected to the internet?\n"
|
||||||
status))
|
"Consider submitting an issue to github/hub.")))
|
||||||
(beep)
|
'internal-error)))
|
||||||
(setq magithub-hub-error
|
|
||||||
(message
|
(defun magithub-ci-status--parse (output)
|
||||||
(concat "Hub didn't have any output for \"ci-status\"!\n"
|
"Parse a string OUTPUT into a list of statuses.
|
||||||
"Are you connected to the internet?\n"
|
The first status will be an `overall' status."
|
||||||
"Consider submitting an issue to github/hub.")))
|
(let ((statuses (mapcar #'magithub-ci-status--parse-line output))
|
||||||
'internal-error))))
|
(get-status (lambda (status) (lambda (s) (eq (plist-get s :status) status)))))
|
||||||
|
(magithub-ci-update-urls statuses)
|
||||||
|
(cons
|
||||||
|
(list :check 'overall
|
||||||
|
:status
|
||||||
|
(cond
|
||||||
|
((-all? (funcall get-status 'success) statuses) 'success)
|
||||||
|
((-some? (funcall get-status 'pending) statuses) 'pending)
|
||||||
|
((-some? (funcall get-status 'error) statuses) 'error)
|
||||||
|
((-some? (funcall get-status 'failure) statuses) 'failure)))
|
||||||
|
statuses)))
|
||||||
|
|
||||||
|
(defun magithub-ci-status--parse-line (line)
|
||||||
|
"Parse a single LINE of status into a status plist."
|
||||||
|
(--if-let (cdr (s-match magithub-ci-status-regex line))
|
||||||
|
(list :status (cdr (assoc (car it) magithub-ci-status-symbol-alist))
|
||||||
|
:url (car (cddr it))
|
||||||
|
:check (cadr it))
|
||||||
|
(if (string= line "no-status")
|
||||||
|
'no-status
|
||||||
|
(if (string= line "") 'no-output))))
|
||||||
|
|
||||||
(defun magithub-ci-status--last-commit ()
|
(defun magithub-ci-status--last-commit ()
|
||||||
"Find the commit considered to have the current CI status.
|
"Find the commit considered to have the current CI status.
|
||||||
@ -178,13 +236,12 @@ See the following resources:
|
|||||||
"Browse the CI.
|
"Browse the CI.
|
||||||
Sets up magithub.ci.url if necessary."
|
Sets up magithub.ci.url if necessary."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((var-value (magit-get "magithub" "ci" "url")))
|
(let* ((urls (cdr (assoc (magithub-repo-id) magithub-ci-urls)))
|
||||||
(unless var-value
|
(target-url (if (= 1 (length urls)) (car urls)
|
||||||
(magit-set
|
(when urls (completing-read "CI Dashboard URL: " urls)))))
|
||||||
(setq var-value (read-from-minibuffer "I don't know the CI URL yet -- what is it? I'll remember: ")
|
(when (or (null target-url) (string= "" target-url))
|
||||||
var-value (if (string-equal "" var-value) nil var-value))
|
(user-error "No CI URL detected"))
|
||||||
"magithub" "ci" "url"))
|
(browse-url target-url)))
|
||||||
(browse-url var-value)))
|
|
||||||
|
|
||||||
(defvar magit-magithub-ci-status-section-map
|
(defvar magit-magithub-ci-status-section-map
|
||||||
(let ((map (make-sparse-keymap)))
|
(let ((map (make-sparse-keymap)))
|
||||||
@ -215,17 +272,11 @@ Sets up magithub.ci.url if necessary."
|
|||||||
'face (if (facep face) face 'magithub-ci-unknown)))
|
'face (if (facep face) face 'magithub-ci-unknown)))
|
||||||
(insert ?\n))))
|
(insert ?\n))))
|
||||||
|
|
||||||
(defun magithub-toggle-ci-status-header ()
|
(magithub--deftoggle magithub-toggle-ci-status-header
|
||||||
(interactive)
|
magit-status-headers-hook #'magithub-maybe-insert-ci-status-header "the CI header")
|
||||||
(if (memq #'magithub-maybe-insert-ci-status-header magit-status-headers-hook)
|
|
||||||
(remove-hook 'magit-status-headers-hook #'magithub-maybe-insert-ci-status-header)
|
|
||||||
(if (executable-find magithub-hub-executable)
|
|
||||||
(add-hook 'magit-status-headers-hook #'magithub-maybe-insert-ci-status-header t)
|
|
||||||
(message "Magithub: (magithub-toggle-ci-status-header) `hub' isn't installed, so I can't insert the CI header")))
|
|
||||||
(when (derived-mode-p 'magit-status-mode)
|
|
||||||
(magit-refresh)))
|
|
||||||
|
|
||||||
(magithub-toggle-ci-status-header)
|
(when (executable-find magithub-hub-executable)
|
||||||
|
(magithub-toggle-ci-status-header))
|
||||||
|
|
||||||
(provide 'magithub-ci)
|
(provide 'magithub-ci)
|
||||||
;;; magithub-ci.el ends here
|
;;; magithub-ci.el ends here
|
@ -25,13 +25,13 @@
|
|||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(require 'magit)
|
(require 'magit)
|
||||||
|
(require 'dash)
|
||||||
|
|
||||||
(defun magithub-github-repository-p ()
|
(defun magithub-github-repository-p ()
|
||||||
"Non-nil if \"origin\" points to GitHub or a whitelisted domain."
|
"Non-nil if \"origin\" points to GitHub or a whitelisted domain."
|
||||||
(let ((url (magit-get "remote" "origin" "url")))
|
(--when-let (magit-get "remote" "origin" "url")
|
||||||
(when url
|
(-some? (lambda (domain) (s-contains? domain it))
|
||||||
(cl-some (lambda (domain) (s-contains? domain url))
|
(cons "github.com" (magit-get-all "hub" "host")))))
|
||||||
(cons "github.com" (magit-get-all "hub" "host"))))))
|
|
||||||
|
|
||||||
(defun magithub-repo-id ()
|
(defun magithub-repo-id ()
|
||||||
"Returns an identifying value for this repository."
|
"Returns an identifying value for this repository."
|
||||||
@ -111,6 +111,17 @@ and returns its output as a list of lines."
|
|||||||
"Quickly execute COMMAND with ARGS."
|
"Quickly execute COMMAND with ARGS."
|
||||||
(ignore (magithub--command-output command args)))
|
(ignore (magithub--command-output command args)))
|
||||||
|
|
||||||
|
(defun magithub-hub-version ()
|
||||||
|
"Return the `hub' version as a string."
|
||||||
|
(-> "--version"
|
||||||
|
magithub--command-output cadr
|
||||||
|
split-string cddr car
|
||||||
|
(split-string "-") car))
|
||||||
|
|
||||||
|
(defun magithub-hub-version-at-least (version-string)
|
||||||
|
"Return t if `hub's version is at least VERSION-STRING."
|
||||||
|
(version<= version-string (magithub-hub-version)))
|
||||||
|
|
||||||
(defun magithub--meta-new-issue ()
|
(defun magithub--meta-new-issue ()
|
||||||
"Open a new Magithub issue.
|
"Open a new Magithub issue.
|
||||||
See /.github/ISSUE_TEMPLATE.md in this repository."
|
See /.github/ISSUE_TEMPLATE.md in this repository."
|
||||||
@ -118,7 +129,7 @@ See /.github/ISSUE_TEMPLATE.md in this repository."
|
|||||||
(browse-url "https://github.com/vermiculus/magithub/issues/new"))
|
(browse-url "https://github.com/vermiculus/magithub/issues/new"))
|
||||||
|
|
||||||
(defun magithub--meta-help ()
|
(defun magithub--meta-help ()
|
||||||
"Opens Magithub help."
|
"Open Magithub help."
|
||||||
(interactive)
|
(interactive)
|
||||||
(browse-url "https://gitter.im/vermiculus/magithub"))
|
(browse-url "https://gitter.im/vermiculus/magithub"))
|
||||||
|
|
||||||
@ -180,5 +191,20 @@ See /.github/ISSUE_TEMPLATE.md in this repository."
|
|||||||
(magithub--meta-new-issue))
|
(magithub--meta-new-issue))
|
||||||
(error err-message))
|
(error err-message))
|
||||||
|
|
||||||
|
(defmacro magithub--deftoggle (name hook func s)
|
||||||
|
"Define a section-toggle command."
|
||||||
|
(declare (indent defun))
|
||||||
|
`(defun ,name ()
|
||||||
|
,(concat "Toggle the " s " section.")
|
||||||
|
(interactive)
|
||||||
|
(if (memq ,func ,hook)
|
||||||
|
(remove-hook ',hook ,func)
|
||||||
|
(if (executable-find magithub-hub-executable)
|
||||||
|
(add-hook ',hook ,func t)
|
||||||
|
(message ,(concat "`hub' isn't installed, so I can't insert " s))))
|
||||||
|
(when (derived-mode-p 'magit-status-mode)
|
||||||
|
(magit-refresh))
|
||||||
|
(memq ,func ,hook)))
|
||||||
|
|
||||||
(provide 'magithub-core)
|
(provide 'magithub-core)
|
||||||
;;; magithub-core.el ends here
|
;;; magithub-core.el ends here
|
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
(require 'magit)
|
(require 'magit)
|
||||||
(require 'magit-section)
|
(require 'magit-section)
|
||||||
|
(require 'dash)
|
||||||
|
|
||||||
(require 'magithub-core)
|
(require 'magithub-core)
|
||||||
(require 'magithub-cache)
|
(require 'magithub-cache)
|
||||||
@ -71,7 +72,19 @@ are in DEFAULT are not prompted for again."
|
|||||||
(let* ((default-labels (when default (s-split "," default t))))
|
(let* ((default-labels (when default (s-split "," default t))))
|
||||||
(cl-set-difference (magithub-issue-label-list) default-labels)))))
|
(cl-set-difference (magithub-issue-label-list) default-labels)))))
|
||||||
|
|
||||||
(defun magithub-issue--process-line (s)
|
(defun magithub-issue--sort (issues)
|
||||||
|
"Sort ISSUES by issue number."
|
||||||
|
(sort issues
|
||||||
|
(lambda (a b) (< (plist-get a :number)
|
||||||
|
(plist-get b :number)))))
|
||||||
|
|
||||||
|
(defun magithub-issue--url-type (url)
|
||||||
|
"If URL corresponds to an issue, the symbol `issue'.
|
||||||
|
If URL correponds to a pull request, the symbol `pull-request'."
|
||||||
|
(if (string-match-p (rx "/pull/" (+ digit) eos) url)
|
||||||
|
'pull-request 'issue))
|
||||||
|
|
||||||
|
(defun magithub-issue--process-line-2.2.8 (s)
|
||||||
"Process a line S into an issue.
|
"Process a line S into an issue.
|
||||||
|
|
||||||
Returns a plist with the following properties:
|
Returns a plist with the following properties:
|
||||||
@ -98,25 +111,49 @@ Returns a plist with the following properties:
|
|||||||
(setq url (buffer-substring-no-properties (point) (point-max)))
|
(setq url (buffer-substring-no-properties (point) (point-max)))
|
||||||
t))
|
t))
|
||||||
(list :number number
|
(list :number number
|
||||||
:type (if (string-match-p (rx "/pull/" (+ digit) eos) url)
|
:type (magithub-issue--url-type url)
|
||||||
'pull-request 'issue)
|
|
||||||
:title title
|
:title title
|
||||||
:url url)
|
:url url)
|
||||||
(magithub-error
|
(magithub-error
|
||||||
"failed to parse issue"
|
"failed to parse issue"
|
||||||
"There was an error parsing issues."))))
|
"There was an error parsing issues."))))
|
||||||
|
|
||||||
|
(defun magithub-issue-list--internal-2.2.8 ()
|
||||||
|
"Backwards compatibility for old versions of hub.
|
||||||
|
See `magithub-issue-list--internal'."
|
||||||
|
(magithub-issue--sort
|
||||||
|
(mapcar #'magithub-issue--process-line-2.2.8
|
||||||
|
(magithub--command-output "issue"))))
|
||||||
|
|
||||||
|
(defun magithub-issue--process-line (s)
|
||||||
|
"Process a line S into an issue.
|
||||||
|
|
||||||
|
Returns a plist with the following properties:
|
||||||
|
|
||||||
|
:number issue or pull request number
|
||||||
|
:type either 'pull-request or 'issue
|
||||||
|
:title the title of the issue or pull request
|
||||||
|
:url link to issue or pull request"
|
||||||
|
(let ((ss (split-string s ",")))
|
||||||
|
(list
|
||||||
|
:number (string-to-number (car ss))
|
||||||
|
:url (cadr ss)
|
||||||
|
:title (s-join "," (cddr ss))
|
||||||
|
:type (magithub-issue--url-type (cadr ss)))))
|
||||||
|
|
||||||
|
(defun magithub-issue-list--internal ()
|
||||||
|
"Return a new list of issues for the current repository."
|
||||||
|
(magithub-issue--sort
|
||||||
|
(mapcar #'magithub-issue--process-line
|
||||||
|
(magithub--command-output "issue" '("--format=%I,%U,%t%n")))))
|
||||||
|
|
||||||
(defun magithub-issue-list ()
|
(defun magithub-issue-list ()
|
||||||
"Return a list of issues for the current repository."
|
"Return a list of issues for the current repository."
|
||||||
(magithub-cache (magithub-repo-id) :issues
|
(magithub-cache (magithub-repo-id) :issues
|
||||||
'(with-temp-message "Retrieving issue list..."
|
'(with-temp-message "Retrieving issue list..."
|
||||||
(magithub-issue-list--internal))))
|
(if (magithub-hub-version-at-least "2.3")
|
||||||
|
(magithub-issue-list--internal)
|
||||||
(defun magithub-issue-list--internal ()
|
(magithub-issue-list--internal-2.2.8)))))
|
||||||
(sort (mapcar #'magithub-issue--process-line
|
|
||||||
(magithub--command-output "issue"))
|
|
||||||
(lambda (a b) (< (plist-get a :number)
|
|
||||||
(plist-get b :number)))))
|
|
||||||
|
|
||||||
(defun magithub-issue--insert (issue)
|
(defun magithub-issue--insert (issue)
|
||||||
"Insert an `issue' as a Magit section into the buffer."
|
"Insert an `issue' as a Magit section into the buffer."
|
||||||
@ -129,11 +166,7 @@ Returns a plist with the following properties:
|
|||||||
(let ((key (car formats)) (fmt (cadr formats)))
|
(let ((key (car formats)) (fmt (cadr formats)))
|
||||||
(setq s (concat s (format fmt (plist-get issue key)))))
|
(setq s (concat s (format fmt (plist-get issue key)))))
|
||||||
(setq formats (cddr formats)))
|
(setq formats (cddr formats)))
|
||||||
(insert
|
(insert s))
|
||||||
(propertize
|
|
||||||
s 'face
|
|
||||||
(when (eq (plist-get issue :type) 'pull-request)
|
|
||||||
'magit-branch-remote))))
|
|
||||||
(insert ?\n))))
|
(insert ?\n))))
|
||||||
|
|
||||||
(defun magithub-issue-browse (issue)
|
(defun magithub-issue-browse (issue)
|
||||||
@ -168,28 +201,42 @@ If `issue' is nil, open the repository's issues page."
|
|||||||
map)
|
map)
|
||||||
"Keymap for `magithub-issue-list' sections.")
|
"Keymap for `magithub-issue-list' sections.")
|
||||||
|
|
||||||
(defun magithub-issue--insert-section ()
|
(defvar magit-magithub-pull-request-list-section-map
|
||||||
|
(let ((map (make-sparse-keymap)))
|
||||||
|
(define-key map [remap magit-visit-thing] #'magithub-issue-browse)
|
||||||
|
(define-key map [remap magit-refresh] #'magithub-issue-refresh)
|
||||||
|
map)
|
||||||
|
"Keymap for `magithub-pull-request-list' sections.")
|
||||||
|
|
||||||
|
(defun magithub-issue--insert-issue-section ()
|
||||||
"Insert GitHub issues if appropriate."
|
"Insert GitHub issues if appropriate."
|
||||||
(when (magithub-usable-p)
|
(when (magithub-usable-p)
|
||||||
(let* ((issues (magithub-issue-list)))
|
(--when-let (-filter (lambda (i) (eq (plist-get i :type) 'issue))
|
||||||
|
(magithub-issue-list))
|
||||||
(magit-insert-section (magithub-issue-list)
|
(magit-insert-section (magithub-issue-list)
|
||||||
(magit-insert-heading "Issues and Pull Requests:")
|
(magit-insert-heading "Issues:")
|
||||||
(if issues (mapc #'magithub-issue--insert issues)
|
(mapc #'magithub-issue--insert it)
|
||||||
(insert " No issues.\n"))))))
|
(insert ?\n)))))
|
||||||
|
|
||||||
|
(defun magithub-issue--insert-pr-section ()
|
||||||
|
"Insert GitHub pull requests if appropriate."
|
||||||
|
(when (magithub-usable-p)
|
||||||
|
(--when-let (-filter (lambda (i) (eq (plist-get i :type) 'pull-request))
|
||||||
|
(magithub-issue-list))
|
||||||
|
(magit-insert-section (magithub-pull-request-list)
|
||||||
|
(magit-insert-heading "Pull Requests:")
|
||||||
|
(mapc #'magithub-issue--insert it)
|
||||||
|
(insert ?\n)))))
|
||||||
|
|
||||||
;;; Hook into the status buffer
|
;;; Hook into the status buffer
|
||||||
(defun magithub-toggle-issues ()
|
(magithub--deftoggle magithub-toggle-issues
|
||||||
(interactive)
|
magit-status-sections-hook #'magithub-issue--insert-issue-section "issues")
|
||||||
(if (memq #'magithub-issue--insert-section magit-status-sections-hook)
|
(magithub--deftoggle magithub-toggle-pull-requests
|
||||||
(remove-hook 'magit-status-sections-hook #'magithub-issue--insert-section)
|
magit-status-sections-hook #'magithub-issue--insert-pr-section "pull requests")
|
||||||
(if (executable-find magithub-hub-executable)
|
|
||||||
(add-hook ' magit-status-sections-hook #'magithub-issue--insert-section t)
|
|
||||||
(message "Magithub: (magithub-toggle-issues) `hub' isn't installed, so I can't insert issues")))
|
|
||||||
(when (derived-mode-p 'magit-status-mode)
|
|
||||||
(magit-refresh))
|
|
||||||
(memq #'magithub-issue--insert-section magit-status-sections-hook))
|
|
||||||
|
|
||||||
(magithub-toggle-issues)
|
(when (executable-find magithub-hub-executable)
|
||||||
|
(magithub-toggle-pull-requests)
|
||||||
|
(magithub-toggle-issues))
|
||||||
|
|
||||||
(provide 'magithub-issue)
|
(provide 'magithub-issue)
|
||||||
;;; magithub-issue.el ends here
|
;;; magithub-issue.el ends here
|
@ -1,5 +1,5 @@
|
|||||||
(define-package "magithub" "20161004.523" "Magit interfaces for GitHub"
|
(define-package "magithub" "20161011.2129" "Magit interfaces for GitHub"
|
||||||
'((emacs "24.3")
|
'((emacs "24.4")
|
||||||
(magit "2.8.0")
|
(magit "2.8.0")
|
||||||
(git-commit "20160821.1338")
|
(git-commit "20160821.1338")
|
||||||
(with-editor "20160828.1025")
|
(with-editor "20160828.1025")
|
@ -5,7 +5,7 @@
|
|||||||
;; Author: Sean Allred <code@seanallred.com>
|
;; Author: Sean Allred <code@seanallred.com>
|
||||||
;; Keywords: git, tools, vc
|
;; Keywords: git, tools, vc
|
||||||
;; Homepage: https://github.com/vermiculus/magithub
|
;; Homepage: https://github.com/vermiculus/magithub
|
||||||
;; Package-Requires: ((emacs "24.3") (magit "2.8.0") (git-commit "20160821.1338") (with-editor "20160828.1025") (cl-lib "1.0") (s "20160711.525"))
|
;; Package-Requires: ((emacs "24.4") (magit "2.8.0") (git-commit "20160821.1338") (with-editor "20160828.1025") (cl-lib "1.0") (s "20160711.525"))
|
||||||
;; Package-Version: 0.1
|
;; Package-Version: 0.1
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
;; This program is free software; you can redistribute it and/or modify
|
||||||
@ -48,6 +48,7 @@
|
|||||||
(require 'with-editor)
|
(require 'with-editor)
|
||||||
(require 'cl-lib)
|
(require 'cl-lib)
|
||||||
(require 's)
|
(require 's)
|
||||||
|
(require 'dash)
|
||||||
|
|
||||||
(require 'magithub-core)
|
(require 'magithub-core)
|
||||||
(require 'magithub-issue)
|
(require 'magithub-issue)
|
||||||
@ -197,11 +198,10 @@ This function will return nil for matches to
|
|||||||
|
|
||||||
(defun magithub-check-buffer ()
|
(defun magithub-check-buffer ()
|
||||||
"If this is a buffer created by hub, perform setup."
|
"If this is a buffer created by hub, perform setup."
|
||||||
(let ((type (magithub--edit-file-type buffer-file-name)))
|
(--when-let (magithub--edit-file-type buffer-file-name)
|
||||||
(when type
|
(magithub-setup-edit-buffer)
|
||||||
(magithub-setup-edit-buffer)
|
(when (eq it 'issue)
|
||||||
(when (eq type 'issue)
|
(magithub-setup-new-issue-buffer))))
|
||||||
(magithub-setup-new-issue-buffer)))))
|
|
||||||
(add-hook 'find-file-hook #'magithub-check-buffer)
|
(add-hook 'find-file-hook #'magithub-check-buffer)
|
||||||
|
|
||||||
(defun magithub-clone--get-repo ()
|
(defun magithub-clone--get-repo ()
|
@ -1,3 +0,0 @@
|
|||||||
(define-package "org"
|
|
||||||
"20161003" "Outline-based notes management and organizer" ( ))
|
|
||||||
;; no-byte-compile: t
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user