From 4ab505d70442d3a90870b6d7d2d3d2ca54e697f5 Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Tue, 13 Nov 2018 11:01:17 +0100 Subject: [PATCH] update magit. Signed-off-by: Andreas Gerler --- elpa/magit-20180828.1055/magit-obsolete.el | 33 - elpa/magit-20180828.1055/magit-pkg.el | 11 - elpa/magit-20180828.1055/magit-remote.el | 1052 ----------------- elpa/magit-20180828.1055/magit.info | 184 --- .../AUTHORS.md | 5 + .../LICENSE | 0 .../dir | 0 .../git-rebase.el | 1 + .../magit-apply.el | 59 +- .../magit-autoloads.el | 533 +++++---- .../magit-autorevert.el | 1 + .../magit-bisect.el | 7 + .../magit-blame.el | 16 +- .../magit-bookmark.el | 9 +- .../magit-branch.el | 35 +- elpa/magit-20181110.1820/magit-clone.el | 103 ++ .../magit-collab.el | 5 +- .../magit-commit.el | 40 +- .../magit-core.el | 2 +- .../magit-diff.el | 295 +++-- .../magit-ediff.el | 1 + .../magit-extras.el | 73 +- elpa/magit-20181110.1820/magit-fetch.el | 157 +++ .../magit-files.el | 97 +- .../magit-git.el | 381 +++--- elpa/magit-20181110.1820/magit-gitignore.el | 98 ++ .../magit-imenu.el | 4 +- .../magit-log.el | 145 ++- .../magit-margin.el | 8 +- .../magit-merge.el | 18 +- .../magit-mode.el | 62 +- .../magit-notes.el | 1 + elpa/magit-20181110.1820/magit-obsolete.el | 55 + elpa/magit-20181110.1820/magit-patch.el | 188 +++ elpa/magit-20181110.1820/magit-pkg.el | 11 + .../magit-process.el | 53 +- elpa/magit-20181110.1820/magit-pull.el | 151 +++ elpa/magit-20181110.1820/magit-push.el | 345 ++++++ .../magit-refs.el | 46 +- elpa/magit-20181110.1820/magit-remote.el | 376 ++++++ .../magit-repos.el | 36 +- .../magit-reset.el | 31 +- .../magit-section.el | 224 ++-- .../magit-sequence.el | 33 +- .../magit-stash.el | 16 +- .../magit-status.el | 97 +- .../magit-submodule.el | 234 +++- .../magit-subtree.el | 1 + .../magit-tag.el | 7 +- .../magit-utils.el | 137 ++- .../magit-wip.el | 100 +- .../magit-worktree.el | 5 +- .../magit.el | 20 +- elpa/magit-20181110.1820/magit.info | 187 +++ .../magit.info-1 | 433 ++++--- .../magit.info-2 | 242 ++-- .../magit-gitflow-pkg.el | 2 - .../magit-gitflow-autoloads.el | 11 +- .../magit-gitflow-pkg.el | 2 + .../magit-gitflow.el | 2 +- 60 files changed, 3845 insertions(+), 2636 deletions(-) delete mode 100644 elpa/magit-20180828.1055/magit-obsolete.el delete mode 100644 elpa/magit-20180828.1055/magit-pkg.el delete mode 100644 elpa/magit-20180828.1055/magit-remote.el delete mode 100644 elpa/magit-20180828.1055/magit.info rename elpa/{magit-20180828.1055 => magit-20181110.1820}/AUTHORS.md (98%) rename elpa/{magit-20180828.1055 => magit-20181110.1820}/LICENSE (100%) rename elpa/{magit-20180828.1055 => magit-20181110.1820}/dir (100%) rename elpa/{magit-20180828.1055 => magit-20181110.1820}/git-rebase.el (99%) rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-apply.el (93%) rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-autoloads.el (91%) rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-autorevert.el (99%) rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-bisect.el (96%) rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-blame.el (99%) rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-bookmark.el (98%) rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-branch.el (98%) create mode 100644 elpa/magit-20181110.1820/magit-clone.el rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-collab.el (97%) rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-commit.el (94%) rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-core.el (99%) rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-diff.el (93%) rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-ediff.el (99%) rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-extras.el (91%) create mode 100644 elpa/magit-20181110.1820/magit-fetch.el rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-files.el (83%) rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-git.el (92%) create mode 100644 elpa/magit-20181110.1820/magit-gitignore.el rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-imenu.el (99%) rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-log.el (95%) rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-margin.el (98%) rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-merge.el (95%) rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-mode.el (96%) rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-notes.el (99%) create mode 100644 elpa/magit-20181110.1820/magit-obsolete.el create mode 100644 elpa/magit-20181110.1820/magit-patch.el create mode 100644 elpa/magit-20181110.1820/magit-pkg.el rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-process.el (97%) create mode 100644 elpa/magit-20181110.1820/magit-pull.el create mode 100644 elpa/magit-20181110.1820/magit-push.el rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-refs.el (96%) create mode 100644 elpa/magit-20181110.1820/magit-remote.el rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-repos.el (92%) rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-reset.el (95%) rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-section.el (89%) rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-sequence.el (97%) rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-stash.el (97%) rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-status.el (87%) rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-submodule.el (69%) rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-subtree.el (99%) rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-tag.el (97%) rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-utils.el (87%) rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-wip.el (82%) rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit-worktree.el (98%) rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit.el (98%) create mode 100644 elpa/magit-20181110.1820/magit.info rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit.info-1 (96%) rename elpa/{magit-20180828.1055 => magit-20181110.1820}/magit.info-2 (96%) delete mode 100644 elpa/magit-gitflow-20170929.124/magit-gitflow-pkg.el rename elpa/{magit-gitflow-20170929.124 => magit-gitflow-20170929.824}/magit-gitflow-autoloads.el (54%) create mode 100644 elpa/magit-gitflow-20170929.824/magit-gitflow-pkg.el rename elpa/{magit-gitflow-20170929.124 => magit-gitflow-20170929.824}/magit-gitflow.el (99%) diff --git a/elpa/magit-20180828.1055/magit-obsolete.el b/elpa/magit-20180828.1055/magit-obsolete.el deleted file mode 100644 index 57ab7c09..00000000 --- a/elpa/magit-20180828.1055/magit-obsolete.el +++ /dev/null @@ -1,33 +0,0 @@ -;;; magit-obsolete.el --- obsolete definitions -*- lexical-binding: t -*- - -;; Copyright (C) 2010-2018 The Magit Project Contributors -;; -;; You should have received a copy of the AUTHORS.md file which -;; lists all contributors. If not, see http://magit.vc/authors. - -;; Author: Jonas Bernoulli -;; Maintainer: Jonas Bernoulli - -;; Magit is free software; you can redistribute it and/or modify it -;; under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) -;; any later version. -;; -;; Magit is distributed in the hope that it will be useful, but WITHOUT -;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -;; License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with Magit. If not, see http://www.gnu.org/licenses. - -;;; Commentary: - -;; This library defines aliases for obsolete variables and functions. - -;;; Code: - -(require 'magit) - -(provide 'magit-obsolete) -;;; magit-obsolete.el ends here diff --git a/elpa/magit-20180828.1055/magit-pkg.el b/elpa/magit-20180828.1055/magit-pkg.el deleted file mode 100644 index 9430562f..00000000 --- a/elpa/magit-20180828.1055/magit-pkg.el +++ /dev/null @@ -1,11 +0,0 @@ -(define-package "magit" "20180828.1055" "A Git porcelain inside Emacs." - '((emacs "25.1") - (async "20180527") - (dash "20180413") - (ghub "20180417") - (git-commit "20180602") - (magit-popup "20180509") - (with-editor "20180414"))) -;; Local Variables: -;; no-byte-compile: t -;; End: diff --git a/elpa/magit-20180828.1055/magit-remote.el b/elpa/magit-20180828.1055/magit-remote.el deleted file mode 100644 index 7541f6e2..00000000 --- a/elpa/magit-20180828.1055/magit-remote.el +++ /dev/null @@ -1,1052 +0,0 @@ -;;; magit-remote.el --- transfer Git commits -*- lexical-binding: t -*- - -;; Copyright (C) 2008-2018 The Magit Project Contributors -;; -;; You should have received a copy of the AUTHORS.md file which -;; lists all contributors. If not, see http://magit.vc/authors. - -;; Author: Jonas Bernoulli -;; Maintainer: Jonas Bernoulli - -;; Magit is free software; you can redistribute it and/or modify it -;; under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) -;; any later version. -;; -;; Magit is distributed in the hope that it will be useful, but WITHOUT -;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -;; License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with Magit. If not, see http://www.gnu.org/licenses. - -;;; Commentary: - -;; This library implements support for interacting with remote -;; repositories. Commands for cloning, fetching, pulling, and -;; pushing are defined here. - -;;; Code: - -(require 'magit) - -;;; Options - -(defcustom magit-fetch-modules-jobs 4 - "Number of submodules to fetch in parallel. -Ignored for Git versions before v2.8.0." - :package-version '(magit . "2.12.0") - :group 'magit-commands - :type '(choice (const :tag "one at a time" nil) number)) - -;;; Clone - -(defcustom magit-clone-set-remote-head nil - "Whether cloning creates the symbolic-ref `/HEAD'." - :package-version '(magit . "2.4.2") - :group 'magit-commands - :type 'boolean) - -(defcustom magit-clone-set-remote.pushDefault 'ask - "Whether to set the value of `remote.pushDefault' after cloning. - -If t, then set without asking. If nil, then don't set. If -`ask', then ask." - :package-version '(magit . "2.4.0") - :group 'magit-commands - :type '(choice (const :tag "set" t) - (const :tag "ask" ask) - (const :tag "don't set" nil))) - -;;;###autoload -(defun magit-clone (repository directory) - "Clone the REPOSITORY to DIRECTORY. -Then show the status buffer for the new repository." - (interactive - (let ((url (magit-read-string-ns "Clone repository"))) - (list url (read-directory-name - "Clone to: " nil nil nil - (and (string-match "\\([^/:]+?\\)\\(/?\\.git\\)?$" url) - (match-string 1 url)))))) - (setq directory (file-name-as-directory (expand-file-name directory))) - (magit-run-git-async "clone" repository - (magit-convert-filename-for-git directory)) - ;; Don't refresh the buffer we're calling from. - (process-put magit-this-process 'inhibit-refresh t) - (set-process-sentinel - magit-this-process - (lambda (process event) - (when (memq (process-status process) '(exit signal)) - (let ((magit-process-raise-error t)) - (magit-process-sentinel process event))) - (when (and (eq (process-status process) 'exit) - (= (process-exit-status process) 0)) - (let ((default-directory directory)) - (when (or (eq magit-clone-set-remote.pushDefault t) - (and magit-clone-set-remote.pushDefault - (y-or-n-p "Set `remote.pushDefault' to \"origin\"? "))) - (setf (magit-get "remote.pushDefault") "origin")) - (unless magit-clone-set-remote-head - (magit-remote-unset-head "origin"))) - (with-current-buffer (process-get process 'command-buf) - (magit-status-internal directory)))))) - -;;; Remote -;;;; Options - -(defcustom magit-remote-add-set-remote.pushDefault 'ask-if-unset - "Whether to set the value of `remote.pushDefault' after adding a remote. - -If `ask', then always ask. If `ask-if-unset', then ask, but only -if the variable isn't set already. If nil, then don't ever set. -If the value is a string, then set without asking, provided that -the name of the added remote is equal to that string and the -variable isn't already set." - :package-version '(magit . "2.4.0") - :group 'magit-commands - :type '(choice (const :tag "ask if unset" ask-if-unset) - (const :tag "always ask" ask) - (string :tag "set if named") - (const :tag "don't set"))) - -(defcustom magit-remote-popup-show-variables t - "Whether the `magit-remote-popup' shows Git variables. -When set to nil, no variables are displayed directly in this -popup, instead the sub-popup `magit-remote-config-popup' has -to be used to view and change remote related variables." - :package-version '(magit . "2.12.0") - :group 'magit-commands - :type 'boolean) - -;;;; Popup - -(defvar magit-remote-config-variables) - -;;;###autoload (autoload 'magit-remote-popup "magit-remote" nil t) -(magit-define-popup magit-remote-popup - "Popup console for remote commands." - :man-page "git-remote" - :default-arguments '("-f") - :variables (lambda () - (and magit-remote-popup-show-variables - magit-remote-config-variables)) - :switches '("Switches for add" - (?f "Fetch after add" "-f")) - :actions '((?a "Add" magit-remote-add) - (?C "Configure..." magit-remote-config-popup) - (?r "Rename" magit-remote-rename) - (?p "Prune stale branches" magit-remote-prune) - (?k "Remove" magit-remote-remove) - (?P "Prune stale refspecs" magit-remote-prune-refspecs)) - :max-action-columns 2) - -;;;; Commands - -(defun magit-read-url (prompt &optional initial-input) - (let ((url (magit-read-string-ns prompt initial-input))) - (if (string-prefix-p "~" url) - (expand-file-name url) - url))) - -;;;###autoload -(defun magit-remote-add (remote url &optional args) - "Add a remote named REMOTE and fetch it." - (interactive (list (magit-read-string-ns "Remote name") - (magit-read-url "Remote url") - (magit-remote-arguments))) - (if (pcase (list magit-remote-add-set-remote.pushDefault - (magit-get "remote.pushDefault")) - (`(,(pred stringp) ,_) t) - ((or `(ask ,_) `(ask-if-unset nil)) - (y-or-n-p (format "Set `remote.pushDefault' to \"%s\"? " remote)))) - (progn (magit-call-git "remote" "add" args remote url) - (setf (magit-get "remote.pushDefault") remote) - (magit-refresh)) - (magit-run-git-async "remote" "add" args remote url))) - -;;;###autoload -(defun magit-remote-rename (old new) - "Rename the remote named OLD to NEW." - (interactive - (let ((remote (magit-read-remote "Rename remote"))) - (list remote (magit-read-string-ns (format "Rename %s to" remote))))) - (unless (string= old new) - (magit-call-git "remote" "rename" old new) - (magit-remote--cleanup-push-variables old new) - (magit-refresh))) - -;;;###autoload -(defun magit-remote-remove (remote) - "Delete the remote named REMOTE." - (interactive (list (magit-read-remote "Delete remote"))) - (magit-call-git "remote" "rm" remote) - (magit-remote--cleanup-push-variables remote) - (magit-refresh)) - -(defun magit-remote--cleanup-push-variables (remote &optional new-name) - (magit-with-toplevel - (when (equal (magit-get "remote.pushDefault") remote) - (magit-set new-name "remote.pushDefault")) - (dolist (var (magit-git-lines "config" "--name-only" - "--get-regexp" "^branch\.[^.]*\.pushRemote" - (format "^%s$" remote))) - (magit-call-git "config" (and (not new-name) "--unset") var new-name)))) - -(defconst magit--refspec-re "\\`\\(\\+\\)?\\([^:]+\\):\\(.*\\)\\'") - -;;;###autoload -(defun magit-remote-prune (remote) - "Remove stale remote-tracking branches for REMOTE." - (interactive (list (magit-read-remote "Prune stale branches of remote"))) - (magit-run-git-async "remote" "prune" remote)) - -;;;###autoload -(defun magit-remote-prune-refspecs (remote) - "Remove stale refspecs for REMOTE. - -A refspec is stale if there no longer exists at least one branch -on the remote that would be fetched due to that refspec. A stale -refspec is problematic because its existence causes Git to refuse -to fetch according to the remaining non-stale refspecs. - -If only stale refspecs remain, then offer to either delete the -remote or to replace the stale refspecs with the default refspec. - -Also remove the remote-tracking branches that were created due to -the now stale refspecs. Other stale branches are not removed." - (interactive (list (magit-read-remote "Prune refspecs of remote"))) - (let* ((tracking-refs (magit-list-remote-branches remote)) - (remote-refs (magit-remote-list-refs remote)) - (variable (format "remote.%s.fetch" remote)) - (refspecs (magit-get-all variable)) - stale) - (dolist (refspec refspecs) - (when (string-match magit--refspec-re refspec) - (let ((theirs (match-string 2 refspec)) - (ours (match-string 3 refspec))) - (unless (if (string-match "\\*" theirs) - (let ((re (replace-match ".*" t t theirs))) - (--some (string-match-p re it) remote-refs)) - (member theirs remote-refs)) - (push (cons refspec - (if (string-match "\\*" ours) - (let ((re (replace-match ".*" t t ours))) - (--filter (string-match-p re it) tracking-refs)) - (list (car (member ours tracking-refs))))) - stale))))) - (if (not stale) - (message "No stale refspecs for remote %S" remote) - (if (= (length stale) - (length refspecs)) - (magit-read-char-case - (format "All of %s's refspecs are stale. " remote) nil - (?s "replace with [d]efault refspec" - (magit-set-all - (list (format "+refs/heads/*:refs/remotes/%s/*" remote)) - variable)) - (?r "[r]emove remote" - (magit-call-git "remote" "rm" remote)) - (?a "or [a]abort" - (user-error "Abort"))) - (if (if (= (length stale) 1) - (pcase-let ((`(,refspec . ,refs) (car stale))) - (magit-confirm 'prune-stale-refspecs - (format "Prune stale refspec %s and branch %%s" refspec) - (format "Prune stale refspec %s and %%i branches" refspec) - nil refs)) - (magit-confirm 'prune-stale-refspecs nil - (format "Prune %%i stale refspecs and %i branches" - (length (cl-mapcan (lambda (s) (copy-sequence (cdr s))) - stale))) - nil - (mapcar (pcase-lambda (`(,refspec . ,refs)) - (concat refspec "\n" - (mapconcat (lambda (b) (concat " " b)) - refs "\n"))) - stale))) - (pcase-dolist (`(,refspec . ,refs) stale) - (magit-call-git "config" "--unset" variable - (regexp-quote refspec)) - (magit--log-action - (lambda (refs) - (format "Deleting %i branches" (length refs))) - (lambda (ref) - (format "Deleting branch %s (was %s)" ref - (magit-rev-parse "--short" ref))) - refs) - (dolist (ref refs) - (magit-call-git "update-ref" "-d" ref))) - (user-error "Abort"))) - (magit-refresh)))) - -;;;###autoload -(defun magit-remote-set-head (remote &optional branch) - "Set the local representation of REMOTE's default branch. -Query REMOTE and set the symbolic-ref refs/remotes//HEAD -accordingly. With a prefix argument query for the branch to be -used, which allows you to select an incorrect value if you fancy -doing that." - (interactive - (let ((remote (magit-read-remote "Set HEAD for remote"))) - (list remote - (and current-prefix-arg - (magit-read-remote-branch (format "Set %s/HEAD to" remote) - remote nil nil t))))) - (magit-run-git "remote" "set-head" remote (or branch "--auto"))) - -;;;###autoload -(defun magit-remote-unset-head (remote) - "Unset the local representation of REMOTE's default branch. -Delete the symbolic-ref \"refs/remotes//HEAD\"." - (interactive (list (magit-read-remote "Unset HEAD for remote"))) - (magit-run-git "remote" "set-head" remote "--delete")) - -;;;; Config Popup - -(defvar magit-remote-config--remote nil) - -;;;###autoload -(defun magit-remote-config-popup (remote) - "Popup console for setting remote variables." - (interactive - (list (if (or current-prefix-arg - (and (eq magit-current-popup 'magit-remote-popup) - magit-remote-popup-show-variables)) - (magit-read-remote "Configure remote") - (magit-remote-config--remote-1)))) - (let ((magit-remote-config--remote remote)) - (magit-invoke-popup 'magit-remote-config-popup nil nil))) - -(defvar magit-remote-config-variables - '((lambda () - (concat - (propertize "Configure " 'face 'magit-popup-heading) - (propertize (magit-remote-config--remote) 'face 'magit-branch-remote))) - (?u "remote.%s.url" - magit-set-remote*url - magit-format-remote*url) - (?U "remote.%s.fetch" - magit-set-remote*fetch - magit-format-remote*fetch) - (?s "remote.%s.pushurl" - magit-set-remote*pushurl - magit-format-remote*pushurl) - (?S "remote.%s.push" - magit-set-remote*push - magit-format-remote*push) - (?O "remote.%s.tagOpt" - magit-cycle-remote*tagOpt - magit-format-remote*tagOpt))) - -(defvar magit-remote-config-popup - `(:man-page "git-remote" - :variables ,magit-remote-config-variables - :setup-function magit-remote-config-popup-setup)) - -(defun magit-remote-config-popup-setup (val def) - (magit-popup-default-setup val def) - (setq-local magit-remote-config--remote magit-remote-config--remote)) - -(defun magit-remote-config--remote (&optional prompt) - (if prompt - (or (and (not current-prefix-arg) - (or magit-remote-config--remote - (magit-remote-config--remote-1))) - (magit-read-remote prompt)) - (or magit-remote-config--remote - (magit-remote-config--remote-1) - ""))) - -(defun magit-remote-config--remote-1 () - (let ((remote (magit-get-upstream-remote))) - (if (or (not remote) - (equal remote ".")) - (and (magit-remote-p "origin") "origin") - remote))) - -;;;; Config Commands and Inserters - -(defun magit-set-remote*url (remote urls) - "Set the variable `url' for the remote named REMOTE to URLS." - (interactive (magit-remote-config--read-args "url" "Urls: ")) - (magit-remote-config--set-url remote "url" urls)) - -(defun magit-set-remote*fetch (remote values) - "Set the variable `fetch' for the remote named REMOTE to VALUES." - (interactive (magit-remote-config--read-args "fetch" "Fetch specs: ")) - (magit-set-all values "remote" remote "fetch") - (magit-refresh)) - -(defun magit-set-remote*pushurl (remote urls) - "Set the variable `pushurl' for the remote named REMOTE to URLS." - (interactive (magit-remote-config--read-args "pushurl" "Urls: ")) - (magit-remote-config--set-url remote "pushurl" urls "--push")) - -(defun magit-set-remote*push (remote values) - "Set the variable `push' for the remote named REMOTE to VALUES." - (interactive (magit-remote-config--read-args "push" "Push specs: ")) - (magit-set-all values "remote" remote "push") - (magit-refresh)) - -(defun magit-cycle-remote*tagOpt (remote) - (interactive (list (magit-remote-config--remote))) - (magit--set-popup-variable (format "remote.%s.tagOpt" remote) - '("--no-tags" "--tags") nil)) - -(defun magit-format-remote*url () - (magit-remote-config--format-variable "url")) - -(defun magit-format-remote*fetch () - (magit-remote-config--format-variable "fetch")) - -(defun magit-format-remote*pushurl () - (magit-remote-config--format-variable "pushurl")) - -(defun magit-format-remote*push () - (magit-remote-config--format-variable "push")) - -(defun magit-format-remote*tagOpt () - (let ((remote (magit-remote-config--remote))) - (magit--format-popup-variable:choices - (format "remote.%s.tagOpts" remote) - '("--no-tags" "--tags") nil nil - (+ (length remote) 16)))) - -(defun magit-remote-config--read-args (var prompt) - (let* ((remote (magit-remote-config--remote (format "Set `%s' of remote" var))) - (value (magit-get-all "remote" remote var))) - (list remote - (mapcar (lambda (url) - (if (string-prefix-p "~" url) - (expand-file-name url) - url)) - (completing-read-multiple - prompt nil nil nil - (and value (mapconcat #'identity value ","))))))) - -(defun magit-remote-config--set-url (remote var values &optional arg) - (let ((old (magit-get-all "remote" remote var))) - (dolist (v (-difference values old)) - (magit-call-git "remote" "set-url" arg "--add" remote v)) - (dolist (v (-difference old values)) - (magit-call-git "remote" "set-url" arg "--delete" remote - (concat "^" (regexp-quote v) "$")))) - (magit-refresh)) - -(defun magit-remote-config--format-variable (variable) - (magit--format-popup-variable:values - (format "remote.%s.%s" (magit-remote-config--remote) variable) - 25)) - -;;; Fetch - -;;;###autoload (autoload 'magit-fetch-popup "magit-remote" nil t) -(magit-define-popup magit-fetch-popup - "Popup console for fetch commands." - :man-page "git-fetch" - :switches '((?p "Prune deleted branches" "--prune")) - :actions '("Configure" - (?C "variables..." magit-branch-config-popup) - "Fetch from" - (?p magit-get-push-remote magit-fetch-from-pushremote) - (?u magit-get-remote magit-fetch-from-upstream) - (?e "elsewhere" magit-fetch) - (?a "all remotes" magit-fetch-all) - "Fetch" - (?o "another branch" magit-fetch-branch) - (?r "explicit refspec" magit-fetch-refspec) - (?m "submodules" magit-fetch-modules)) - :default-action 'magit-fetch - :max-action-columns 1) - -(defun magit-git-fetch (remote args) - (run-hooks 'magit-credential-hook) - (magit-run-git-async "fetch" remote args)) - -;;;###autoload -(defun magit-fetch-from-pushremote (args) - "Fetch from the push-remote of the current branch." - (interactive (list (magit-fetch-arguments))) - (--if-let (magit-get-push-remote) - (magit-git-fetch it args) - (--if-let (magit-get-current-branch) - (user-error "No push-remote is configured for %s" it) - (user-error "No branch is checked out")))) - -;;;###autoload -(defun magit-fetch-from-upstream (args) - "Fetch from the upstream repository of the current branch." - (interactive (list (magit-fetch-arguments))) - (--if-let (magit-get-remote) - (magit-git-fetch it args) - (--if-let (magit-get-current-branch) - (user-error "No upstream is configured for %s" it) - (user-error "No branch is checked out")))) - -;;;###autoload -(defun magit-fetch (remote args) - "Fetch from another repository." - (interactive (list (magit-read-remote "Fetch remote") - (magit-fetch-arguments))) - (magit-git-fetch remote args)) - -;;;###autoload -(defun magit-fetch-branch (remote branch args) - "Fetch a BRANCH from a REMOTE." - (interactive - (let ((remote (magit-read-remote-or-url "Fetch from remote or url"))) - (list remote - (magit-read-remote-branch "Fetch branch" remote) - (magit-fetch-arguments)))) - (magit-git-fetch remote (cons branch args))) - -;;;###autoload -(defun magit-fetch-refspec (remote refspec args) - "Fetch a REFSPEC from a REMOTE." - (interactive - (let ((remote (magit-read-remote-or-url "Fetch from remote or url"))) - (list remote - (magit-read-refspec "Fetch using refspec" remote) - (magit-fetch-arguments)))) - (magit-git-fetch remote (cons refspec args))) - -;;;###autoload -(defun magit-fetch-all (args) - "Fetch from all remotes." - (interactive (list (cl-intersection (magit-fetch-arguments) - (list "--verbose" "--prune") - :test #'equal))) - (run-hooks 'magit-credential-hook) - (magit-run-git-async "remote" "update" args)) - -;;;###autoload -(defun magit-fetch-all-prune () - "Fetch from all remotes, and prune. -Prune remote tracking branches for branches that have been -removed on the respective remote." - (interactive) - (run-hooks 'magit-credential-hook) - (magit-run-git-async "remote" "update" "--prune")) - -;;;###autoload -(defun magit-fetch-all-no-prune () - "Fetch from all remotes." - (interactive) - (run-hooks 'magit-credential-hook) - (magit-run-git-async "remote" "update")) - -;;;###autoload -(defun magit-fetch-modules (&optional all) - "Fetch all submodules. - -Option `magit-fetch-modules-jobs' controls how many submodules -are being fetched in parallel. Also fetch the super-repository, -because `git-fetch' does not support not doing that. With a -prefix argument fetch all remotes." - (interactive "P") - (magit-with-toplevel - (magit-run-git-async - "fetch" "--verbose" "--recurse-submodules" - (and magit-fetch-modules-jobs - (version<= "2.8.0" (magit-git-version)) - (list "-j" (number-to-string magit-fetch-modules-jobs))) - (and all "--all")))) - -;;; Pull - -;;;###autoload (autoload 'magit-pull-popup "magit-remote" nil t) -(magit-define-popup magit-pull-popup - "Popup console for pull commands." - :man-page "git-pull" - :variables '("Configure" - (?r "branch.%s.rebase" - magit-cycle-branch*rebase - magit-pull-format-branch*rebase) - (?C "variables..." magit-branch-config-popup)) - :actions '((lambda () - (--if-let (magit-get-current-branch) - (concat - (propertize "Pull into " 'face 'magit-popup-heading) - (propertize it 'face 'magit-branch-local) - (propertize " from" 'face 'magit-popup-heading)) - (propertize "Pull from" 'face 'magit-popup-heading))) - (?p magit-get-push-branch magit-pull-from-pushremote) - (?u magit-get-upstream-branch magit-pull-from-upstream) - (?e "elsewhere" magit-pull)) - :default-action 'magit-pull - :max-action-columns 1) - -;;;###autoload (autoload 'magit-pull-and-fetch-popup "magit-remote" nil t) -(magit-define-popup magit-pull-and-fetch-popup - "Popup console for pull and fetch commands. - -This popup is intended as a replacement for the separate popups -`magit-pull-popup' and `magit-fetch-popup'. To use it, add this -to your init file: - - (with-eval-after-load \\='magit-remote - (define-key magit-mode-map \"f\" \\='magit-pull-and-fetch-popup) - (define-key magit-mode-map \"F\" nil)) - -The combined popup does not offer all commands and arguments -available from the individual popups. Instead of the argument -`--prune' and the command `magit-fetch-all' it uses two commands -`magit-fetch-prune' and `magit-fetch-no-prune'. And the commands -`magit-fetch-from-pushremote' and `magit-fetch-from-upstream' are -missing. To add them use something like: - - (with-eval-after-load \\='magit-remote - (magit-define-popup-action \\='magit-pull-and-fetch-popup ?U - \\='magit-get-upstream-branch - \\='magit-fetch-from-upstream-remote ?F) - (magit-define-popup-action \\='magit-pull-and-fetch-popup ?P - \\='magit-get-push-branch - \\='magit-fetch-from-push-remote ?F))" - :man-page "git-pull" - :variables '("Configure" - (?r "branch.%s.rebase" - magit-cycle-branch*rebase - magit-pull-format-branch*rebase) - (?C "variables..." magit-branch-config-popup)) - :actions '((lambda () - (--if-let (magit-get-current-branch) - (concat - (propertize "Pull into " 'face 'magit-popup-heading) - (propertize it 'face 'magit-branch-local) - (propertize " from" 'face 'magit-popup-heading)) - (propertize "Pull from" 'face 'magit-popup-heading))) - (?p magit-get-push-branch magit-pull-from-pushremote) - (?u magit-get-upstream-branch magit-pull-from-upstream) - (?e "elsewhere" magit-pull) - "Fetch from" - (?f "remotes" magit-fetch-all-no-prune) - (?F "remotes and prune" magit-fetch-all-prune) - "Fetch" - (?o "another branch" magit-fetch-branch) - (?s "explicit refspec" magit-fetch-refspec) - (?m "submodules" magit-fetch-modules)) - :default-action 'magit-fetch - :max-action-columns 1) - -(defun magit-pull-format-branch*rebase () - (magit--format-popup-variable:choices - (format "branch.%s.rebase" (or (magit-get-current-branch) "")) - '("true" "false") - "false" "pull.rebase")) - -(defun magit-git-pull (source args) - (run-hooks 'magit-credential-hook) - (pcase-let ((`(,remote . ,branch) - (magit-split-branch-name source))) - (magit-run-git-with-editor "pull" args remote branch))) - -;;;###autoload -(defun magit-pull-from-pushremote (args) - "Pull from the push-remote of the current branch." - (interactive (list (magit-pull-arguments))) - (--if-let (magit-get-push-branch) - (magit-git-pull it args) - (--if-let (magit-get-current-branch) - (user-error "No push-remote is configured for %s" it) - (user-error "No branch is checked out")))) - -;;;###autoload -(defun magit-pull-from-upstream (args) - "Pull from the upstream of the current branch." - (interactive (list (magit-pull-arguments))) - (--if-let (magit-get-upstream-branch) - (progn (run-hooks 'magit-credential-hook) - (magit-run-git-with-editor - "pull" args (car (magit-split-branch-name it)))) - (--if-let (magit-get-current-branch) - (user-error "No upstream is configured for %s" it) - (user-error "No branch is checked out")))) - -;;;###autoload -(defun magit-pull (source args) - "Pull from a branch read in the minibuffer." - (interactive (list (magit-read-remote-branch "Pull" nil nil nil t) - (magit-pull-arguments))) - (magit-git-pull source args)) - -;;; Push - -(defcustom magit-push-current-set-remote-if-missing t - "Whether to configure missing remotes before pushing. - -When nil, then the command `magit-push-current-to-pushremote' and -`magit-push-current-to-upstream' do not appear in the push popup -if the push-remote resp. upstream is not configured. If the user -invokes one of these commands anyway, then it raises an error. - -When non-nil, then these commands always appear in the push -popup. But if the required configuration is missing, then they -do appear in a way that indicates that this is the case. If the -user invokes one of them, then it asks for the necessary -configuration, stores the configuration, and then uses it to push -a first time. - -This option also affects whether the argument `--set-upstream' is -available in the popup. If the value is t, then that argument is -redundant. But note that changing the value of this option does -not take affect immediately, the argument will only be added or -removed after restarting Emacs." - :package-version '(magit . "2.6.0") - :group 'magit-commands - :type '(choice (const :tag "don't set" nil) - (const :tag "set branch..pushRemote" t) - (const :tag "set remote.pushDefault" default))) - -;;;###autoload (autoload 'magit-push-popup "magit-remote" nil t) -(magit-define-popup magit-push-popup - "Popup console for push commands." - :man-page "git-push" - :switches `((?f "Force with lease" "--force-with-lease") - (?F "Force" "--force") - (?h "Disable hooks" "--no-verify") - (?d "Dry run" "--dry-run") - ,@(and (not magit-push-current-set-remote-if-missing) - '((?u "Set upstream" "--set-upstream")))) - :actions '("Configure" - (?C "variables..." magit-branch-config-popup) - (lambda () - (--when-let (magit-get-current-branch) - (concat (propertize "Push " 'face 'magit-popup-heading) - (propertize it 'face 'magit-branch-local) - (propertize " to" 'face 'magit-popup-heading)))) - (?p magit--push-current-to-pushremote-desc - magit-push-current-to-pushremote) - (?u magit--push-current-to-upstream-desc - magit-push-current-to-upstream) - (?e "elsewhere\n" magit-push-current) - "Push" - (?o "another branch" magit-push) - (?T "a tag" magit-push-tag) - (?r "explicit refspecs" magit-push-refspecs) - (?t "all tags" magit-push-tags) - (?m "matching branches" magit-push-matching)) - :max-action-columns 2) - -(defun magit-git-push (branch target args) - (run-hooks 'magit-credential-hook) - (pcase-let ((`(,remote . ,target) - (magit-split-branch-name target))) - (magit-run-git-async "push" "-v" args remote - (format "%s:refs/heads/%s" branch target)))) - -;;;###autoload -(defun magit-push-current-to-pushremote (args &optional push-remote) - "Push the current branch to `branch..pushRemote'. -If that variable is unset, then push to `remote.pushDefault'. - -When `magit-push-current-set-remote-if-missing' is non-nil and -the push-remote is not configured, then read the push-remote from -the user, set it, and then push to it. With a prefix argument -the push-remote can be changed before pushed to it." - (interactive - (list (magit-push-arguments) - (and (magit--push-current-set-pushremote-p current-prefix-arg) - (magit-read-remote - (if (eq magit-push-current-set-remote-if-missing 'default) - "Set `remote.pushDefault' and push there" - (format "Set `branch.%s.pushRemote' and push there" - (magit-get-current-branch))))))) - (--if-let (magit-get-current-branch) - (progn (when push-remote - (setf (magit-get - (if (eq magit-push-current-set-remote-if-missing 'default) - "remote.pushDefault" - (format "branch.%s.pushRemote" it))) - push-remote)) - (if-let ((remote (magit-get-push-remote it))) - (if (member remote (magit-list-remotes)) - (magit-git-push it (concat remote "/" it) args) - (user-error "Remote `%s' doesn't exist" remote)) - (user-error "No push-remote is configured for %s" it))) - (user-error "No branch is checked out"))) - -(defun magit--push-current-set-pushremote-p (&optional change) - (and (or change - (and magit-push-current-set-remote-if-missing - (not (magit-get-push-remote)))) - (magit-get-current-branch))) - -(defun magit--push-current-to-pushremote-desc () - (--if-let (magit-get-push-branch) - (concat (magit-branch-set-face it) "\n") - (and (magit--push-current-set-pushremote-p) - (concat - (propertize (if (eq magit-push-current-set-remote-if-missing 'default) - "pushDefault" - "pushRemote") - 'face 'bold) - ", after setting that\n")))) - -;;;###autoload -(defun magit-push-current-to-upstream (args &optional upstream) - "Push the current branch to its upstream branch. - -When `magit-push-current-set-remote-if-missing' is non-nil and -the upstream is not configured, then read the upstream from the -user, set it, and then push to it. With a prefix argument the -upstream can be changed before pushed to it." - (interactive - (list (magit-push-arguments) - (and (magit--push-current-set-upstream-p current-prefix-arg) - (magit-read-upstream-branch)))) - (--if-let (magit-get-current-branch) - (progn - (when upstream - (magit-set-branch*merge/remote it upstream)) - (if-let ((target (magit-get-upstream-branch it))) - (magit-git-push it target args) - (user-error "No upstream is configured for %s" it))) - (user-error "No branch is checked out"))) - -(defun magit--push-current-set-upstream-p (&optional change) - (and (or change - (and magit-push-current-set-remote-if-missing - (not (magit-get-upstream-branch)))) - (magit-get-current-branch))) - -(defun magit--push-current-to-upstream-desc () - (--if-let (magit-get-upstream-branch) - (concat (magit-branch-set-face it) "\n") - (and (magit--push-current-set-upstream-p) - (concat (propertize "@{upstream}" 'face 'bold) - ", after setting that\n")))) - -;;;###autoload -(defun magit-push-current (target args) - "Push the current branch to a branch read in the minibuffer." - (interactive - (--if-let (magit-get-current-branch) - (list (magit-read-remote-branch (format "Push %s to" it) - nil nil it 'confirm) - (magit-push-arguments)) - (user-error "No branch is checked out"))) - (magit-git-push (magit-get-current-branch) target args)) - -;;;###autoload -(defun magit-push (source target args) - "Push an arbitrary branch or commit somewhere. -Both the source and the target are read in the minibuffer." - (interactive - (let ((source (magit-read-local-branch-or-commit "Push"))) - (list source - (magit-read-remote-branch - (format "Push %s to" source) nil - (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-git-push source target args)) - -(defvar magit-push-refspecs-history nil) - -;;;###autoload -(defun magit-push-refspecs (remote refspecs args) - "Push one or multiple REFSPECS to a REMOTE. -Both the REMOTE and the REFSPECS are read in the minibuffer. To -use multiple REFSPECS, separate them with commas. Completion is -only available for the part before the colon, or when no colon -is used." - (interactive - (list (magit-read-remote "Push to remote") - (split-string (magit-completing-read-multiple - "Push refspec,s" - (cons "HEAD" (magit-list-local-branch-names)) - nil nil 'magit-push-refspecs-history) - crm-default-separator t) - (magit-push-arguments))) - (run-hooks 'magit-credential-hook) - (magit-run-git-async "push" "-v" args remote refspecs)) - -;;;###autoload -(defun magit-push-matching (remote &optional args) - "Push all matching branches to another repository. -If multiple remotes exist, then read one from the user. -If just one exists, use that without requiring confirmation." - (interactive (list (magit-read-remote "Push matching branches to" nil t) - (magit-push-arguments))) - (run-hooks 'magit-credential-hook) - (magit-run-git-async "push" "-v" args remote ":")) - -;;;###autoload -(defun magit-push-tags (remote &optional args) - "Push all tags to another repository. -If only one remote exists, then push to that. Otherwise prompt -for a remote, offering the remote configured for the current -branch as default." - (interactive (list (magit-read-remote "Push tags to remote" nil t) - (magit-push-arguments))) - (run-hooks 'magit-credential-hook) - (magit-run-git-async "push" remote "--tags" args)) - -;;;###autoload -(defun magit-push-tag (tag remote &optional args) - "Push a tag to another repository." - (interactive - (let ((tag (magit-read-tag "Push tag"))) - (list tag (magit-read-remote (format "Push %s to remote" tag) nil t) - (magit-push-arguments)))) - (run-hooks 'magit-credential-hook) - (magit-run-git-async "push" remote tag args)) - -;;;###autoload -(defun magit-push-implicitly (args) - "Push somewhere without using an explicit refspec. - -This command simply runs \"git push -v [ARGS]\". ARGS are the -arguments specified in the popup buffer. No explicit refspec -arguments are used. Instead the behavior depends on at least -these Git variables: `push.default', `remote.pushDefault', -`branch..pushRemote', `branch..remote', -`branch..merge', and `remote..push'. - -To add this command to the push popup add this to your init file: - - (with-eval-after-load \\='magit-remote - (magit-define-popup-action \\='magit-push-popup ?P - \\='magit-push-implicitly--desc - \\='magit-push-implicitly ?p t)) - -The function `magit-push-implicitly--desc' attempts to predict -what this command will do. The value it returns is displayed in -the popup buffer." - (interactive (list (magit-push-arguments))) - (run-hooks 'magit-credential-hook) - (magit-run-git-async "push" "-v" args)) - -(defun magit-push-implicitly--desc () - (let ((default (magit-get "push.default"))) - (unless (equal default "nothing") - (or (when-let ((remote (or (magit-get-remote) - (magit-remote-p "origin"))) - (refspec (magit-get "remote" remote "push"))) - (format "%s using %s" - (propertize remote 'face 'magit-branch-remote) - (propertize refspec 'face 'bold))) - (--when-let (and (not (magit-get-push-branch)) - (magit-get-upstream-branch)) - (format "%s aka %s\n" - (magit-branch-set-face it) - (propertize "@{upstream}" 'face 'bold))) - (--when-let (magit-get-push-branch) - (format "%s aka %s\n" - (magit-branch-set-face it) - (propertize "pushRemote" 'face 'bold))) - (--when-let (magit-get-@{push}-branch) - (format "%s aka %s\n" - (magit-branch-set-face it) - (propertize "@{push}" 'face 'bold))) - (format "using %s (%s is %s)\n" - (propertize "git push" 'face 'bold) - (propertize "push.default" 'face 'bold) - (propertize default 'face 'bold)))))) - -;;;###autoload -(defun magit-push-to-remote (remote args) - "Push to REMOTE without using an explicit refspec. -The REMOTE is read in the minibuffer. - -This command simply runs \"git push -v [ARGS] REMOTE\". ARGS -are the arguments specified in the popup buffer. No refspec -arguments are used. Instead the behavior depends on at least -these Git variables: `push.default', `remote.pushDefault', -`branch..pushRemote', `branch..remote', -`branch..merge', and `remote..push'. - -To add this command to the push popup add this to your init file: - - (with-eval-after-load \\='magit-remote - (magit-define-popup-action \\='magit-push-popup ?r - \\='magit-push-to-remote--desc - \\='magit-push-to-remote ?p t))" - (interactive (list (magit-read-remote "Push to remote") - (magit-push-arguments))) - (run-hooks 'magit-credential-hook) - (magit-run-git-async "push" "-v" args remote)) - -(defun magit-push-to-remote--desc () - (format "using %s\n" (propertize "git push " 'face 'bold))) - -;;; Email - -;;;###autoload (autoload 'magit-patch-popup "magit-remote" nil t) -(magit-define-popup magit-patch-popup - "Popup console for patch commands." - :man-page "git-format-patch" - :switches '("Switches for formatting patches" - (?l "Add cover letter" "--cover-letter")) - :options '("Options for formatting patches" - (?f "From" "--from=") - (?t "To" "--to=") - (?c "CC" "--cc=") - (?r "In reply to" "--in-reply-to=") - (?P "Subject Prefix" "--subject-prefix=") - (?v "Reroll count" "--reroll-count=") - (?s "Thread style" "--thread=") - (?U "Context lines" "-U") - (?M "Detect renames" "-M") - (?C "Detect copies" "-C") - (?A "Diff algorithm" "--diff-algorithm=" - magit-diff-select-algorithm) - (?o "Output directory" "--output-directory=")) - :actions '((?p "Format patches" magit-format-patch) - (?r "Request pull" magit-request-pull)) - :default-action 'magit-format-patch) - -;;;###autoload -(defun magit-format-patch (range args) - "Create patches for the commits in RANGE. -When a single commit is given for RANGE, create a patch for the -changes introduced by that commit (unlike 'git format-patch' -which creates patches for all commits that are reachable from -`HEAD' but not from the specified commit)." - (interactive - (list (if-let ((revs (magit-region-values 'commit t))) - (concat (car (last revs)) "^.." (car revs)) - (let ((range (magit-read-range-or-commit "Format range or commit"))) - (if (string-match-p "\\.\\." range) - range - (format "%s~..%s" range range)))) - (magit-patch-arguments))) - (magit-call-git "format-patch" range args) - (when (member "--cover-letter" args) - (find-file - (expand-file-name - "0000-cover-letter.patch" - (let ((topdir (magit-toplevel))) - (or (--some (and (string-match "--output-directory=\\(.+\\)" it) - (expand-file-name (match-string 1 it) topdir)) - args) - topdir)))))) - -;;;###autoload -(defun magit-request-pull (url start end) - "Request upstream to pull from you public repository. - -URL is the url of your publically accessible repository. -START is a commit that already is in the upstream repository. -END is the last commit, usually a branch name, which upstream -is asked to pull. START has to be reachable from that commit." - (interactive - (list (magit-get "remote" (magit-read-remote "Remote") "url") - (magit-read-branch-or-commit "Start" (magit-get-upstream-branch)) - (magit-read-branch-or-commit "End"))) - (let ((dir default-directory)) - ;; mu4e changes default-directory - (compose-mail) - (setq default-directory dir)) - (message-goto-body) - (magit-git-insert "request-pull" start url end) - (set-buffer-modified-p nil)) - -(provide 'magit-remote) -;;; magit-remote.el ends here diff --git a/elpa/magit-20180828.1055/magit.info b/elpa/magit-20180828.1055/magit.info deleted file mode 100644 index 33e80620..00000000 --- a/elpa/magit-20180828.1055/magit.info +++ /dev/null @@ -1,184 +0,0 @@ -This is magit.info, produced by makeinfo version 6.5 from magit.texi. - - Copyright (C) 2015-2018 Jonas Bernoulli - - You can redistribute this document and/or modify it under the terms - of the GNU General Public License as published by the Free Software - Foundation, either version 3 of the License, or (at your option) - any later version. - - This document is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. -INFO-DIR-SECTION Emacs -START-INFO-DIR-ENTRY -* Magit: (magit). Using Git from Emacs with Magit. -END-INFO-DIR-ENTRY - - -Indirect: -magit.info-1: 753 -magit.info-2: 305278 - -Tag Table: -(Indirect) -Node: Top753 -Node: Introduction6268 -Node: Installation10991 -Node: Installing from an Elpa Archive11331 -Node: Installing from the Git Repository12434 -Node: Post-Installation Tasks15187 -Node: Getting Started16472 -Node: Interface Concepts21819 -Node: Modes and Buffers22150 -Node: Switching Buffers23895 -Node: Naming Buffers28438 -Node: Quitting Windows31745 -Node: Automatic Refreshing of Magit Buffers33377 -Node: Automatic Saving of File-Visiting Buffers36145 -Node: Automatic Reverting of File-Visiting Buffers37330 -Node: Risk of Reverting Automatically42326 -Node: Sections44709 -Node: Section Movement45650 -Node: Section Visibility49747 -Node: Section Hooks54606 -Node: Section Types and Values57013 -Node: Section Options58316 -Node: Popup Buffers and Prefix Commands58788 -Node: Completion Confirmation and the Selection61169 -Node: Action Confirmation61606 -Node: Completion and Confirmation68952 -Node: The Selection72138 -Node: The hunk-internal region75037 -Node: Support for Completion Frameworks76126 -Node: Additional Completion Options80942 -Node: Running Git81541 -Node: Viewing Git Output81814 -Node: Git Process Status82947 -Node: Running Git Manually83912 -Node: Git Executable86314 -Node: Global Git Arguments88596 -Node: Inspecting89402 -Node: Status Buffer90549 -Node: Status Sections93313 -Node: Status Header Sections98116 -Node: Status Module Sections100746 -Node: Status Options103251 -Node: Repository List105005 -Node: Logging107163 -Node: Refreshing Logs109610 -Node: Log Buffer110995 -Node: Log Margin114790 -Node: Select from Log117430 -Node: Reflog119534 -Node: Cherries121051 -Node: Diffing122778 -Node: Refreshing Diffs125725 -Node: Diff Buffer129216 -Node: Diff Options133554 -Node: Revision Buffer137829 -Node: Ediffing140367 -Node: References Buffer143963 -Node: References Sections153728 -Node: Bisecting154589 -Node: Visiting Blobs156327 -Node: Blaming156837 -Node: Manipulating162612 -Node: Repository Setup162928 -Node: Staging and Unstaging163968 -Node: Staging from File-Visiting Buffers168049 -Node: Applying169217 -Node: Committing171110 -Node: Initiating a Commit171693 -Node: Editing Commit Messages175014 -Node: Branching185410 -Node: The Two Remotes185640 -Node: The Branch Popup188257 -Node: The Branch Config Popup205310 -Node: Auxillary Branch Commands211251 -Node: Merging212354 -Node: Resolving Conflicts216279 -Node: Rebasing221280 -Node: Editing Rebase Sequences225437 -Node: Information About In-Progress Rebase228467 -Ref: Information About In-Progress Rebase-Footnote-1237216 -Node: Cherry Picking237812 -Node: Reverting242064 -Node: Resetting243427 -Node: Stashing245038 -Node: Transferring249551 -Node: Remotes249789 -Node: The Remote Popup249945 -Node: The Remote Config Popup253413 -Node: Fetching255069 -Node: Pulling256425 -Node: Pushing257261 -Node: Creating and Sending Patches261996 -Node: Applying Patches262833 -Node: Miscellaneous264419 -Node: Tagging264735 -Node: Notes266076 -Node: Submodules268387 -Node: Listing Submodules268601 -Node: Submodule Popup270525 -Node: Subtree272978 -Node: Worktree274218 -Node: Common Commands275428 -Node: Wip Modes277175 -Node: Minor Mode for Buffers Visiting Files286050 -Node: Minor Mode for Buffers Visiting Blobs291457 -Node: Customizing292270 -Node: Per-Repository Configuration293938 -Node: Essential Settings295587 -Node: Safety295911 -Node: Performance297676 -Node: Microsoft Windows Performance305278 -Node: MacOS Performance306469 -Ref: MacOS Performance-Footnote-1307705 -Ref: MacOS Performance-Footnote-2307787 -Ref: MacOS Performance-Footnote-3307847 -Node: Plumbing308013 -Node: Calling Git308836 -Node: Getting a Value from Git310361 -Node: Calling Git for Effect313447 -Node: Section Plumbing319967 -Node: Creating Sections320195 -Node: Section Selection324095 -Node: Matching Sections325775 -Node: Refreshing Buffers331227 -Node: Conventions334369 -Node: Theming Faces334561 -Node: FAQ342676 -Node: FAQ - How to ...?343118 -Node: How to show git's output?343478 -Node: How to install the gitman info manual?344232 -Node: How to show diffs for gpg-encrypted files?345202 -Node: How does branching and pushing work?345798 -Node: Can Magit be used as ediff-version-control-package?346161 -Node: FAQ - Issues and Errors348150 -Node: Magit is slow349082 -Node: I changed several thousand files at once and now Magit is unusable349296 -Node: I am having problems committing350025 -Node: I am using MS Windows and cannot push with Magit350506 -Node: I am using OS X and SOMETHING works in shell but not in Magit351123 -Node: Diffs contain control sequences351929 -Node: Expanding a file to show the diff causes it to disappear353003 -Node: Point is wrong in the COMMIT_EDITMSG buffer353554 -Node: The mode-line information isn't always up-to-date354600 -Node: A branch and tag sharing the same name breaks SOMETHING355682 -Node: My Git hooks work on the command-line but not inside Magit356570 -Node: git-commit-mode isn't used when committing from the command-line357407 -Node: Point ends up inside invisible text when jumping to a file-visiting buffer359674 -Node: Debugging Tools360472 -Node: Keystroke Index362349 -Node: Command Index394362 -Node: Function Index429235 -Node: Variable Index444689 - -End Tag Table - - -Local Variables: -coding: utf-8 -End: diff --git a/elpa/magit-20180828.1055/AUTHORS.md b/elpa/magit-20181110.1820/AUTHORS.md similarity index 98% rename from elpa/magit-20180828.1055/AUTHORS.md rename to elpa/magit-20181110.1820/AUTHORS.md index cf23aca2..1ff892fb 100644 --- a/elpa/magit-20180828.1055/AUTHORS.md +++ b/elpa/magit-20181110.1820/AUTHORS.md @@ -66,6 +66,7 @@ Contributors - Andriy Kmit' - Andy Sawyer - Aria Edmonds +- Arialdo Martini - Barak A. Pearlmutter - Bar Magal - Bart Bakker @@ -158,6 +159,7 @@ Contributors - Jonathan Leech-Pepin - Jonathan Roes - Jon Vanderwijk +- Jordan Galby - Jordan Greenberg - Josiah Schwab - Julien Danjou @@ -181,8 +183,10 @@ Contributors - Li-Yun Chang - Lluís Vilanova - Loic Dachary +- Louis Roché - Luís Oliveira - Luke Amdor +- Mak Kolybabi - Manuel Vázquez Acosta - Marcel Wolf - Marc Herbert @@ -220,6 +224,7 @@ Contributors - Nicolas Richard - Nikolay Martynov - Noam Postavsky +- N. Troy de Freitas - Ole Arndt - Oleh Krehel - Orivej Desh diff --git a/elpa/magit-20180828.1055/LICENSE b/elpa/magit-20181110.1820/LICENSE similarity index 100% rename from elpa/magit-20180828.1055/LICENSE rename to elpa/magit-20181110.1820/LICENSE diff --git a/elpa/magit-20180828.1055/dir b/elpa/magit-20181110.1820/dir similarity index 100% rename from elpa/magit-20180828.1055/dir rename to elpa/magit-20181110.1820/dir diff --git a/elpa/magit-20180828.1055/git-rebase.el b/elpa/magit-20181110.1820/git-rebase.el similarity index 99% rename from elpa/magit-20180828.1055/git-rebase.el rename to elpa/magit-20181110.1820/git-rebase.el index 63f50a8a..07577c5b 100644 --- a/elpa/magit-20180828.1055/git-rebase.el +++ b/elpa/magit-20181110.1820/git-rebase.el @@ -588,5 +588,6 @@ By default, this is the same except for the \"pick\" command." (add-to-list 'with-editor-file-name-history-exclude git-rebase-filename-regexp) +;;; _ (provide 'git-rebase) ;;; git-rebase.el ends here diff --git a/elpa/magit-20180828.1055/magit-apply.el b/elpa/magit-20181110.1820/magit-apply.el similarity index 93% rename from elpa/magit-20180828.1055/magit-apply.el rename to elpa/magit-20181110.1820/magit-apply.el index fde59e85..b99057ee 100644 --- a/elpa/magit-20180828.1055/magit-apply.el +++ b/elpa/magit-20181110.1820/magit-apply.el @@ -30,6 +30,9 @@ ;;; Code: +(eval-when-compile + (require 'subr-x)) + (require 'magit-core) (require 'magit-diff) (require 'magit-wip) @@ -91,6 +94,28 @@ rejected reversals." :group 'magit-commands :type 'boolean) +(defcustom magit-post-stage-hook nil + "Hook run after staging changes. +This hook is run by `magit-refresh' if `this-command' +is a member of `magit-post-stage-hook-commands'." + :package-version '(magit . "2.90.0") + :group 'magit-commands + :type 'hook) + +(defvar magit-post-stage-hook-commands + '(magit-stage magit-stage-file magit-stage-modified)) + +(defcustom magit-post-unstage-hook nil + "Hook run after unstaging changes. +This hook is run by `magit-refresh' if `this-command' +is a member of `magit-post-unstage-hook-commands'." + :package-version '(magit . "2.90.0") + :group 'magit-commands + :type 'hook) + +(defvar magit-post-unstage-hook-commands + '(magit-unstage magit-unstage-file magit-unstage-all)) + ;;; Commands ;;;; Apply @@ -165,14 +190,17 @@ so causes the change to be applied to the index as well." (command (symbol-name this-command)) (command (if (and command (string-match "^magit-\\([^-]+\\)" command)) (match-string 1 command) - "apply"))) + "apply")) + (no-context (not (magit-diff-context-p))) + (ignore-context (magit-diff-ignore-any-space-p))) (when (and magit-wip-before-change-mode (not inhibit-magit-refresh)) (magit-wip-commit-before-change files (concat " before " command))) (with-temp-buffer (insert patch) (magit-run-git-with-input "apply" args "-p0" - (unless (magit-diff-context-p) "--unidiff-zero") + (and no-context "--unidiff-zero") + (and ignore-context "-C0") "--ignore-space-change" "-")) (unless inhibit-magit-refresh (when magit-wip-after-apply-mode @@ -180,10 +208,10 @@ so causes the change to be applied to the index as well." (magit-refresh)))) (defun magit-apply--get-selection () - (or (magit-region-sections '(hunk file) t) + (or (magit-region-sections '(hunk file module) t) (let ((section (magit-current-section))) (pcase (oref section type) - ((or `hunk `file) section) + ((or `hunk `file `module) section) ((or `staged `unstaged `untracked `stashed-index `stashed-worktree `stashed-untracked) (oref section children)) @@ -243,7 +271,7 @@ With a prefix argument or when there is no file at point ask for the file to be staged. Otherwise stage the file at point without requiring confirmation." (interactive - (let* ((atpoint (magit-section-when (file))) + (let* ((atpoint (magit-section-value-if 'file)) (current (magit-file-relative-name)) (choices (nconc (magit-unstaged-files) (magit-untracked-files))) @@ -355,7 +383,7 @@ With a prefix argument or when there is no file at point ask for the file to be unstaged. Otherwise unstage the file at point without requiring confirmation." (interactive - (let* ((atpoint (magit-section-when (file))) + (let* ((atpoint (magit-section-value-if 'file)) (current (magit-file-relative-name)) (choices (magit-staged-files)) (default (car (member (or atpoint current) choices)))) @@ -561,7 +589,7 @@ without requiring confirmation." (when new-files (magit-call-git "add" "--" new-files) (magit-call-git "reset" "--" new-files)) - (let ((binaries (magit-staged-binary-files))) + (let ((binaries (magit-binary-files "--cached"))) (when binaries (setq sections (--remove (member (oref it value) binaries) @@ -619,13 +647,21 @@ so causes the change to be applied to the index as well." (defun magit-reverse-files (sections args) (pcase-let ((`(,binaries ,sections) - (let ((bs (magit-staged-binary-files))) + (let ((bs (magit-binary-files + (cond ((derived-mode-p 'magit-revision-mode) + (let ((rev (car magit-refresh-args))) + (format "%s^..%s" rev rev))) + ((derived-mode-p 'magit-diff-mode) + (car magit-refresh-args)) + (t + "--cached"))))) (--separate (member (oref it value) bs) sections)))) (magit-confirm-files 'reverse (--map (oref it value) sections)) - (if (= (length sections) 1) - (magit-reverse-apply (car sections) 'magit-apply-diff args) - (magit-reverse-apply sections 'magit-apply-diffs args)) + (cond ((= (length sections) 1) + (magit-reverse-apply (car sections) 'magit-apply-diff args)) + (sections + (magit-reverse-apply sections 'magit-apply-diffs args))) (when binaries (user-error "Cannot reverse binary files")))) @@ -654,5 +690,6 @@ a separate commit. A typical workflow would be: (interactive) (magit-reverse (cons "--cached" args))) +;;; _ (provide 'magit-apply) ;;; magit-apply.el ends here diff --git a/elpa/magit-20180828.1055/magit-autoloads.el b/elpa/magit-20181110.1820/magit-autoloads.el similarity index 91% rename from elpa/magit-20180828.1055/magit-autoloads.el rename to elpa/magit-20181110.1820/magit-autoloads.el index d07a8ecb..66d8a45e 100644 --- a/elpa/magit-20180828.1055/magit-autoloads.el +++ b/elpa/magit-20181110.1820/magit-autoloads.el @@ -215,7 +215,7 @@ not turn on `read-only-mode'. \(fn)" t nil) -(autoload 'magit-blame "magit-blame" "\ +(autoload 'magit-blame-addition "magit-blame" "\ For each line show the revision in which it was added. \(fn)" t nil) @@ -358,7 +358,7 @@ changes. \(fn REVISION)" t nil) -(autoload 'magit-branch "magit-branch" "\ +(autoload 'magit-branch-create "magit-branch" "\ Create BRANCH at branch or revision START-POINT. \(git branch [ARGS] BRANCH START-POINT). @@ -635,6 +635,19 @@ When `never' (the default) then the variable is never set. (if (fboundp 'register-definition-prefixes) (register-definition-prefixes "magit-branch" '("magit-"))) +;;;*** + +;;;### (autoloads nil "magit-clone" "magit-clone.el" (0 0 0 0)) +;;; Generated autoloads from magit-clone.el + +(autoload 'magit-clone "magit-clone" "\ +Clone the REPOSITORY to DIRECTORY. +Then show the status buffer for the new repository. + +\(fn REPOSITORY DIRECTORY)" t nil) + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "magit-clone" '("magit-clone-"))) + ;;;*** ;;;### (autoloads nil "magit-collab" "magit-collab.el" (0 0 0 0)) @@ -655,7 +668,7 @@ be lifted eventually to support other Git forges. ;;;### (autoloads nil "magit-commit" "magit-commit.el" (0 0 0 0)) ;;; Generated autoloads from magit-commit.el -(autoload 'magit-commit "magit-commit" "\ +(autoload 'magit-commit-create "magit-commit" "\ Create a new commit on `HEAD'. With a prefix argument, amend to the commit at `HEAD' instead. @@ -770,7 +783,7 @@ Show changes for the thing at point. \(fn &optional ARGS FILES)" t nil) -(autoload 'magit-diff "magit-diff" "\ +(autoload 'magit-diff-range "magit-diff" "\ Show differences between two commits. REV-OR-RANGE should be a range or a single revision. If it is a @@ -964,6 +977,10 @@ Run `gitk --all' in the current repository. (autoload 'ido-enter-magit-status "magit-extras" "\ Drop into `magit-status' from file switching. +This command does not work in Emacs 26. It does work in Emacs 25 +and Emacs 27. See https://github.com/magit/magit/issues/3634 and +https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31707. + To make this command available use something like: (add-hook \\='ido-setup-hook @@ -1036,18 +1053,6 @@ with two prefix arguments remove ignored files only. \(git clean -f -d [-x|-X]) \(fn &optional ARG)" t nil) - (autoload 'magit-gitignore-popup "magit-extras" nil t) - -(autoload 'magit-gitignore "magit-extras" "\ -Instruct Git to ignore FILE-OR-PATTERN. -With a prefix argument only ignore locally. - -\(fn FILE-OR-PATTERN &optional LOCAL)" t nil) - -(autoload 'magit-gitignore-locally "magit-extras" "\ -Instruct Git to locally ignore FILE-OR-PATTERN. - -\(fn FILE-OR-PATTERN)" t nil) (autoload 'magit-add-change-log-entry "magit-extras" "\ Find change log file and add date entry and item for current change. @@ -1090,6 +1095,32 @@ be used on highly rearranged and unpublished history. \(fn REV)" t nil) +(autoload 'magit-pop-revision-stack "magit-extras" "\ +Insert a representation of a revision into the current buffer. + +Pop a revision from the `magit-revision-stack' and insert it into +the current buffer according to `magit-pop-revision-stack-format'. +Revisions can be put on the stack using `magit-copy-section-value' +and `magit-copy-buffer-revision'. + +If the stack is empty or with a prefix argument, instead read a +revision in the minibuffer. By using the minibuffer history this +allows selecting an item which was popped earlier or to insert an +arbitrary reference or revision without first pushing it onto the +stack. + +When reading the revision from the minibuffer, then it might not +be possible to guess the correct repository. When this command +is called inside a repository (e.g. while composing a commit +message), then that repository is used. Otherwise (e.g. while +composing an email) then the repository recorded for the top +element of the stack is used (even though we insert another +revision). If not called inside a repository and with an empty +stack, or with two prefix arguments, then read the repository in +the minibuffer too. + +\(fn REV TOPLEVEL)" t nil) + (autoload 'magit-copy-section-value "magit-extras" "\ Save the value of the current section for later use. @@ -1141,6 +1172,66 @@ patch application, a cherry-pick, a revert, or a bisect. (if (fboundp 'register-definition-prefixes) (register-definition-prefixes "magit-extras" '("magit-"))) +;;;*** + +;;;### (autoloads nil "magit-fetch" "magit-fetch.el" (0 0 0 0)) +;;; Generated autoloads from magit-fetch.el + (autoload 'magit-fetch-popup "magit-fetch" nil t) + +(autoload 'magit-fetch-from-pushremote "magit-fetch" "\ +Fetch from the push-remote of the current branch. + +\(fn ARGS)" t nil) + +(autoload 'magit-fetch-from-upstream "magit-fetch" "\ +Fetch from the upstream repository of the current branch. + +\(fn ARGS)" t nil) + +(autoload 'magit-fetch-other "magit-fetch" "\ +Fetch from another repository. + +\(fn REMOTE ARGS)" t nil) + +(autoload 'magit-fetch-branch "magit-fetch" "\ +Fetch a BRANCH from a REMOTE. + +\(fn REMOTE BRANCH ARGS)" t nil) + +(autoload 'magit-fetch-refspec "magit-fetch" "\ +Fetch a REFSPEC from a REMOTE. + +\(fn REMOTE REFSPEC ARGS)" t nil) + +(autoload 'magit-fetch-all "magit-fetch" "\ +Fetch from all remotes. + +\(fn ARGS)" t nil) + +(autoload 'magit-fetch-all-prune "magit-fetch" "\ +Fetch from all remotes, and prune. +Prune remote tracking branches for branches that have been +removed on the respective remote. + +\(fn)" t nil) + +(autoload 'magit-fetch-all-no-prune "magit-fetch" "\ +Fetch from all remotes. + +\(fn)" t nil) + +(autoload 'magit-fetch-modules "magit-fetch" "\ +Fetch all submodules. + +Option `magit-fetch-modules-jobs' controls how many submodules +are being fetched in parallel. Also fetch the super-repository, +because `git-fetch' does not support not doing that. With a +prefix argument fetch all remotes. + +\(fn &optional ALL)" t nil) + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "magit-fetch" '("magit-"))) + ;;;*** ;;;### (autoloads nil "magit-files" "magit-files.el" (0 0 0 0)) @@ -1197,6 +1288,25 @@ Checkout FILE from REV. (if (fboundp 'register-definition-prefixes) (register-definition-prefixes "magit-git" '("magit-"))) +;;;*** + +;;;### (autoloads nil "magit-gitignore" "magit-gitignore.el" (0 0 +;;;;;; 0 0)) +;;; Generated autoloads from magit-gitignore.el + (autoload 'magit-gitignore-popup "magit-gitignore" nil t) + +(autoload 'magit-gitignore-globally "magit-gitignore" "\ +Instruct Git to globally ignore FILE-OR-PATTERN. + +\(fn FILE-OR-PATTERN)" t nil) + +(autoload 'magit-gitignore-locally "magit-gitignore" "\ +Instruct Git to locally ignore FILE-OR-PATTERN. + +\(fn FILE-OR-PATTERN)" t nil) + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "magit-gitignore" '("magit-"))) + ;;;*** ;;;### (autoloads nil "magit-imenu" "magit-imenu.el" (0 0 0 0)) @@ -1336,7 +1446,7 @@ one or more revs read from the minibuffer. \(fn REVS &optional ARGS FILES)" t nil) -(autoload 'magit-log "magit-log" "\ +(autoload 'magit-log-other "magit-log" "\ Show log for one or more revs read from the minibuffer. The user can input any revision or revisions separated by a space, or even ranges, but only branches and tags, and a @@ -1381,17 +1491,17 @@ Show log for the definition at point. (autoload 'magit-reflog-current "magit-log" "\ Display the reflog of the current branch. -\(fn)" t nil) +\(fn ARGS)" t nil) -(autoload 'magit-reflog "magit-log" "\ -Display the reflog of a branch. +(autoload 'magit-reflog-other "magit-log" "\ +Display the reflog of a branch or another ref. -\(fn REF)" t nil) +\(fn REF ARGS)" t nil) (autoload 'magit-reflog-head "magit-log" "\ Display the `HEAD' reflog. -\(fn)" t nil) +\(fn ARGS)" t nil) (autoload 'magit-log-move-to-parent "magit-log" "\ Move to the Nth parent of the current commit. @@ -1418,7 +1528,7 @@ Show commits in a branch that are not merged in the upstream branch. ;;; Generated autoloads from magit-merge.el (autoload 'magit-merge-popup "magit" nil t) -(autoload 'magit-merge "magit-merge" "\ +(autoload 'magit-merge-plain "magit-merge" "\ Merge commit REV into the current branch; using default message. Unless there are conflicts or a prefix argument is used create a @@ -1511,182 +1621,100 @@ Abort the current merge operation. ;;;*** -;;;### (autoloads nil "magit-process" "magit-process.el" (0 0 0 0)) -;;; Generated autoloads from magit-process.el +;;;### (autoloads nil "magit-patch" "magit-patch.el" (0 0 0 0)) +;;; Generated autoloads from magit-patch.el + (autoload 'magit-patch-popup "magit-patch" nil t) -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "magit-process" '("magit-" "tramp-sh-handle-"))) - -;;;*** - -;;;### (autoloads nil "magit-refs" "magit-refs.el" (0 0 0 0)) -;;; Generated autoloads from magit-refs.el - -(autoload 'magit-show-refs-popup "magit-refs" "\ -Popup console for `magit-show-refs'. - -\(fn &optional ARG)" t nil) - -(autoload 'magit-show-refs-head "magit-refs" "\ -List and compare references in a dedicated buffer. -Refs are compared with `HEAD'. - -\(fn &optional ARGS)" t nil) - -(autoload 'magit-show-refs-current "magit-refs" "\ -List and compare references in a dedicated buffer. -Refs are compared with the current branch or `HEAD' if -it is detached. - -\(fn &optional ARGS)" t nil) - -(autoload 'magit-show-refs "magit-refs" "\ -List and compare references in a dedicated buffer. -Refs are compared with a branch read from the user. - -\(fn &optional REF ARGS)" t nil) - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "magit-refs" '("magit-"))) - -;;;*** - -;;;### (autoloads nil "magit-remote" "magit-remote.el" (0 0 0 0)) -;;; Generated autoloads from magit-remote.el - -(autoload 'magit-clone "magit-remote" "\ -Clone the REPOSITORY to DIRECTORY. -Then show the status buffer for the new repository. - -\(fn REPOSITORY DIRECTORY)" t nil) - (autoload 'magit-remote-popup "magit-remote" nil t) - -(autoload 'magit-remote-add "magit-remote" "\ -Add a remote named REMOTE and fetch it. - -\(fn REMOTE URL &optional ARGS)" t nil) - -(autoload 'magit-remote-rename "magit-remote" "\ -Rename the remote named OLD to NEW. - -\(fn OLD NEW)" t nil) - -(autoload 'magit-remote-remove "magit-remote" "\ -Delete the remote named REMOTE. - -\(fn REMOTE)" t nil) - -(autoload 'magit-remote-prune "magit-remote" "\ -Remove stale remote-tracking branches for REMOTE. - -\(fn REMOTE)" t nil) - -(autoload 'magit-remote-prune-refspecs "magit-remote" "\ -Remove stale refspecs for REMOTE. - -A refspec is stale if there no longer exists at least one branch -on the remote that would be fetched due to that refspec. A stale -refspec is problematic because its existence causes Git to refuse -to fetch according to the remaining non-stale refspecs. - -If only stale refspecs remain, then offer to either delete the -remote or to replace the stale refspecs with the default refspec. - -Also remove the remote-tracking branches that were created due to -the now stale refspecs. Other stale branches are not removed. - -\(fn REMOTE)" t nil) - -(autoload 'magit-remote-set-head "magit-remote" "\ -Set the local representation of REMOTE's default branch. -Query REMOTE and set the symbolic-ref refs/remotes//HEAD -accordingly. With a prefix argument query for the branch to be -used, which allows you to select an incorrect value if you fancy -doing that. - -\(fn REMOTE &optional BRANCH)" t nil) - -(autoload 'magit-remote-unset-head "magit-remote" "\ -Unset the local representation of REMOTE's default branch. -Delete the symbolic-ref \"refs/remotes//HEAD\". - -\(fn REMOTE)" t nil) - -(autoload 'magit-remote-config-popup "magit-remote" "\ -Popup console for setting remote variables. - -\(fn REMOTE)" t nil) - (autoload 'magit-fetch-popup "magit-remote" nil t) - -(autoload 'magit-fetch-from-pushremote "magit-remote" "\ -Fetch from the push-remote of the current branch. - -\(fn ARGS)" t nil) +(autoload 'magit-format-patch "magit-patch" "\ +Create patches for the commits in RANGE. +When a single commit is given for RANGE, create a patch for the +changes introduced by that commit (unlike 'git format-patch' +which creates patches for all commits that are reachable from +`HEAD' but not from the specified commit). -(autoload 'magit-fetch-from-upstream "magit-remote" "\ -Fetch from the upstream repository of the current branch. +\(fn RANGE ARGS FILES)" t nil) -\(fn ARGS)" t nil) +(autoload 'magit-request-pull "magit-patch" "\ +Request upstream to pull from you public repository. -(autoload 'magit-fetch "magit-remote" "\ -Fetch from another repository. +URL is the url of your publically accessible repository. +START is a commit that already is in the upstream repository. +END is the last commit, usually a branch name, which upstream +is asked to pull. START has to be reachable from that commit. -\(fn REMOTE ARGS)" t nil) +\(fn URL START END)" t nil) + (autoload 'magit-patch-apply-popup "magit-patch" nil t) -(autoload 'magit-fetch-branch "magit-remote" "\ -Fetch a BRANCH from a REMOTE. +(autoload 'magit-patch-apply "magit-patch" "\ +Apply the patch file FILE. -\(fn REMOTE BRANCH ARGS)" t nil) +\(fn FILE &rest ARGS)" t nil) -(autoload 'magit-fetch-refspec "magit-remote" "\ -Fetch a REFSPEC from a REMOTE. +(autoload 'magit-patch-save "magit-patch" "\ +Write current diff into patch FILE. -\(fn REMOTE REFSPEC ARGS)" t nil) +What arguments are used to create the patch depends on the value +of `magit-patch-save-arguments' and whether a prefix argument is +used. -(autoload 'magit-fetch-all "magit-remote" "\ -Fetch from all remotes. +If the value is the symbol `buffer', then use the same arguments +as the buffer. With a prefix argument use no arguments. -\(fn ARGS)" t nil) +If the value is a list beginning with the symbol `exclude', then +use the same arguments as the buffer except for those matched by +entries in the cdr of the list. The comparison is done using +`string-prefix-p'. With a prefix argument use the same arguments +as the buffer. -(autoload 'magit-fetch-all-prune "magit-remote" "\ -Fetch from all remotes, and prune. -Prune remote tracking branches for branches that have been -removed on the respective remote. +If the value is a list of strings (including the empty list), +then use those arguments. With a prefix argument use the same +arguments as the buffer. -\(fn)" t nil) +Of course the arguments that are required to actually show the +same differences as those shown in the buffer are always used. -(autoload 'magit-fetch-all-no-prune "magit-remote" "\ -Fetch from all remotes. +\(fn FILE &optional ARG)" t nil) -\(fn)" t nil) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "magit-patch" '("magit-patch-save-arguments"))) -(autoload 'magit-fetch-modules "magit-remote" "\ -Fetch all submodules. +;;;*** + +;;;### (autoloads nil "magit-process" "magit-process.el" (0 0 0 0)) +;;; Generated autoloads from magit-process.el -Option `magit-fetch-modules-jobs' controls how many submodules -are being fetched in parallel. Also fetch the super-repository, -because `git-fetch' does not support not doing that. With a -prefix argument fetch all remotes. +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "magit-process" '("magit-" "tramp-sh-handle-"))) -\(fn &optional ALL)" t nil) - (autoload 'magit-pull-popup "magit-remote" nil t) - (autoload 'magit-pull-and-fetch-popup "magit-remote" nil t) +;;;*** + +;;;### (autoloads nil "magit-pull" "magit-pull.el" (0 0 0 0)) +;;; Generated autoloads from magit-pull.el + (autoload 'magit-pull-popup "magit-pull" nil t) + (autoload 'magit-pull-and-fetch-popup "magit-pull" nil t) -(autoload 'magit-pull-from-pushremote "magit-remote" "\ +(autoload 'magit-pull-from-pushremote "magit-pull" "\ Pull from the push-remote of the current branch. \(fn ARGS)" t nil) -(autoload 'magit-pull-from-upstream "magit-remote" "\ +(autoload 'magit-pull-from-upstream "magit-pull" "\ Pull from the upstream of the current branch. \(fn ARGS)" t nil) -(autoload 'magit-pull "magit-remote" "\ +(autoload 'magit-pull-branch "magit-pull" "\ Pull from a branch read in the minibuffer. \(fn SOURCE ARGS)" t nil) - (autoload 'magit-push-popup "magit-remote" nil t) -(autoload 'magit-push-current-to-pushremote "magit-remote" "\ +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "magit-pull" '("magit-"))) + +;;;*** + +;;;### (autoloads nil "magit-push" "magit-push.el" (0 0 0 0)) +;;; Generated autoloads from magit-push.el + (autoload 'magit-push-popup "magit-push" nil t) + +(autoload 'magit-push-current-to-pushremote "magit-push" "\ Push the current branch to `branch..pushRemote'. If that variable is unset, then push to `remote.pushDefault'. @@ -1697,7 +1725,7 @@ the push-remote can be changed before pushed to it. \(fn ARGS &optional PUSH-REMOTE)" t nil) -(autoload 'magit-push-current-to-upstream "magit-remote" "\ +(autoload 'magit-push-current-to-upstream "magit-push" "\ Push the current branch to its upstream branch. When `magit-push-current-set-remote-if-missing' is non-nil and @@ -1707,18 +1735,18 @@ upstream can be changed before pushed to it. \(fn ARGS &optional UPSTREAM)" t nil) -(autoload 'magit-push-current "magit-remote" "\ +(autoload 'magit-push-current "magit-push" "\ Push the current branch to a branch read in the minibuffer. \(fn TARGET ARGS)" t nil) -(autoload 'magit-push "magit-remote" "\ +(autoload 'magit-push-other "magit-push" "\ Push an arbitrary branch or commit somewhere. Both the source and the target are read in the minibuffer. \(fn SOURCE TARGET ARGS)" t nil) -(autoload 'magit-push-refspecs "magit-remote" "\ +(autoload 'magit-push-refspecs "magit-push" "\ Push one or multiple REFSPECS to a REMOTE. Both the REMOTE and the REFSPECS are read in the minibuffer. To use multiple REFSPECS, separate them with commas. Completion is @@ -1727,14 +1755,14 @@ is used. \(fn REMOTE REFSPECS ARGS)" t nil) -(autoload 'magit-push-matching "magit-remote" "\ +(autoload 'magit-push-matching "magit-push" "\ Push all matching branches to another repository. If multiple remotes exist, then read one from the user. If just one exists, use that without requiring confirmation. \(fn REMOTE &optional ARGS)" t nil) -(autoload 'magit-push-tags "magit-remote" "\ +(autoload 'magit-push-tags "magit-push" "\ Push all tags to another repository. If only one remote exists, then push to that. Otherwise prompt for a remote, offering the remote configured for the current @@ -1742,12 +1770,12 @@ branch as default. \(fn REMOTE &optional ARGS)" t nil) -(autoload 'magit-push-tag "magit-remote" "\ +(autoload 'magit-push-tag "magit-push" "\ Push a tag to another repository. \(fn TAG REMOTE &optional ARGS)" t nil) -(autoload 'magit-push-implicitly "magit-remote" "\ +(autoload 'magit-push-implicitly "magit-push" "\ Push somewhere without using an explicit refspec. This command simply runs \"git push -v [ARGS]\". ARGS are the @@ -1770,7 +1798,7 @@ the popup buffer. \(fn ARGS)" t nil) -(autoload 'magit-push-to-remote "magit-remote" "\ +(autoload 'magit-push-to-remote "magit-push" "\ Push to REMOTE without using an explicit refspec. The REMOTE is read in the minibuffer. @@ -1789,26 +1817,101 @@ To add this command to the push popup add this to your init file: \\='magit-push-to-remote ?p t)) \(fn REMOTE ARGS)" t nil) - (autoload 'magit-patch-popup "magit-remote" nil t) -(autoload 'magit-format-patch "magit-remote" "\ -Create patches for the commits in RANGE. -When a single commit is given for RANGE, create a patch for the -changes introduced by that commit (unlike 'git format-patch' -which creates patches for all commits that are reachable from -`HEAD' but not from the specified commit). +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "magit-push" '("magit-"))) -\(fn RANGE ARGS)" t nil) +;;;*** + +;;;### (autoloads nil "magit-refs" "magit-refs.el" (0 0 0 0)) +;;; Generated autoloads from magit-refs.el -(autoload 'magit-request-pull "magit-remote" "\ -Request upstream to pull from you public repository. +(autoload 'magit-show-refs-popup "magit-refs" "\ +Popup console for `magit-show-refs'. -URL is the url of your publically accessible repository. -START is a commit that already is in the upstream repository. -END is the last commit, usually a branch name, which upstream -is asked to pull. START has to be reachable from that commit. +\(fn &optional ARG)" t nil) -\(fn URL START END)" t nil) +(autoload 'magit-show-refs-head "magit-refs" "\ +List and compare references in a dedicated buffer. +Refs are compared with `HEAD'. + +\(fn &optional ARGS)" t nil) + +(autoload 'magit-show-refs-current "magit-refs" "\ +List and compare references in a dedicated buffer. +Refs are compared with the current branch or `HEAD' if +it is detached. + +\(fn &optional ARGS)" t nil) + +(autoload 'magit-show-refs "magit-refs" "\ +List and compare references in a dedicated buffer. +Refs are compared with a branch read from the user. + +\(fn &optional REF ARGS)" t nil) + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "magit-refs" '("magit-"))) + +;;;*** + +;;;### (autoloads nil "magit-remote" "magit-remote.el" (0 0 0 0)) +;;; Generated autoloads from magit-remote.el + (autoload 'magit-remote-popup "magit-remote" nil t) + +(autoload 'magit-remote-add "magit-remote" "\ +Add a remote named REMOTE and fetch it. + +\(fn REMOTE URL &optional ARGS)" t nil) + +(autoload 'magit-remote-rename "magit-remote" "\ +Rename the remote named OLD to NEW. + +\(fn OLD NEW)" t nil) + +(autoload 'magit-remote-remove "magit-remote" "\ +Delete the remote named REMOTE. + +\(fn REMOTE)" t nil) + +(autoload 'magit-remote-prune "magit-remote" "\ +Remove stale remote-tracking branches for REMOTE. + +\(fn REMOTE)" t nil) + +(autoload 'magit-remote-prune-refspecs "magit-remote" "\ +Remove stale refspecs for REMOTE. + +A refspec is stale if there no longer exists at least one branch +on the remote that would be fetched due to that refspec. A stale +refspec is problematic because its existence causes Git to refuse +to fetch according to the remaining non-stale refspecs. + +If only stale refspecs remain, then offer to either delete the +remote or to replace the stale refspecs with the default refspec. + +Also remove the remote-tracking branches that were created due to +the now stale refspecs. Other stale branches are not removed. + +\(fn REMOTE)" t nil) + +(autoload 'magit-remote-set-head "magit-remote" "\ +Set the local representation of REMOTE's default branch. +Query REMOTE and set the symbolic-ref refs/remotes//HEAD +accordingly. With a prefix argument query for the branch to be +used, which allows you to select an incorrect value if you fancy +doing that. + +\(fn REMOTE &optional BRANCH)" t nil) + +(autoload 'magit-remote-unset-head "magit-remote" "\ +Unset the local representation of REMOTE's default branch. +Delete the symbolic-ref \"refs/remotes//HEAD\". + +\(fn REMOTE)" t nil) + +(autoload 'magit-remote-config-popup "magit-remote" "\ +Popup console for setting remote variables. + +\(fn REMOTE)" t nil) (if (fboundp 'register-definition-prefixes) (register-definition-prefixes "magit-remote" '("magit-"))) @@ -1833,15 +1936,7 @@ repositories are displayed. ;;; Generated autoloads from magit-reset.el (autoload 'magit-reset-popup "magit" nil t) -(autoload 'magit-reset "magit-reset" "\ -Reset the `HEAD' and index to COMMIT, but not the working tree. -With a prefix argument also reset the working tree. - -\(git reset --mixed|--hard COMMIT) - -\(fn COMMIT &optional HARD)" t nil) - -(autoload 'magit-reset-head "magit-reset" "\ +(autoload 'magit-reset-mixed "magit-reset" "\ Reset the `HEAD' and index to COMMIT, but not the working tree. \(git reset --mixed COMMIT) @@ -1877,6 +1972,14 @@ Keep the `HEAD' and index as-is. \(fn COMMIT)" t nil) +(autoload 'magit-reset-quickly "magit-reset" "\ +Reset the `HEAD' and index to COMMIT, and possibly the working tree. +With a prefix argument reset the working tree otherwise don't. + +\(git reset --mixed|--hard COMMIT) + +\(fn COMMIT &optional HARD)" t nil) + (if (fboundp 'register-definition-prefixes) (register-definition-prefixes "magit-reset" '("magit-reset-"))) ;;;*** @@ -1909,7 +2012,7 @@ This discards all changes made since the sequence started. \(fn)" t nil) (autoload 'magit-cherry-pick-popup "magit-sequence" nil t) -(autoload 'magit-cherry-pick "magit-sequence" "\ +(autoload 'magit-cherry-copy "magit-sequence" "\ Copy COMMITS from another branch onto the current branch. Prompt for a commit, defaulting to the commit at point. If the region selects multiple commits, then pick all of them, @@ -1958,7 +2061,7 @@ the process manually. \(fn COMMITS BRANCH START-POINT &optional ARGS)" t nil) (autoload 'magit-revert-popup "magit-sequence" nil t) -(autoload 'magit-revert "magit-sequence" "\ +(autoload 'magit-revert-and-commit "magit-sequence" "\ Revert COMMIT by creating a new commit. Prompt for a commit, defaulting to the commit at point. If the region selects multiple commits, then revert all of them, @@ -2013,7 +2116,7 @@ Rebase the current branch onto its upstream branch. \(fn ARGS)" t nil) -(autoload 'magit-rebase "magit-sequence" "\ +(autoload 'magit-rebase-branch "magit-sequence" "\ Rebase the current branch onto a branch read in the minibuffer. All commits that are reachable from `HEAD' but not from the selected branch TARGET are being rebased. @@ -2082,7 +2185,7 @@ Abort the current rebase operation, restoring the original branch. ;;; Generated autoloads from magit-stash.el (autoload 'magit-stash-popup "magit-stash" nil t) -(autoload 'magit-stash "magit-stash" "\ +(autoload 'magit-stash-both "magit-stash" "\ Create a stash of the index and working tree. Untracked files are included according to popup arguments. One prefix argument is equivalent to `--include-untracked' @@ -2115,7 +2218,7 @@ while two prefix arguments are equivalent to `--all'. \(fn MESSAGE &optional INCLUDE-UNTRACKED)" t nil) -(autoload 'magit-snapshot "magit-stash" "\ +(autoload 'magit-snapshot-both "magit-stash" "\ Create a snapshot of the index and working tree. Untracked files are included according to popup arguments. One prefix argument is equivalent to `--include-untracked' @@ -2289,6 +2392,22 @@ single module from the user. \(fn MODULES ARGS)" t nil) +(autoload 'magit-submodule-remove "magit-submodule" "\ +Unregister MODULES and remove their working directories. + +For safety reasons, do not remove the gitdirs and if a module has +uncomitted changes, then do not remove it at all. If a module's +gitdir is located inside the working directory, then move it into +the gitdir of the superproject first. + +With the \"--force\" argument offer to remove dirty working +directories and with a prefix argument offer to delete gitdirs. +Both actions are very dangerous and have to be confirmed. There +are additional safety precautions in place, so you might be able +to recover from making a mistake here, but don't count on it. + +\(fn MODULES ARGS TRASH-GITDIRS)" t nil) + (autoload 'magit-insert-modules "magit-submodule" "\ Insert submodule sections. Hook `magit-module-sections-hook' controls which module sections @@ -2379,7 +2498,7 @@ Extract the history of the subtree PREFIX. ;;; Generated autoloads from magit-tag.el (autoload 'magit-tag-popup "magit" nil t) -(autoload 'magit-tag "magit-tag" "\ +(autoload 'magit-tag-create "magit-tag" "\ Create a new tag with the given NAME at REV. With a prefix argument annotate the tag. diff --git a/elpa/magit-20180828.1055/magit-autorevert.el b/elpa/magit-20181110.1820/magit-autorevert.el similarity index 99% rename from elpa/magit-20180828.1055/magit-autorevert.el rename to elpa/magit-20181110.1820/magit-autorevert.el index 4a5fd619..9001b138 100644 --- a/elpa/magit-20180828.1055/magit-autorevert.el +++ b/elpa/magit-20181110.1820/magit-autorevert.el @@ -256,5 +256,6 @@ located. If there is no current repository, then return FALLBACK (advice-add 'auto-revert-buffers :before 'auto-revert-buffers--buffer-list-filter) +;;; _ (provide 'magit-autorevert) ;;; magit-autorevert.el ends here diff --git a/elpa/magit-20180828.1055/magit-bisect.el b/elpa/magit-20181110.1820/magit-bisect.el similarity index 96% rename from elpa/magit-20180828.1055/magit-bisect.el rename to elpa/magit-20181110.1820/magit-bisect.el index c6280712..735785b7 100644 --- a/elpa/magit-20180828.1055/magit-bisect.el +++ b/elpa/magit-20181110.1820/magit-bisect.el @@ -79,6 +79,12 @@ other actions from the bisect popup (\ (interactive (if (magit-bisect-in-progress-p) (user-error "Already bisecting") (magit-bisect-start-read-args))) + (unless (magit-rev-ancestor-p good bad) + (user-error + "The good revision (%s) has to be an ancestor of the bad one (%s)" + good bad)) + (when (magit-anything-modified-p) + (user-error "Cannot bisect with uncommitted changes")) (magit-git-bisect "start" (list bad good) t)) (defun magit-bisect-start-read-args () @@ -206,5 +212,6 @@ bisect run'." (magit-insert-section (bisect-item) (insert hash " is the first bad commit\n")))))) +;;; _ (provide 'magit-bisect) ;;; magit-bisect.el ends here diff --git a/elpa/magit-20180828.1055/magit-blame.el b/elpa/magit-20181110.1820/magit-blame.el similarity index 99% rename from elpa/magit-20180828.1055/magit-blame.el rename to elpa/magit-20181110.1820/magit-blame.el index 223a171b..99351b75 100644 --- a/elpa/magit-20180828.1055/magit-blame.el +++ b/elpa/magit-20181110.1820/magit-blame.el @@ -28,6 +28,9 @@ ;;; Code: +(eval-when-compile + (require 'subr-x)) + (require 'magit) ;;; Options @@ -267,7 +270,7 @@ in `magit-blame-read-only-mode-map' instead.") (define-key map (kbd "I") 'magit-blame-previous-chunk-same-commit) (define-key map (kbd "k") 'magit-blame-next-chunk) (define-key map (kbd "K") 'magit-blame-next-chunk-same-commit) - (define-key map (kbd "j") 'magit-blame) + (define-key map (kbd "j") 'magit-blame-addition) (define-key map (kbd "l") 'magit-blame-removal) (define-key map (kbd "f") 'magit-blame-reverse) (define-key map (kbd "b") 'magit-blame-popup)) @@ -277,7 +280,7 @@ in `magit-blame-read-only-mode-map' instead.") (define-key map (kbd "P") 'magit-blame-previous-chunk-same-commit) (define-key map (kbd "n") 'magit-blame-next-chunk) (define-key map (kbd "N") 'magit-blame-next-chunk-same-commit) - (define-key map (kbd "b") 'magit-blame) + (define-key map (kbd "b") 'magit-blame-addition) (define-key map (kbd "r") 'magit-blame-removal) (define-key map (kbd "f") 'magit-blame-reverse) (define-key map (kbd "B") 'magit-blame-popup))) @@ -720,12 +723,12 @@ not turn on `read-only-mode'." (cons 'eldoc-mode magit-blame-disable-modes)) (if (not magit-blame-mode) (let ((magit-blame-read-only nil)) - (magit-blame)) + (magit-blame-addition)) (read-only-mode -1) (magit-blame--update-overlays))) ;;;###autoload -(defun magit-blame () +(defun magit-blame-addition () "For each line show the revision in which it was added." (interactive) (magit-blame--pre-blame-assert 'addition) @@ -882,7 +885,7 @@ instead of the hash, like `kill-ring-save' would." :options '((?M "Detect lines moved or copied within a file" "-M") (?C "Detect lines moved or copied between files" "-C")) :actions '("Actions" - (?b "Show commits adding lines" magit-blame) + (?b "Show commits adding lines" magit-blame-addition) (?r (lambda () (with-current-buffer magit-pre-popup-buffer (and (not buffer-file-name) @@ -902,7 +905,7 @@ instead of the hash, like `kill-ring-save' would." (?c "Cycle style" magit-blame-cycle-style)) :default-arguments '("-w") :max-action-columns 1 - :default-action 'magit-blame) + :default-action 'magit-blame-addition) ;;; Utilities @@ -922,5 +925,6 @@ instead of the hash, like `kill-ring-save' would." (let ((magit-display-buffer-noselect t)) (apply #'magit-show-commit rev (magit-diff-arguments)))))))))) +;;; _ (provide 'magit-blame) ;;; magit-blame.el ends here diff --git a/elpa/magit-20180828.1055/magit-bookmark.el b/elpa/magit-20181110.1820/magit-bookmark.el similarity index 98% rename from elpa/magit-20180828.1055/magit-bookmark.el rename to elpa/magit-20181110.1820/magit-bookmark.el index a2156a41..047132da 100644 --- a/elpa/magit-20180828.1055/magit-bookmark.el +++ b/elpa/magit-20181110.1820/magit-bookmark.el @@ -27,6 +27,9 @@ ;;; Code: +(eval-when-compile + (require 'subr-x)) + (require 'magit) (require 'bookmark) @@ -134,7 +137,7 @@ specifies additional properties to store in the bookmark." ;;;###autoload (defun magit-bookmark--log-jump (bookmark) "Handle a Magit log BOOKMARK." - (magit-bookmark--jump bookmark #'magit-log + (magit-bookmark--jump bookmark #'magit-log-other (bookmark-prop-get bookmark 'magit-revs) (bookmark-prop-get bookmark 'magit-args) (bookmark-prop-get bookmark 'magit-files))) @@ -166,7 +169,8 @@ specifies additional properties to store in the bookmark." (magit-bookmark--jump bookmark (lambda () (let ((magit-reflog-arguments (bookmark-prop-get bookmark 'magit-args))) - (magit-reflog (bookmark-prop-get bookmark 'magit-ref)))))) + (magit-git-reflog (bookmark-prop-get bookmark 'magit-ref) + magit-reflog-arguments))))) (defun magit-bookmark--reflog-make-name (buffer-name ref) "Generate the default name for a reflog bookmark." @@ -362,5 +366,6 @@ specifies additional properties to store in the bookmark." (magit-bookmark--make-record 'magit-submodule-list-mode #'magit-bookmark--submodules-jump)) +;;; _ (provide 'magit-bookmark) ;;; magit-bookmark.el ends here diff --git a/elpa/magit-20180828.1055/magit-branch.el b/elpa/magit-20181110.1820/magit-branch.el similarity index 98% rename from elpa/magit-20180828.1055/magit-branch.el rename to elpa/magit-20181110.1820/magit-branch.el index b346db8f..7adea0d0 100644 --- a/elpa/magit-20180828.1055/magit-branch.el +++ b/elpa/magit-20181110.1820/magit-branch.el @@ -31,6 +31,9 @@ ;;; Code: +(eval-when-compile + (require 'subr-x)) + (require 'magit) (require 'magit-collab) (require 'magit-reset) @@ -214,7 +217,7 @@ and change branch related variables." (?s "Create new spin-off" magit-branch-spinoff) (?m "Rename" magit-branch-rename) (?c "Checkout new branch" magit-branch-and-checkout) - (?n "Create new branch" magit-branch) + (?n "Create new branch" magit-branch-create) (?x "Reset" magit-branch-reset) (?w "Checkout new worktree" magit-worktree-checkout) (?W "Create new worktree" magit-worktree-branch) @@ -249,7 +252,7 @@ changes. (magit-run-git "checkout" revision)) ;;;###autoload -(defun magit-branch (branch start-point &optional args) +(defun magit-branch-create (branch start-point &optional args) "Create BRANCH at branch or revision START-POINT. \n(git branch [ARGS] BRANCH START-POINT)." (interactive (magit-branch-read-args "Create branch")) @@ -393,7 +396,7 @@ Please see the manual for more information." (unless (magit-branch-p tracking) (magit-call-git "fetch" upstream)) (let ((inhibit-magit-refresh t)) - (magit-branch branch tracking)) + (magit-branch-create branch tracking)) (magit-set upstream "branch" branch "pushRemote") (magit-set upstream "branch" branch "pullRequestRemote")) (if (magit-remote-p remote) @@ -562,8 +565,8 @@ that is being reset." (user-error "Abort") (magit-reset-hard to) (when (and set-upstream (magit-branch-p to)) - (magit-set-branch*merge/remote branch to))) - (magit-branch branch to args))) + (magit-set-upstream-branch branch to))) + (magit-branch-create branch to args))) ;;;###autoload (defun magit-branch-delete (branches &optional force) @@ -743,16 +746,19 @@ the remote." (fboundp 'forge--forge-remote-p) (forge--forge-remote-p remote)))) (let ((old-target (magit-get-push-branch old t)) - (new-target (magit-get-push-branch new t))) - (when (and old-target (not new-target)) + (new-target (magit-get-push-branch new t)) + (remote (magit-get-push-remote new))) + (when (and old-target + (not new-target) + (magit-y-or-n-p (format "Also rename %S to %S on %S" + old new remote))) ;; Rename on (i.e. within) the remote, but only if the ;; destination ref doesn't exist yet. If that ref already ;; exists, then it probably is of some value and we better ;; not touch it. Ignore what the local ref points at, ;; i.e. if the local and the remote ref didn't point at ;; the same commit before the rename then keep it that way. - (magit-call-git "push" "-v" - (magit-get-push-remote new) + (magit-call-git "push" "-v" remote (format "%s:refs/heads/%s" old-target new) (format ":refs/heads/%s" old))))))) (magit-branch-unset-pushRemote old) @@ -920,14 +926,8 @@ already set. When nil, then always unset." (let ((branch (magit-branch-config-branch "Change upstream of branch"))) (list branch (and (not (magit-get-upstream-branch branch)) (magit-read-upstream-branch branch))))) - (if upstream - (pcase-let ((`(,remote . ,merge) (magit-split-branch-name upstream))) - (setf (magit-get (format "branch.%s.remote" branch)) remote) - (setf (magit-get (format "branch.%s.merge" branch)) - (concat "refs/heads/" merge))) - (magit-call-git "branch" "--unset-upstream" branch)) - (when (called-interactively-p 'any) - (magit-refresh))) + (magit-set-upstream-branch branch upstream) + (magit-refresh)) (defun magit-format-branch*merge/remote () (let* ((branch (magit-branch-config-branch)) @@ -1086,5 +1086,6 @@ When `never' (the default) then the variable is never set." '("always" "local" "remote" "never") "never" nil 23)) +;;; _ (provide 'magit-branch) ;;; magit-branch.el ends here diff --git a/elpa/magit-20181110.1820/magit-clone.el b/elpa/magit-20181110.1820/magit-clone.el new file mode 100644 index 00000000..7afc1eac --- /dev/null +++ b/elpa/magit-20181110.1820/magit-clone.el @@ -0,0 +1,103 @@ +;;; magit-clone.el --- clone a repository -*- lexical-binding: t -*- + +;; Copyright (C) 2008-2018 The Magit Project Contributors +;; +;; You should have received a copy of the AUTHORS.md file which +;; lists all contributors. If not, see http://magit.vc/authors. + +;; Author: Jonas Bernoulli +;; Maintainer: Jonas Bernoulli + +;; Magit is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. +;; +;; Magit is distributed in the hope that it will be useful, but WITHOUT +;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +;; License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with Magit. If not, see http://www.gnu.org/licenses. + +;;; Commentary: + +;; This library implements clone commands. + +;;; Code: + +(require 'magit) + +;;; Options + +(defcustom magit-clone-set-remote-head nil + "Whether cloning creates the symbolic-ref `/HEAD'." + :package-version '(magit . "2.4.2") + :group 'magit-commands + :type 'boolean) + +(defcustom magit-clone-set-remote.pushDefault 'ask + "Whether to set the value of `remote.pushDefault' after cloning. + +If t, then set without asking. If nil, then don't set. If +`ask', then ask." + :package-version '(magit . "2.4.0") + :group 'magit-commands + :type '(choice (const :tag "set" t) + (const :tag "ask" ask) + (const :tag "don't set" nil))) + +(defcustom magit-clone-default-directory nil + "Default directory to use when `magit-clone' reads destination. +If nil (the default), then use the value of `default-directory'. +If a directory, then use that. If a function, then call that +with the remote url as only argument and use the returned value." + :package-version '(magit . "2.90.0") + :group 'magit-commands + :type '(choice (const :tag "value of default-directory") + (directory :tag "constant directory") + (function :tag "function's value"))) + +;;; Commands + +;;;###autoload +(defun magit-clone (repository directory) + "Clone the REPOSITORY to DIRECTORY. +Then show the status buffer for the new repository." + (interactive + (let ((url (magit-read-string-ns "Clone repository"))) + (list url (read-directory-name + "Clone to: " + (if (functionp magit-clone-default-directory) + (funcall magit-clone-default-directory url) + magit-clone-default-directory) + nil nil + (and (string-match "\\([^/:]+?\\)\\(/?\\.git\\)?$" url) + (match-string 1 url)))))) + (setq directory (file-name-as-directory (expand-file-name directory))) + (magit-run-git-async "clone" repository + (magit-convert-filename-for-git directory)) + ;; Don't refresh the buffer we're calling from. + (process-put magit-this-process 'inhibit-refresh t) + (set-process-sentinel + magit-this-process + (lambda (process event) + (when (memq (process-status process) '(exit signal)) + (let ((magit-process-raise-error t)) + (magit-process-sentinel process event))) + (when (and (eq (process-status process) 'exit) + (= (process-exit-status process) 0)) + (let ((default-directory directory)) + (when (or (eq magit-clone-set-remote.pushDefault t) + (and magit-clone-set-remote.pushDefault + (y-or-n-p "Set `remote.pushDefault' to \"origin\"? "))) + (setf (magit-get "remote.pushDefault") "origin")) + (unless magit-clone-set-remote-head + (magit-remote-unset-head "origin"))) + (with-current-buffer (process-get process 'command-buf) + (magit-status-internal directory)))))) + +;;; _ +(provide 'magit-clone) +;;; magit-clone.el ends here diff --git a/elpa/magit-20180828.1055/magit-collab.el b/elpa/magit-20181110.1820/magit-collab.el similarity index 97% rename from elpa/magit-20180828.1055/magit-collab.el rename to elpa/magit-20181110.1820/magit-collab.el index 7c4b1a26..a637c7ae 100644 --- a/elpa/magit-20180828.1055/magit-collab.el +++ b/elpa/magit-20181110.1820/magit-collab.el @@ -133,7 +133,9 @@ exist, then raise an error." ;; in "~/.ssh/config". Theoretically this could result ;; in false-positives, but that's rather unlikely. #3392 (and (or (string-match-p (regexp-quote "github.com") host) - (string-match-p (regexp-quote (ghub--host)) host)) + (string-match-p + (regexp-quote (car (split-string (ghub--host) "/"))) + host)) host))))) (defun magit--github-remote-p (remote) @@ -167,5 +169,6 @@ exist, then raise an error." (user-error "Branch `%s' already exists" branch)) branch))) +;;; _ (provide 'magit-collab) ;;; magit-collab.el ends here diff --git a/elpa/magit-20180828.1055/magit-commit.el b/elpa/magit-20181110.1820/magit-commit.el similarity index 94% rename from elpa/magit-20180828.1055/magit-commit.el rename to elpa/magit-20181110.1820/magit-commit.el index 9eba71b4..bbd49c88 100644 --- a/elpa/magit-20180828.1055/magit-commit.el +++ b/elpa/magit-20181110.1820/magit-commit.el @@ -34,6 +34,7 @@ (eval-when-compile (require 'epa)) ; for `epa-protocol' (eval-when-compile (require 'epg)) +(eval-when-compile (require 'subr-x)) ;;; Options @@ -79,6 +80,27 @@ an error while using those is harder to recover from." :group 'magit-commands :type 'boolean) +(defcustom magit-post-commit-hook nil + "Hook run after creating a commit without the user editing a message. + +This hook is run by `magit-refresh' if `this-command' is a member +of `magit-post-stage-hook-commands'. This only includes commands +named `magit-commit-*' that do *not* require that the user edits +the commit message in a buffer and then finishes by pressing +\\\\[with-editor-finish]. + +Also see `git-commit-post-finish-hook'." + :package-version '(magit . "2.90.0") + :group 'magit-commands + :type 'hook) + +(defvar magit-post-commit-hook-commands + '(magit-commit-extend + magit-commit-fixup + magit-commit-augment + magit-commit-instant-fixup + magit-commit-instant-squash)) + ;;; Popup (defun magit-commit-popup (&optional arg) @@ -101,7 +123,7 @@ an error while using those is harder to recover from." (?S "Sign using gpg" "--gpg-sign=" magit-read-gpg-secret-key) (?C "Reuse commit message" "--reuse-message=" magit-read-reuse-message)) - :actions ((?c "Commit" magit-commit) + :actions ((?c "Commit" magit-commit-create) (?e "Extend" magit-commit-extend) (?f "Fixup" magit-commit-fixup) (?F "Instant Fixup" magit-commit-instant-fixup) nil @@ -111,7 +133,7 @@ an error while using those is harder to recover from." (?a "Amend" magit-commit-amend) (?A "Augment" magit-commit-augment)) :max-action-columns 4 - :default-action magit-commit)) + :default-action magit-commit-create)) (magit-define-popup-keys-deferred 'magit-commit-popup) @@ -147,7 +169,7 @@ an error while using those is harder to recover from." ;;; Commands ;;;###autoload -(defun magit-commit (&optional args) +(defun magit-commit-create (&optional args) "Create a new commit on `HEAD'. With a prefix argument, amend to the commit at `HEAD' instead. \n(git commit [--amend] ARGS)" @@ -295,8 +317,7 @@ depending on the value of option `magit-commit-squash-confirm'." (list "--autosquash" "--autostash") "" "true" nil t))) (format "Type %%p on a commit to %s into it," - (substring option 2)) - nil nil (list "--graph")) + (substring option 2))) (when magit-commit-show-diff (let ((magit-display-buffer-noselect t)) (apply #'magit-diff-staged nil (magit-diff-arguments))))))) @@ -324,6 +345,7 @@ depending on the value of option `magit-commit-squash-confirm'." ((and (magit-rebase-in-progress-p) (not (magit-anything-unstaged-p)) (y-or-n-p "Nothing staged. Continue in-progress rebase? ")) + (setq this-command 'magit-rebase-continue) (magit-run-git-sequencer "rebase" "--continue") nil) ((and (file-exists-p (magit-git-dir "MERGE_MSG")) @@ -460,8 +482,9 @@ If no commit is in progress, then initiate it. Use the function specified by variable `magit-commit-add-log-insert-function' to actually insert the entry." (interactive) - (let ((hunk (magit-section-when 'hunk it)) - (log (magit-commit-message-buffer)) buf pos) + (let ((hunk (and (magit-section-match 'hunk) + (magit-current-section))) + (log (magit-commit-message-buffer)) buf pos) (save-window-excursion (call-interactively #'magit-diff-visit-file) (setq buf (current-buffer)) @@ -469,7 +492,7 @@ actually insert the entry." (unless log (unless (magit-commit-assert nil) (user-error "Abort")) - (magit-commit) + (magit-commit-create) (while (not (setq log (magit-commit-message-buffer))) (sit-for 0.01))) (save-excursion @@ -515,5 +538,6 @@ actually insert the entry." (insert (format "(%s): \n" defun)) (backward-char))))))) +;;; _ (provide 'magit-commit) ;;; magit-commit.el ends here diff --git a/elpa/magit-20180828.1055/magit-core.el b/elpa/magit-20181110.1820/magit-core.el similarity index 99% rename from elpa/magit-20180828.1055/magit-core.el rename to elpa/magit-20181110.1820/magit-core.el index 106186ea..2bad54c1 100644 --- a/elpa/magit-20180828.1055/magit-core.el +++ b/elpa/magit-20181110.1820/magit-core.el @@ -30,7 +30,6 @@ ;;; Code: -(require 'magit-popup) (require 'magit-utils) (require 'magit-section) (require 'magit-git) @@ -128,5 +127,6 @@ are enabled by default by the popup `magit-NAME-popup'." (custom-add-to-group 'magit-related 'smerge-refine-ignore-whitespace 'custom-variable) (custom-add-to-group 'magit-related 'vc-follow-symlinks 'custom-variable) +;;; _ (provide 'magit-core) ;;; magit-core.el ends here diff --git a/elpa/magit-20180828.1055/magit-diff.el b/elpa/magit-20181110.1820/magit-diff.el similarity index 93% rename from elpa/magit-20180828.1055/magit-diff.el rename to elpa/magit-20181110.1820/magit-diff.el index 57f4ed7b..e033d1db 100644 --- a/elpa/magit-20180828.1055/magit-diff.el +++ b/elpa/magit-20181110.1820/magit-diff.el @@ -28,6 +28,9 @@ ;;; Code: +(eval-when-compile + (require 'subr-x)) + (require 'git-commit) (require 'magit-core) @@ -311,10 +314,18 @@ subject to option `magit-revision-insert-related-refs'." :type 'string) (defcustom magit-revision-insert-related-refs t - "Whether to show related refs in revision buffers." + "Whether to show related branches in revision buffers + +`nil' Don't show any related branches. +`t' Show related local branches. +`all' Show related local and remote branches. +`mixed' Show all containing branches and local merged branches." :package-version '(magit . "2.1.0") :group 'magit-revision - :type 'boolean) + :type '(choice (const :tag "don't" nil) + (const :tag "local only" t) + (const :tag "all related" all) + (const :tag "all containing, local merged" mixed))) (defcustom magit-revision-use-hash-sections 'quicker "Whether to turn hashes inside the commit message into sections. @@ -343,21 +354,25 @@ still visit the commit at point using \"RET\"." (defcustom magit-revision-show-gravatars nil "Whether to show gravatar images in revision buffers. -If non-nil, then the value has to be a cons-cell which specifies -where the gravatar images for the author and/or the committer are -inserted inside the text that was previously inserted according -to `magit-revision-header-format'. - -Both cells are regular expressions. The car specifies where to -insert the author gravatar image. The top half of the image is -inserted right after the matched text, the bottom half on the -next line at the same offset. The cdr specifies where to insert -the committer image, accordingly. Either the car or the cdr may -be nil." +If nil, then don't insert any gravatar images. If t, then insert +both images. If `author' or `committer', then insert only the +respective image. + +If you have customized the option `magit-revision-header-format' +and want to insert the images then you might also have to specify +where to do so. In that case the value has to be a cons-cell of +two regular expressions. The car specifies where to insert the +author's image. The top half of the image is inserted right +after the matched text, the bottom half on the next line in the +same column. The cdr specifies where to insert the committer's +image, accordingly. Either the car or the cdr may be nil." :package-version '(magit . "2.3.0") :group 'magit-revision :type '(choice (const :tag "Don't show gravatars" nil) - (cons :tag "Show gravatars" + (const :tag "Show gravatars" t) + (const :tag "Show author gravatar" author) + (const :tag "Show committer gravatar" committer) + (cons :tag "Show gravatars using custom pattern." (regexp :tag "Author regexp" "^Author: ") (regexp :tag "Committer regexp" "^Commit: ")))) @@ -380,6 +395,24 @@ any build." :group 'magit-revision :type 'boolean) +(defcustom magit-revision-fill-summary-line nil + "Whether to fill excessively long summary lines. + +If this is an integer, then the summary line is filled if it is +longer than either the limit specified here or `window-width'. + +You may want to only set this locally in \".dir-locals-2.el\" for +repositories known to contain bad commit messages. + +The body of the message is left alone because (a) most people who +write excessively long summary lines usually don't add a body and +(b) even people who have the decency to wrap their lines may have +a good reason to include a long line in the body sometimes." + :package-version '(magit . "2.90.0") + :group 'magit-revision + :type '(choice (const :tag "Don't fill" nil) + (integer :tag "Fill if longer than"))) + ;;;; Diff Sections (defcustom magit-diff-section-arguments '("--no-ext-diff") @@ -569,7 +602,7 @@ and `:slant'." (((class color) (background dark)) :background "grey20" :foreground "grey70")) - "Face for lines in a diff that have been removed." + "Face for lines in the current context in a diff." :group 'magit-faces) (defface magit-diff-whitespace-warning @@ -592,27 +625,34 @@ and `:slant'." ;;; Commands ;;;; Diff popups -(defconst magit-diff-popup-common +(defconst magit-diff-popup-common-keywords '(:variable magit-diff-arguments - :man-page "git-diff" - :options ((?f "Limit to files" "-- " magit-read-files) - (?u "Context lines" "-U") - (?m "Detect renames" "-M") - (?c "Detect copies" "-C") - (?a "Diff algorithm" "--diff-algorithm=" - magit-diff-select-algorithm)))) + :man-page "git-diff")) + +(defconst magit-diff-popup-common-options + '((?f "Limit to files" "-- " magit-read-files) + (?u "Context lines" "-U") + (?m "Detect renames" "-M") + (?c "Detect copies" "-C") + (?a "Diff algorithm" "--diff-algorithm=" magit-diff-select-algorithm) + (?i "Ignore submodules" "--ignore-submodules=" + magit-diff-select-ignore-submodules))) + +(defconst magit-diff-popup-common-switches + '((?f "Show surrounding functions" "--function-context") + (?b "Ignore whitespace changes" "--ignore-space-change") + (?w "Ignore all whitespace" "--ignore-all-space") + (?x "Disallow external diff drivers" "--no-ext-diff"))) (defvar magit-diff-popup - `(,@magit-diff-popup-common - :switches ((?f "Show surrounding functions" "--function-context") - (?b "Ignore whitespace changes" "--ignore-space-change") - (?w "Ignore all whitespace" "--ignore-all-space") - (?x "Disallow external diff drivers" "--no-ext-diff") - (?s "Show stats" "--stat")) + `(,@magit-diff-popup-common-keywords + :options ,magit-diff-popup-common-options + :switches (,@magit-diff-popup-common-switches + (?s "Show stats" "--stat")) :actions ((?d "Dwim" magit-diff-dwim) (?u "Diff unstaged" magit-diff-unstaged) (?c "Show commit" magit-show-commit) - (?r "Diff range" magit-diff) + (?r "Diff range" magit-diff-range) (?s "Diff staged" magit-diff-staged) (?t "Show stash" magit-stash-show) (?p "Diff paths" magit-diff-paths) @@ -621,11 +661,9 @@ and `:slant'." :max-action-columns 3)) (defvar magit-diff-refresh-popup - `(,@magit-diff-popup-common - :switches ((?f "Show surrounding functions" "--function-context") - (?b "Ignore whitespace changes" "--ignore-space-change") - (?w "Ignore all whitespace" "--ignore-all-space") - (?x "Disallow external diff drivers" "--no-ext-diff")) + `(,@magit-diff-popup-common-keywords + :options ,magit-diff-popup-common-options + :switches ,magit-diff-popup-common-switches :actions ((?g "Refresh" magit-diff-refresh) (?t "Toggle hunk refinement" magit-diff-toggle-refine-hunk) (?s "Set defaults" magit-diff-set-default-arguments) @@ -634,12 +672,10 @@ and `:slant'." :max-action-columns 2)) (defvar magit-diff-mode-refresh-popup - `(,@magit-diff-popup-common - :switches ((?f "Show surrounding functions" "--function-context") - (?b "Ignore whitespace changes" "--ignore-space-change") - (?w "Ignore all whitespace" "--ignore-all-space") - (?x "Disallow external diff drivers" "--no-ext-diff") - (?s "Show stats" "--stat")) + `(,@magit-diff-popup-common-keywords + :options ,magit-diff-popup-common-options + :switches (,@magit-diff-popup-common-switches + (?s "Show stats" "--stat")) :actions ((?g "Refresh" magit-diff-refresh) (?t "Toggle hunk refinement" magit-diff-toggle-refine-hunk) (?s "Set defaults" magit-diff-set-default-arguments) @@ -650,12 +686,10 @@ and `:slant'." :max-action-columns 2)) (defvar magit-revision-mode-refresh-popup - `(,@magit-diff-popup-common - :switches ((?f "Show surrounding functions" "--function-context") - (?b "Ignore whitespace changes" "--ignore-space-change") - (?w "Ignore all whitespace" "--ignore-all-space") - (?x "Disallow external diff drivers" "--no-ext-diff") - (?s "Show stats" "--stat")) + `(,@magit-diff-popup-common-keywords + :options ,magit-diff-popup-common-options + :switches (,@magit-diff-popup-common-switches + (?s "Show stats" "--stat")) :actions ((?g "Refresh" magit-diff-refresh) (?t "Toggle hunk refinement" magit-diff-toggle-refine-hunk) (?s "Set defaults" magit-diff-set-default-arguments) @@ -752,6 +786,12 @@ buffer." (?p "[p]atience" "patience") (?h "[h]istogram" "histogram"))) +(defun magit-diff-select-ignore-submodules (&rest _ignored) + (magit-read-char-case "Ignore submodules " t + (?u "[u]ntracked" "untracked") + (?d "[d]irty" "dirty") + (?a "[a]ll" "all"))) + ;;;; Diff commands ;;;###autoload @@ -768,12 +808,12 @@ buffer." (magit-diff-unmerged args (list file)) (magit-diff-staged nil args files)))) (`(commit . ,value) - (magit-diff (format "%s^..%s" value value) args files)) + (magit-diff-range (format "%s^..%s" value value) args files)) (`(stash . ,value) (magit-stash-show value args)) ((and range (pred stringp)) - (magit-diff range args files)) + (magit-diff-range range args files)) (_ - (call-interactively #'magit-diff)))) + (call-interactively #'magit-diff-range)))) (defun magit-diff--dwim () "Return information for performing DWIM diff. @@ -870,7 +910,7 @@ a \"revA...revB\" range. Otherwise, always construct (magit-mode-setup #'magit-diff-mode rev-or-range const args files)) ;;;###autoload -(defun magit-diff (rev-or-range &optional args files) +(defun magit-diff-range (rev-or-range &optional args files) "Show differences between two commits. REV-OR-RANGE should be a range or a single revision. If it is a @@ -1001,7 +1041,7 @@ be committed." If there is no revision at point or with a prefix argument prompt for a revision." (interactive - (pcase-let* ((mcommit (magit-section-when module-commit)) + (pcase-let* ((mcommit (magit-section-value-if 'module-commit)) (atpoint (or (and (bound-and-true-p magit-blame-mode) (oref (magit-current-blame-chunk) orig-rev)) mcommit @@ -1011,8 +1051,8 @@ for a revision." (magit-read-branch-or-commit "Show commit" atpoint)) args files - (and mcommit (list (magit-section-parent-value - (magit-current-section))))))) + (and mcommit + (magit-section-parent-value (magit-current-section)))))) (require 'magit) (magit-with-toplevel (when module @@ -1155,6 +1195,15 @@ instead." (not (equal "-U0" it)) t)) +(defun magit-diff-ignore-any-space-p () + (let ((args (car (magit-diff-arguments t)))) + (--any-p (member it args) + '("--ignore-cr-at-eol" + "--ignore-space-at-eol" + "--ignore-space-change" "-b" + "--ignore-all-space" "-w" + "--ignore-blank-space")))) + (defun magit-diff-toggle-refine-hunk (&optional style) "Turn diff-hunk refining on or off. @@ -1844,21 +1893,21 @@ section or a child thereof." (when rewind (setq range (replace-regexp-in-string "[^.]\\(\\.\\.\\)[^.]" "..." range t t 1))) - (magit-insert-section (file module t) + (magit-insert-section (magit-module-section module t) (magit-insert-heading - (concat (propertize (concat "modified " module) - 'face 'magit-diff-file-heading) - " (" - (cond (rewind "rewind") - ((string-match-p "\\.\\.\\." range) "non-ff") - (t "new commits")) - (and (or modified untracked) - (concat ", " - (and modified "modified") - (and modified untracked " and ") - (and untracked "untracked") - " content")) - ")")) + (propertize (concat "modified " module) + 'face 'magit-diff-file-heading) + " (" + (cond (rewind "rewind") + ((string-match-p "\\.\\.\\." range) "non-ff") + (t "new commits")) + (and (or modified untracked) + (concat ", " + (and modified "modified") + (and modified untracked " and ") + (and untracked "untracked") + " content")) + ")") (let ((default-directory (file-name-as-directory (expand-file-name module (magit-toplevel))))) @@ -1869,21 +1918,21 @@ section or a child thereof." (equal (match-string 1) module)) (magit-bind-match-strings (_module _range msg) nil (magit-delete-line) - (magit-insert-section (file module) + (magit-insert-section (magit-module-section module) (magit-insert-heading - (concat (propertize (concat "submodule " module) - 'face 'magit-diff-file-heading) - " (" msg ")"))))) + (propertize (concat "submodule " module) + 'face 'magit-diff-file-heading) + " (" msg ")")))) (t - (magit-insert-section (file module) + (magit-insert-section (magit-module-section module) (magit-insert-heading - (concat (propertize (concat "modified " module) - 'face 'magit-diff-file-heading) - " (" - (and modified "modified") - (and modified untracked " and ") - (and untracked "untracked") - " content)")))))))) + (propertize (concat "modified " module) + 'face 'magit-diff-file-heading) + " (" + (and modified "modified") + (and modified untracked " and ") + (and untracked "untracked") + " content)"))))))) (defun magit-diff-wash-hunk () (when (looking-at "^@\\{2,\\} \\(.+?\\) @\\{2,\\}\\(?: \\(.*\\)\\)?") @@ -2021,6 +2070,10 @@ or a ref which is not a branch, then it inserts nothing." (save-excursion (while (search-forward "\r\n" nil t) ; Remove trailing CRs. (delete-region (match-beginning 0) (1+ (match-beginning 0))))) + (when magit-revision-fill-summary-line + (let ((fill-column (min magit-revision-fill-summary-line + (window-width)))) + (fill-region (point) (line-end-position)))) (when magit-revision-use-hash-sections (save-excursion (while (not (eobp)) @@ -2121,32 +2174,12 @@ or a ref which is not a branch, then it inserts nothing." (insert "Parent: ") (insert (propertize hash 'face 'magit-hash)) (insert " " msg "\n"))))) - (when-let ((merged (magit-list-merged-branches rev))) - (insert "Merged: ") - (let (branch) - (while (and (< (+ (- (point) (line-beginning-position)) - (length (car merged)) 9) - (window-width)) - (setq branch (pop merged))) - (insert ?\s) - (magit-insert-section (branch branch) - (insert (propertize branch 'face 'magit-branch-local))))) - (when merged - (insert (format " (%s more)" (length merged)))) - (insert ?\n)) - (when-let ((containing (magit-list-containing-branches rev))) - (insert "Containing:") - (let (branch) - (while (and (< (+ (- (point) (line-beginning-position)) - (length (car containing)) 9) - (window-width)) - (setq branch (pop containing))) - (insert ?\s) - (magit-insert-section (branch branch) - (insert (propertize branch 'face 'magit-branch-local))))) - (when containing - (insert (format " (%s more)" (length containing)))) - (insert ?\n)) + (magit--insert-related-refs + rev "--merged" "Merged" + (eq magit-revision-insert-related-refs 'all)) + (magit--insert-related-refs + rev "--contains" "Contained" + (eq magit-revision-insert-related-refs '(all mixed))) (when-let ((follows (magit-get-current-tag rev t))) (let ((tag (car follows)) (cnt (cadr follows))) @@ -2165,14 +2198,34 @@ or a ref which is not a branch, then it inserts nothing." 'face 'magit-tag)))))) (insert ?\n)))) +(defun magit--insert-related-refs (rev arg title remote) + (when-let ((refs (magit-list-related-branches arg rev (and remote "-a")))) + (insert title ":" (make-string (- 10 (length title)) ?\s)) + (dolist (branch refs) + (if (<= (+ (current-column) 1 (length branch)) + (window-width)) + (insert ?\s) + (insert ?\n (make-string 12 ?\s))) + (magit-insert-section (branch branch) + (insert (propertize branch 'face + (if (string-prefix-p "remotes/" branch) + 'magit-branch-remote + 'magit-branch-local))))) + (insert ?\n))) + (defun magit-insert-revision-gravatars (rev beg) (when (and magit-revision-show-gravatars (window-system)) (require 'gravatar) - (pcase-let ((`(,author . ,committer) magit-revision-show-gravatars)) - (--when-let (magit-rev-format "%aE" rev) + (pcase-let ((`(,author . ,committer) + (pcase magit-revision-show-gravatars + (`t '("^Author: " . "^Commit: ")) + (`author '("^Author: " . nil)) + (`committer '(nil . "^Commit: ")) + (_ magit-revision-show-gravatars)))) + (--when-let (and author (magit-rev-format "%aE" rev)) (magit-insert-revision-gravatar beg rev it author)) - (--when-let (magit-rev-format "%cE" rev) + (--when-let (and committer (magit-rev-format "%cE" rev)) (magit-insert-revision-gravatar beg rev it committer))))) (defun magit-insert-revision-gravatar (beg rev email regexp) @@ -2187,8 +2240,9 @@ or a ref which is not a branch, then it inserts nothing." (ceiling (/ size (aref font-obj 7) 1.0)) 1)) (gravatar-size (- size 2))) - (gravatar-retrieve email 'magit-insert-revision-gravatar-cb - (list rev (point-marker) align-to column)))))) + (ignore-errors ; service may be unreachable + (gravatar-retrieve email 'magit-insert-revision-gravatar-cb + (list rev (point-marker) align-to column))))))) (defun magit-insert-revision-gravatar-cb (image rev marker align-to column) (unless (eq image 'error) @@ -2293,7 +2347,8 @@ Do not confuse this with `magit-diff-scope' (which see)." (let ((range (nth 0 magit-refresh-args)) (const (nth 1 magit-refresh-args))) (cond ((member "--no-index" const) 'undefined) - ((not range) + ((or (not range) + (magit-rev-eq range "HEAD")) (if (member "--cached" const) 'staged 'unstaged)) @@ -2307,11 +2362,12 @@ Do not confuse this with `magit-diff-scope' (which see)." (if (memq stype '(staged unstaged tracked untracked)) stype (pcase stype - (`file (let* ((parent (oref it parent)) - (type (oref parent type))) - (if (eq type 'file) - (magit-diff-type parent) - type))) + ((or `file `module) + (let* ((parent (oref it parent)) + (type (oref parent type))) + (if (memq type '(file module)) + (magit-diff-type parent) + type))) (`hunk (-> it (oref parent) (oref parent) @@ -2363,6 +2419,8 @@ actually a `diff' but a `diffstat' section." (`(hunk ,_ ,_ ,_) 'hunk) (`(file t t nil) 'files) (`(file ,_ ,_ ,_) 'file) + (`(module t t nil) 'files) + (`(module ,_ ,_ ,_) 'file) (`(,(or `staged `unstaged `untracked) nil ,_ ,_) 'list))))) @@ -2454,6 +2512,8 @@ are highlighted." (not (eq this-command 'mouse-drag-region)))) (`(file t) 'magit-diff-file-heading-selection) (`(file nil) 'magit-diff-file-heading-highlight) + (`(module t) 'magit-diff-file-heading-selection) + (`(module nil) 'magit-diff-file-heading-highlight) (`(hunk t) 'magit-diff-hunk-heading-selection) (`(hunk nil) 'magit-diff-hunk-heading-highlight)))) @@ -2766,5 +2826,6 @@ last (visual) lines of the region." (setq patch (buffer-string))) patch)) +;;; _ (provide 'magit-diff) ;;; magit-diff.el ends here diff --git a/elpa/magit-20180828.1055/magit-ediff.el b/elpa/magit-20181110.1820/magit-ediff.el similarity index 99% rename from elpa/magit-20180828.1055/magit-ediff.el rename to elpa/magit-20181110.1820/magit-ediff.el index 7e0716be..41b3d83f 100644 --- a/elpa/magit-20180828.1055/magit-ediff.el +++ b/elpa/magit-20181110.1820/magit-ediff.el @@ -505,5 +505,6 @@ stash that were staged." (defun magit-ediff-restore-previous-winconf () (set-window-configuration magit-ediff-previous-winconf)) +;;; _ (provide 'magit-ediff) ;;; magit-ediff.el ends here diff --git a/elpa/magit-20180828.1055/magit-extras.el b/elpa/magit-20181110.1820/magit-extras.el similarity index 91% rename from elpa/magit-20180828.1055/magit-extras.el rename to elpa/magit-20181110.1820/magit-extras.el index a9e04948..cd0649ab 100644 --- a/elpa/magit-20180828.1055/magit-extras.el +++ b/elpa/magit-20181110.1820/magit-extras.el @@ -24,6 +24,9 @@ ;;; Code: +(eval-when-compile + (require 'subr-x)) + (require 'magit) (declare-function dired-read-shell-command "dired-aux" (prompt arg files)) @@ -102,6 +105,10 @@ blame to center around the line point is on." (defun ido-enter-magit-status () "Drop into `magit-status' from file switching. +This command does not work in Emacs 26. It does work in Emacs 25 +and Emacs 27. See https://github.com/magit/magit/issues/3634 and +https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31707. + To make this command available use something like: (add-hook \\='ido-setup-hook @@ -117,7 +124,9 @@ like pretty much every other keymap: (kbd \"C-x g\") \\='ido-enter-magit-status)" (interactive) (with-no-warnings ; FIXME these are internal variables - (setq ido-exit 'fallback fallback 'magit-status)) + (setq ido-exit 'fallback) + (setq fallback 'magit-status) ; for Emacs 25 + (setq ido-fallback 'magit-status)) ; for Emacs 27 (exit-minibuffer)) ;;;###autoload @@ -238,66 +247,6 @@ with two prefix arguments remove ignored files only. (put 'magit-clean 'disabled t) -;;; Gitignore - -;;;###autoload (autoload 'magit-gitignore-popup "magit-extras" nil t) -(magit-define-popup magit-gitignore-popup - "Popup console for gitignore commands." - :man-page "gitignore" - :actions '((?l "ignore locally" magit-gitignore-locally) - (?g "ignore globally" magit-gitignore)) - :max-action-columns 1) - -;;;###autoload -(defun magit-gitignore (file-or-pattern &optional local) - "Instruct Git to ignore FILE-OR-PATTERN. -With a prefix argument only ignore locally." - (interactive (list (magit-gitignore-read-pattern current-prefix-arg) - current-prefix-arg)) - (let ((gitignore - (if local - (magit-git-dir (convert-standard-filename "info/exclude")) - (expand-file-name ".gitignore" (magit-toplevel))))) - (make-directory (file-name-directory gitignore) t) - (with-temp-buffer - (when (file-exists-p gitignore) - (insert-file-contents gitignore)) - (goto-char (point-max)) - (unless (bolp) - (insert "\n")) - (insert (replace-regexp-in-string "\\(\\\\*\\)" "\\1\\1" file-or-pattern)) - (insert "\n") - (write-region nil nil gitignore)) - (if local - (magit-refresh) - (magit-run-git "add" ".gitignore")))) - -;;;###autoload -(defun magit-gitignore-locally (file-or-pattern) - "Instruct Git to locally ignore FILE-OR-PATTERN." - (interactive (list (magit-gitignore-read-pattern t))) - (magit-gitignore file-or-pattern t)) - -(defun magit-gitignore-read-pattern (local) - (let* ((default (magit-current-file)) - (choices - (delete-dups - (--mapcat - (cons (concat "/" it) - (when-let ((ext (file-name-extension it))) - (list (concat "/" (file-name-directory "foo") "*." ext) - (concat "*." ext)))) - (magit-untracked-files))))) - (when default - (setq default (concat "/" default)) - (unless (member default choices) - (setq default (concat "*." (file-name-extension default))) - (unless (member default choices) - (setq default nil)))) - (magit-completing-read (concat "File or pattern to ignore" - (and local " locally")) - choices nil nil nil nil default))) - ;;; ChangeLog ;;;###autoload @@ -520,6 +469,7 @@ that)." (choice (regexp :tag "Find index regexp") (const :tag "Don't number entries" nil)))) +;;;###autoload (defun magit-pop-revision-stack (rev toplevel) "Insert a representation of a revision into the current buffer. @@ -696,5 +646,6 @@ patch application, a cherry-pick, a revert, or a bisect." ((magit-sequencer-in-progress-p) (magit-sequencer-abort)) ((magit-bisect-in-progress-p) (magit-bisect-reset)))) +;;; _ (provide 'magit-extras) ;;; magit-extras.el ends here diff --git a/elpa/magit-20181110.1820/magit-fetch.el b/elpa/magit-20181110.1820/magit-fetch.el new file mode 100644 index 00000000..dc04233c --- /dev/null +++ b/elpa/magit-20181110.1820/magit-fetch.el @@ -0,0 +1,157 @@ +;;; magit-fetch.el --- download objects and refs -*- lexical-binding: t -*- + +;; Copyright (C) 2008-2018 The Magit Project Contributors +;; +;; You should have received a copy of the AUTHORS.md file which +;; lists all contributors. If not, see http://magit.vc/authors. + +;; Author: Jonas Bernoulli +;; Maintainer: Jonas Bernoulli + +;; Magit is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. +;; +;; Magit is distributed in the hope that it will be useful, but WITHOUT +;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +;; License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with Magit. If not, see http://www.gnu.org/licenses. + +;;; Commentary: + +;; This library implements fetch commands. + +;;; Code: + +(require 'magit) + +;;; Options + +(defcustom magit-fetch-modules-jobs 4 + "Number of submodules to fetch in parallel. +Ignored for Git versions before v2.8.0." + :package-version '(magit . "2.12.0") + :group 'magit-commands + :type '(choice (const :tag "one at a time" nil) number)) + +;;; Commands + +;;;###autoload (autoload 'magit-fetch-popup "magit-fetch" nil t) +(magit-define-popup magit-fetch-popup + "Popup console for fetch commands." + :man-page "git-fetch" + :switches '((?p "Prune deleted branches" "--prune")) + :actions '("Configure" + (?C "variables..." magit-branch-config-popup) + "Fetch from" + (?p magit-get-push-remote magit-fetch-from-pushremote) + (?u magit-get-remote magit-fetch-from-upstream) + (?e "elsewhere" magit-fetch-other) + (?a "all remotes" magit-fetch-all) + "Fetch" + (?o "another branch" magit-fetch-branch) + (?r "explicit refspec" magit-fetch-refspec) + (?m "submodules" magit-fetch-modules)) + :default-action 'magit-fetch + :max-action-columns 1) + +(defun magit-git-fetch (remote args) + (run-hooks 'magit-credential-hook) + (magit-run-git-async "fetch" remote args)) + +;;;###autoload +(defun magit-fetch-from-pushremote (args) + "Fetch from the push-remote of the current branch." + (interactive (list (magit-fetch-arguments))) + (--if-let (magit-get-push-remote) + (magit-git-fetch it args) + (--if-let (magit-get-current-branch) + (user-error "No push-remote is configured for %s" it) + (user-error "No branch is checked out")))) + +;;;###autoload +(defun magit-fetch-from-upstream (args) + "Fetch from the upstream repository of the current branch." + (interactive (list (magit-fetch-arguments))) + (--if-let (magit-get-remote) + (magit-git-fetch it args) + (--if-let (magit-get-current-branch) + (user-error "No upstream is configured for %s" it) + (user-error "No branch is checked out")))) + +;;;###autoload +(defun magit-fetch-other (remote args) + "Fetch from another repository." + (interactive (list (magit-read-remote "Fetch remote") + (magit-fetch-arguments))) + (magit-git-fetch remote args)) + +;;;###autoload +(defun magit-fetch-branch (remote branch args) + "Fetch a BRANCH from a REMOTE." + (interactive + (let ((remote (magit-read-remote-or-url "Fetch from remote or url"))) + (list remote + (magit-read-remote-branch "Fetch branch" remote) + (magit-fetch-arguments)))) + (magit-git-fetch remote (cons branch args))) + +;;;###autoload +(defun magit-fetch-refspec (remote refspec args) + "Fetch a REFSPEC from a REMOTE." + (interactive + (let ((remote (magit-read-remote-or-url "Fetch from remote or url"))) + (list remote + (magit-read-refspec "Fetch using refspec" remote) + (magit-fetch-arguments)))) + (magit-git-fetch remote (cons refspec args))) + +;;;###autoload +(defun magit-fetch-all (args) + "Fetch from all remotes." + (interactive (list (cl-intersection (magit-fetch-arguments) + (list "--verbose" "--prune") + :test #'equal))) + (run-hooks 'magit-credential-hook) + (magit-run-git-async "remote" "update" args)) + +;;;###autoload +(defun magit-fetch-all-prune () + "Fetch from all remotes, and prune. +Prune remote tracking branches for branches that have been +removed on the respective remote." + (interactive) + (run-hooks 'magit-credential-hook) + (magit-run-git-async "remote" "update" "--prune")) + +;;;###autoload +(defun magit-fetch-all-no-prune () + "Fetch from all remotes." + (interactive) + (run-hooks 'magit-credential-hook) + (magit-run-git-async "remote" "update")) + +;;;###autoload +(defun magit-fetch-modules (&optional all) + "Fetch all submodules. + +Option `magit-fetch-modules-jobs' controls how many submodules +are being fetched in parallel. Also fetch the super-repository, +because `git-fetch' does not support not doing that. With a +prefix argument fetch all remotes." + (interactive "P") + (magit-with-toplevel + (magit-run-git-async + "fetch" "--verbose" "--recurse-submodules" + (and magit-fetch-modules-jobs + (version<= "2.8.0" (magit-git-version)) + (list "-j" (number-to-string magit-fetch-modules-jobs))) + (and all "--all")))) + +;;; _ +(provide 'magit-fetch) +;;; magit-fetch.el ends here diff --git a/elpa/magit-20180828.1055/magit-files.el b/elpa/magit-20181110.1820/magit-files.el similarity index 83% rename from elpa/magit-20180828.1055/magit-files.el rename to elpa/magit-20181110.1820/magit-files.el index b77791a9..094539f2 100644 --- a/elpa/magit-20180828.1055/magit-files.el +++ b/elpa/magit-20181110.1820/magit-files.el @@ -30,6 +30,9 @@ ;;; Code: +(eval-when-compile + (require 'subr-x)) + (require 'magit) ;;; Find Blob @@ -233,7 +236,7 @@ directory, while reading the FILENAME." (?u "Unstage" magit-unstage-file) (?d "Diff" magit-diff-buffer-file) (?l "Log" magit-log-buffer-file) - (?b "Blame" magit-blame) + (?b "Blame" magit-blame-addition) (?p "Prev blob" magit-blob-previous) (?c "Commit" magit-commit-popup) nil (?t "Trace" magit-log-trace-definition) @@ -292,13 +295,13 @@ Currently this only adds the following key bindings. (cond ((featurep 'jkl) (define-key map "i" 'magit-blob-previous) (define-key map "k" 'magit-blob-next) - (define-key map "j" 'magit-blame) + (define-key map "j" 'magit-blame-addition) (define-key map "l" 'magit-blame-removal) (define-key map "f" 'magit-blame-reverse)) (t (define-key map "p" 'magit-blob-previous) (define-key map "n" 'magit-blob-next) - (define-key map "b" 'magit-blame) + (define-key map "b" 'magit-blame-addition) (define-key map "r" 'magit-blame-removal) (define-key map "f" 'magit-blame-reverse))) (define-key map "q" 'magit-kill-this-buffer) @@ -368,8 +371,9 @@ Currently this only adds the following key bindings. If FILE isn't tracked in Git, fallback to using `rename-file'." (interactive (let* ((file (magit-read-file "Rename file")) + (dir (file-name-directory file)) (newname (read-file-name (format "Rename %s to file: " file) - (expand-file-name (file-name-directory file))))) + (and dir (expand-file-name dir))))) (list (expand-file-name file (magit-toplevel)) (expand-file-name newname)))) (if (magit-file-tracked-p (magit-convert-filename-for-git file)) @@ -446,11 +450,11 @@ Git, then fallback to using `delete-file'." (defun magit-read-file (prompt &optional tracked-only) (let ((choices (nconc (magit-list-files) (unless tracked-only (magit-untracked-files))))) - (magit-completing-read prompt choices nil t nil nil - (car (member (or (magit-section-when (file submodule)) - (magit-file-relative-name - nil tracked-only)) - choices))))) + (magit-completing-read + prompt choices nil t nil nil + (car (member (or (magit-section-value-if '(file submodule)) + (magit-file-relative-name nil tracked-only)) + choices))))) (defun magit-read-tracked-file (prompt) (magit-read-file prompt t)) @@ -484,79 +488,6 @@ If DEFAULT is non-nil, use this as the default value instead of (magit-list-files) nil nil initial-contents) ",")) -;;; Patch File - -(defcustom magit-patch-save-arguments '(exclude "--stat") - "Arguments used by `magit-patch-save-arguments' (which see)" - :package-version '(magit . "2.12.0") - :group 'magit-diff - :type '(choice (const :tag "use buffer arguments" buffer) - (cons :tag "use buffer arguments except" - (const :format "" exclude) - (repeat :format "%v%i\n" - (string :tag "Argument"))) - (repeat :tag "use constant arguments" - (string :tag "Argument")))) - -(magit-define-popup magit-patch-apply-popup - "Popup console for applying a patch file." - :man-page "git-apply" - :switches '((?i "Also apply to index" "--index") - (?c "Only apply to index" "--cached") - (?3 "Fall back on 3way merge" "--3way")) - :actions '((?a "Apply patch" magit-patch-apply)) - :default-action 'magit-patch-apply) - -(defun magit-patch-apply (file &rest args) - "Apply the patch file FILE." - (interactive (list (expand-file-name - (read-file-name "Apply patch: " - default-directory nil nil - (--when-let (magit-file-at-point) - (file-relative-name it)))) - (magit-patch-apply-arguments))) - (magit-run-git "apply" args "--" (magit-convert-filename-for-git file))) - -(defun magit-patch-save (file &optional arg) - "Write current diff into patch FILE. - -What arguments are used to create the patch depends on the value -of `magit-patch-save-arguments' and whether a prefix argument is -used. - -If the value is the symbol `buffer', then use the same arguments -as the buffer. With a prefix argument use no arguments. - -If the value is a list beginning with the symbol `exclude', then -use the same arguments as the buffer except for those matched by -entries in the cdr of the list. The comparison is done using -`string-prefix-p'. With a prefix argument use the same arguments -as the buffer. - -If the value is a list of strings (including the empty list), -then use those arguments. With a prefix argument use the same -arguments as the buffer. - -Of course the arguments that are required to actually show the -same differences as those shown in the buffer are always used." - (interactive (list (read-file-name "Write patch file: " default-directory) - current-prefix-arg)) - (unless (derived-mode-p 'magit-diff-mode) - (user-error "Only diff buffers can be saved as patches")) - (pcase-let ((`(,rev ,const ,args ,files) magit-refresh-args)) - (when (derived-mode-p 'magit-revision-mode) - (setq rev (format "%s~..%s" rev rev))) - (cond ((eq magit-patch-save-arguments 'buffer) - (when arg - (setq args nil))) - ((eq (car-safe magit-patch-save-arguments) 'exclude) - (unless arg - (setq args (-difference args (cdr magit-patch-save-arguments))))) - ((not arg) - (setq args magit-patch-save-arguments))) - (with-temp-file file - (magit-git-insert "diff" rev "-p" const args "--" files))) - (magit-refresh)) - +;;; _ (provide 'magit-files) ;;; magit-files.el ends here diff --git a/elpa/magit-20180828.1055/magit-git.el b/elpa/magit-20181110.1820/magit-git.el similarity index 92% rename from elpa/magit-20180828.1055/magit-git.el rename to elpa/magit-20181110.1820/magit-git.el index 150abfc2..6ebf2981 100644 --- a/elpa/magit-20180828.1055/magit-git.el +++ b/elpa/magit-20181110.1820/magit-git.el @@ -30,7 +30,9 @@ (require 'cl-lib) (require 'dash) -(require 'magit-popup) +(eval-when-compile + (require 'subr-x)) + (require 'magit-utils) (require 'magit-section) @@ -45,6 +47,7 @@ (defvar magit-refresh-args) ; from `magit-mode' for `magit-current-file' (defvar magit-branch-prefer-remote-upstream) (defvar magit-published-branches) +(defvar magit-diff-section-arguments) (defvar magit-tramp-process-environment nil) @@ -85,43 +88,31 @@ successfully.") ;; than using "bin/git.exe" directly. (or (and (eq system-type 'windows-nt) (--when-let (executable-find "git") - (or (ignore-errors - ;; Git for Windows 2.x provides cygpath so we can - ;; ask it for native paths. Using an upper case - ;; alias makes this fail on 1.x (which is good, - ;; because we would not want to end up using some - ;; other cygpath). - (let* ((core-exe - (car - (process-lines - it "-c" - "alias.X=!x() { which \"$1\" | cygpath -mf -; }; x" - "X" "git"))) - (hack-entry (assoc core-exe magit-git-w32-path-hack)) - ;; Running the libexec/git-core executable - ;; requires some extra PATH entries. - (path-hack - (list (concat "PATH=" - (car (process-lines - it "-c" - "alias.P=!cygpath -wp \"$PATH\"" - "P")))))) - ;; The defcustom STANDARD expression can be - ;; evaluated many times, so make sure it is - ;; idempotent. - (if hack-entry - (setcdr hack-entry path-hack) - (push (cons core-exe path-hack) magit-git-w32-path-hack)) - core-exe)) - ;; For 1.x, we search for bin/ next to cmd/. - (let ((alt (directory-file-name (file-name-directory it)))) - (if (and (equal (file-name-nondirectory alt) "cmd") - (setq alt (expand-file-name - (convert-standard-filename "bin/git.exe") - (file-name-directory alt))) - (file-executable-p alt)) - alt - it))))) + (ignore-errors + ;; Git for Windows 2.x provides cygpath so we can + ;; ask it for native paths. + (let* ((core-exe + (car + (process-lines + it "-c" + "alias.X=!x() { which \"$1\" | cygpath -mf -; }; x" + "X" "git"))) + (hack-entry (assoc core-exe magit-git-w32-path-hack)) + ;; Running the libexec/git-core executable + ;; requires some extra PATH entries. + (path-hack + (list (concat "PATH=" + (car (process-lines + it "-c" + "alias.P=!cygpath -wp \"$PATH\"" + "P")))))) + ;; The defcustom STANDARD expression can be + ;; evaluated many times, so make sure it is + ;; idempotent. + (if hack-entry + (setcdr hack-entry path-hack) + (push (cons core-exe path-hack) magit-git-w32-path-hack)) + core-exe)))) "git") "The Git executable used by Magit." :group 'magit-process @@ -227,8 +218,15 @@ framework ultimately determines how the collection is displayed." value))) ,@body))) +(defvar magit-with-editor-envvar "GIT_EDITOR" + "The environment variable exported by `magit-with-editor'. +Set this to \"GIT_SEQUENCE_EDITOR\" if you do not want to use +Emacs to edit commit messages but would like to do so to edit +rebase sequences.") + (defmacro magit-with-editor (&rest body) - "Like `with-editor' but let-bind some more variables." + "Like `with-editor' but let-bind some more variables. +Also respect the value of `magit-with-editor-envvar'." (declare (indent 0) (debug (body))) `(let ((magit-process-popup-time -1) ;; The user may have customized `shell-file-name' to @@ -243,7 +241,7 @@ framework ultimately determines how the collection is displayed." (not magit-cygwin-mount-points)) "cmdproxy" shell-file-name))) - (with-editor "GIT_EDITOR" + (with-editor* magit-with-editor-envvar ,@body))) (defun magit-process-git-arguments (args) @@ -420,6 +418,70 @@ call function WASHER with ARGS as its sole argument." (if raw it (and (string-match "^\\([0-9]+\\.[0-9]+\\.[0-9]+\\)" it) (match-string 1 it))))) +;;; Variables + +(defun magit-config-get-from-cached-list (key) + (gethash + ;; `git config --list' downcases first and last components of the key. + (--> key + (replace-regexp-in-string "\\`[^.]+" #'downcase it t t) + (replace-regexp-in-string "[^.]+\\'" #'downcase it t t)) + (magit--with-refresh-cache (cons (magit-toplevel) 'config) + (let ((configs (make-hash-table :test 'equal))) + (dolist (conf (magit-git-items "config" "--list" "-z")) + (let* ((nl-pos (cl-position ?\n conf)) + (key (substring conf 0 nl-pos)) + (val (if nl-pos (substring conf (1+ nl-pos)) ""))) + (puthash key (nconc (gethash key configs) (list val)) configs))) + configs)))) + +(defun magit-get (&rest keys) + "Return the value of the Git variable specified by KEYS." + (car (last (apply 'magit-get-all keys)))) + +(defun magit-get-all (&rest keys) + "Return all values of the Git variable specified by KEYS." + (let ((magit-git-debug nil) + (arg (and (or (null (car keys)) + (string-prefix-p "--" (car keys))) + (pop keys))) + (key (mapconcat 'identity keys "."))) + (if (and magit--refresh-cache (not arg)) + (magit-config-get-from-cached-list key) + (magit-git-items "config" arg "-z" "--get-all" key)))) + +(defun magit-get-boolean (&rest keys) + "Return the boolean value of the Git variable specified by KEYS." + (let ((key (mapconcat 'identity keys "."))) + (if magit--refresh-cache + (equal "true" (car (last (magit-config-get-from-cached-list key)))) + (equal (magit-git-str "config" "--bool" key) "true")))) + +(defun magit-set (value &rest keys) + "Set the value of the Git variable specified by KEYS to VALUE." + (let ((arg (and (or (null (car keys)) + (string-prefix-p "--" (car keys))) + (pop keys))) + (key (mapconcat 'identity keys "."))) + (if value + (magit-git-success "config" arg key value) + (magit-git-success "config" arg "--unset" key)) + value)) + +(gv-define-setter magit-get (val &rest keys) + `(magit-set ,val ,@keys)) + +(defun magit-set-all (values &rest keys) + "Set all values of the Git variable specified by KEYS to VALUES." + (let ((arg (and (or (null (car keys)) + (string-prefix-p "--" (car keys))) + (pop keys))) + (var (mapconcat 'identity keys "."))) + (when (magit-get var) + (magit-call-git "config" arg "--unset-all" var)) + (dolist (v values) + (magit-call-git "config" arg "--add" var v)))) + ;;; Files (defun magit--safe-default-directory (&optional file) @@ -439,12 +501,23 @@ call function WASHER with ARGS as its sole argument." `(when-let ((default-directory (magit--safe-default-directory ,file))) ,@body)) +(defun magit-gitdir (&optional directory) + "Return the absolute and resolved path of the .git directory. + +If the `GIT_DIR' environment variable is define then return that. +Otherwise return the .git directory for DIRECTORY, or if that is +nil, then for `default-directory' instead. If the directory is +not located inside a Git repository, then return nil." + (let ((default-directory (or directory default-directory))) + (magit-git-dir))) + (defun magit-git-dir (&optional path) - "Return absolute path to the control directory of the current repository. + "Return the absolute and resolved path of the .git directory. -All symlinks are followed. If optional PATH is non-nil, then -it has to be a path relative to the control directory and its -absolute path is returned." +If the `GIT_DIR' environment variable is define then return that. +Otherwise return the .git directory for `default-directory'. If +the directory is not located inside a Git repository, then return +nil." (magit--with-refresh-cache (list default-directory 'magit-git-dir path) (magit--with-safe-default-directory nil (when-let ((dir (magit-rev-parse-safe "--git-dir"))) @@ -458,12 +531,15 @@ absolute path is returned." (defun magit--record-separated-gitdir () (let ((topdir (magit-toplevel)) (gitdir (magit-git-dir))) + ;; Kludge: git-annex converts submodule gitdirs to symlinks. See #3599. + (when (file-symlink-p (directory-file-name gitdir)) + (setq gitdir (file-truename gitdir))) ;; We want to delete the entry for `topdir' here, rather than within ;; (unless ...), in case a `--separate-git-dir' repository was switched to ;; the standard structure (i.e., "topdir/.git/"). (setq magit--separated-gitdirs (cl-delete topdir - magit--separated-gitdirs - :key #'car :test #'equal)) + magit--separated-gitdirs + :key #'car :test #'equal)) (unless (equal (file-name-as-directory (expand-file-name ".git" topdir)) gitdir) (push (cons topdir gitdir) magit--separated-gitdirs)))) @@ -607,12 +683,12 @@ NOERROR is non-nil, in which case return nil." (or (file-directory-p default-directory) (and (not noerror) (let ((exists (file-exists-p default-directory))) - (signal (if exists 'file-error 'file-missing) - (list "Running git in directory" - (if exists + (signal (if exists 'file-error 'file-missing) + (list "Running git in directory" + (if exists "Not a directory" "No such file or directory") - default-directory)))))) + default-directory)))))) (defun magit-git-repo-p (directory &optional non-bare) "Return t if DIRECTORY is a Git repository. @@ -676,11 +752,12 @@ tracked file." (and nomodules "--ignore-submodules") (magit-headish) "--" files)) -(defun magit-staged-binary-files () +(defun magit-binary-files (&rest args) (--mapcat (and (string-match "^-\t-\t\\(.+\\)" it) (list (match-string 1 it))) - (magit-git-items "diff" "-z" "--cached" - "--numstat" "--ignore-submodules"))) + (apply #'magit-git-items + "diff" "-z" "--numstat" "--ignore-submodules" + args))) (defun magit-unmerged-files () (magit-git-items "diff-files" "-z" "--name-only" "--diff-filter=U")) @@ -836,6 +913,11 @@ are considered." (defun magit-module-no-worktree-p (module) (not (magit-module-worktree-p module))) +(defun magit-ignore-submodules-p () + (cl-find-if (lambda (arg) + (string-prefix-p "--ignore-submodules" arg)) + magit-diff-section-arguments)) + ;;; Revisions and References (defun magit-rev-parse (&rest args) @@ -878,8 +960,9 @@ string \"true\", otherwise return nil." (magit-git-success "diff" "--quiet" a b)) (defun magit-rev-eq (a b) - (equal (magit-rev-verify a) - (magit-rev-verify b))) + (let ((a (magit-rev-verify a)) + (b (magit-rev-verify b))) + (and a b (equal a b)))) (defun magit-rev-ancestor-p (a b) "Return non-nil if commit A is an ancestor of commit B." @@ -1042,7 +1125,7 @@ to, or to some other symbolic-ref that points to the same ref." (magit-name-remote-branch (oref it value)))))) (defun magit-commit-at-point () - (or (magit-section-when commit) + (or (magit-section-value-if 'commit) (and (derived-mode-p 'magit-revision-mode) (car magit-refresh-args)))) @@ -1067,7 +1150,7 @@ to, or to some other symbolic-ref that points to the same ref." (commit (magit-name-tag (oref it value))))) (defun magit-stash-at-point () - (magit-section-when stash)) + (magit-section-value-if 'stash)) (defun magit-remote-at-point () (magit-section-case @@ -1075,13 +1158,8 @@ to, or to some other symbolic-ref that points to the same ref." (branch (magit-section-parent-value it)))) (defun magit-module-at-point (&optional predicate) - (magit-section-when - '(submodule - [file modules-unpulled-from-upstream] - [file modules-unpulled-from-pushremote] - [file modules-unpushed-to-upstream] - [file modules-unpushed-to-pushremote]) - (let ((module (oref it value))) + (when (magit-section-match 'magit-module-section) + (let ((module (oref (magit-current-section) value))) (and (or (not predicate) (funcall predicate module)) module)))) @@ -1121,6 +1199,14 @@ The amount of time spent searching is limited by ((string-prefix-p "refs/heads/" merge) (concat "refs/remotes/" remote "/" (substring merge 11)))))))) +(defun magit-set-upstream-branch (branch upstream) + (if upstream + (pcase-let ((`(,remote . ,merge) (magit-split-branch-name upstream))) + (setf (magit-get (format "branch.%s.remote" branch)) remote) + (setf (magit-get (format "branch.%s.merge" branch)) + (concat "refs/heads/" merge))) + (magit-call-git "branch" "--unset-upstream" branch))) + (defun magit-get-upstream-branch (&optional branch verify) (and (or branch (setq branch (magit-get-current-branch))) (when-let ((remote (magit-get "branch" branch "remote")) @@ -1159,9 +1245,13 @@ The amount of time spent searching is limited by (magit-rev-ancestor-p upstream branch) upstream))))) -(defun magit-get-upstream-remote (&optional branch) - (and (or branch (setq branch (magit-get-current-branch))) - (magit-get "branch" branch "remote"))) +(defun magit-get-upstream-remote (&optional branch non-local) + (unless branch + (setq branch (magit-get-current-branch))) + (and branch + (let ((remote (magit-get "branch" branch "remote"))) + (and (not (and non-local (equal remote "."))) + remote)))) (defun magit-get-push-remote (&optional branch) (or (and (or branch (setq branch (magit-get-current-branch))) @@ -1174,7 +1264,7 @@ The amount of time spent searching is limited by (push-branch (concat remote "/" branch))) (and (or (not verify) (magit-rev-verify push-branch)) - push-branch)))) + (propertize push-branch 'face 'magit-branch-remote))))) (defun magit-get-@{push}-branch (&optional branch) (let ((ref (magit-rev-parse "--symbolic-full-name" @@ -1549,8 +1639,12 @@ Return a list of two integers: (A>B B>A)." Each entry controls how a certain type of ref is displayed, and has the form (REGEXP . FACE). REGEXP is a regular expression used to match full refs. The first entry whose REGEXP matches -the reference is used. The first regexp submatch becomes the -\"label\" that represents the ref and is propertized with FONT.") +the reference is used. + +In log and revision buffers the first regexp submatch becomes the +\"label\" that represents the ref and is propertized with FONT. +In refs buffers the displayed text is controlled by other means +and this option only controls what face is used.") (defun magit-format-ref-labels (string) ;; To support Git <2.2.0, we remove the surrounding parentheses here @@ -1576,7 +1670,7 @@ the reference is used. The first regexp submatch becomes the (replace-regexp-in-string "tag: " "refs/tags/" string) regexp t)))) (setq names (split-string string regexp t))) - (let (state head tags branches remotes other combined) + (let (state head upstream tags branches remotes other combined) (dolist (ref names) (let* ((face (cdr (--first (string-match (car it) ref) magit-ref-namespaces))) @@ -1606,20 +1700,42 @@ the reference is used. The first regexp submatch becomes the name))) name)) remotes)) - (dolist (name branches) - (let ((push (car (member (magit-get-push-branch name) remotes)))) - (when push - (setq remotes (delete push remotes)) - (string-match "^[^/]*/" push) - (setq push (substring push 0 (match-end 0)))) - (if (equal name (magit-get-current-branch)) + (let* ((current (magit-get-current-branch)) + (target (magit-get-upstream-branch current t))) + (dolist (name branches) + (let ((push (car (member (magit-get-push-branch name) remotes)))) + (when push + (setq remotes (delete push remotes)) + (string-match "^[^/]*/" push) + (setq push (substring push 0 (match-end 0)))) + (cond + ((equal name current) (setq head (concat push - (propertize name 'face 'magit-branch-current))) - (push (concat push name) combined)))) + (propertize name 'face 'magit-branch-current)))) + ((equal name target) + (setq upstream + (concat push + (propertize name 'face '(magit-branch-upstream + magit-branch-local))))) + (t + (push (concat push name) combined))))) + (when (and target (not upstream)) + (if (member target remotes) + (progn + (add-face-text-property 0 (length target) + 'magit-branch-upstream nil target) + (setq upstream target) + (setq remotes (delete target remotes))) + (when-let ((target (car (member target combined)))) + (add-face-text-property 0 (length target) + 'magit-branch-upstream nil target) + (setq upstream target) + (setq combined (delete target combined)))))) (mapconcat #'identity (-flatten `(,state ,head + ,upstream ,@(nreverse tags) ,@(nreverse combined) ,@(nreverse remotes) @@ -1648,19 +1764,20 @@ the reference is used. The first regexp submatch becomes the (,file (magit-convert-filename-for-git (make-temp-name (magit-git-dir "index.magit."))))) (unwind-protect - (progn (--when-let ,tree - (or (magit-git-success "read-tree" ,arg it - (concat "--index-output=" ,file)) - (error "Cannot read tree %s" it))) - (if (file-remote-p default-directory) - (let ((magit-tramp-process-environment - (cons (concat "GIT_INDEX_FILE=" ,file) - magit-tramp-process-environment))) - ,@body) - (let ((process-environment - (cons (concat "GIT_INDEX_FILE=" ,file) - process-environment))) - ,@body))) + (magit-with-toplevel + (--when-let ,tree + (or (magit-git-success "read-tree" ,arg it + (concat "--index-output=" ,file)) + (error "Cannot read tree %s" it))) + (if (file-remote-p default-directory) + (let ((magit-tramp-process-environment + (cons (concat "GIT_INDEX_FILE=" ,file) + magit-tramp-process-environment))) + ,@body) + (let ((process-environment + (cons (concat "GIT_INDEX_FILE=" ,file) + process-environment))) + ,@body))) (ignore-errors (delete-file (concat (file-remote-p default-directory) ,file))))))) @@ -1714,7 +1831,7 @@ the reference is used. The first regexp submatch becomes the beg) end)))) -(defvar magit-thingatpt--git-revision-chars "-./[:alnum:]@{}^~!" +(defvar magit-thingatpt--git-revision-chars "-_./[:alnum:]@{}^~!" "Characters allowable in filenames, excluding space and colon.") (put 'git-revision 'end-op @@ -1864,7 +1981,7 @@ the reference is used. The first regexp submatch becomes the (atpoint (magit--painted-branch-at-point))) (magit-completing-read prompt (magit-list-branch-names) nil t nil 'magit-revision-history - (or (magit-section-when 'branch) + (or (magit-section-value-if 'branch) atpoint (and (not (cdr atrev)) (car atrev)) (--first (not (equal it current)) atrev) @@ -1962,12 +2079,7 @@ the reference is used. The first regexp submatch becomes the (if predicate (user-error "No modules satisfying %s available" predicate) (user-error "No modules available")))) - (setq modules (magit-region-values - '(submodule - [file modules-unpulled-from-upstream] - [file modules-unpulled-from-pushremote] - [file modules-unpushed-to-upstream] - [file modules-unpushed-to-pushremote]))) + (setq modules (magit-region-values 'magit-module-section)) (when modules (when predicate (setq modules (-filter predicate modules))) @@ -1977,71 +2089,7 @@ the reference is used. The first regexp submatch becomes the (magit-confirm t nil (format "%s %%i modules" verb) nil modules) (list (magit-read-module-path (format "%s module" verb) predicate))))) -;;; Variables - -(defun magit-config-get-from-cached-list (key) - (gethash - ;; `git config --list' downcases first and last components of the key. - (--> key - (replace-regexp-in-string "\\`[^.]+" #'downcase it t t) - (replace-regexp-in-string "[^.]+\\'" #'downcase it t t)) - (magit--with-refresh-cache (cons (magit-toplevel) 'config) - (let ((configs (make-hash-table :test 'equal))) - (dolist (conf (magit-git-items "config" "--list" "-z")) - (let* ((nl-pos (cl-position ?\n conf)) - (key (substring conf 0 nl-pos)) - (val (if nl-pos (substring conf (1+ nl-pos)) ""))) - (puthash key (nconc (gethash key configs) (list val)) configs))) - configs)))) - -(defun magit-get (&rest keys) - "Return the value of the Git variable specified by KEYS." - (car (last (apply 'magit-get-all keys)))) - -(defun magit-get-all (&rest keys) - "Return all values of the Git variable specified by KEYS." - (let ((magit-git-debug nil) - (arg (and (or (null (car keys)) - (string-prefix-p "--" (car keys))) - (pop keys))) - (key (mapconcat 'identity keys "."))) - (if (and magit--refresh-cache (not arg)) - (magit-config-get-from-cached-list key) - (magit-git-items "config" arg "-z" "--get-all" key)))) - -(defun magit-get-boolean (&rest keys) - "Return the boolean value of the Git variable specified by KEYS." - (let ((key (mapconcat 'identity keys "."))) - (if magit--refresh-cache - (equal "true" (car (last (magit-config-get-from-cached-list key)))) - (equal (magit-git-str "config" "--bool" key) "true")))) - -(defun magit-set (value &rest keys) - "Set the value of the Git variable specified by KEYS to VALUE." - (let ((arg (and (or (null (car keys)) - (string-prefix-p "--" (car keys))) - (pop keys))) - (key (mapconcat 'identity keys "."))) - (if value - (magit-git-success "config" arg key value) - (magit-git-success "config" arg "--unset" key)) - value)) - -(gv-define-setter magit-get (val &rest keys) - `(magit-set ,val ,@keys)) - -(defun magit-set-all (values &rest keys) - "Set all values of the Git variable specified by KEYS to VALUES." - (let ((arg (and (or (null (car keys)) - (string-prefix-p "--" (car keys))) - (pop keys))) - (var (mapconcat 'identity keys "."))) - (when (magit-get var) - (magit-call-git "config" arg "--unset-all" var)) - (dolist (v values) - (magit-call-git "config" arg "--add" var v)))) - -;;;; Variables in Popups +;;; Variables in Popups (defun magit--format-popup-variable:value (variable width &optional global) (concat variable @@ -2122,5 +2170,6 @@ the reference is used. The first regexp submatch becomes the 'magit-popup-option-value)))))) (propertize "]" 'face 'magit-popup-disabled-argument)))) +;;; _ (provide 'magit-git) ;;; magit-git.el ends here diff --git a/elpa/magit-20181110.1820/magit-gitignore.el b/elpa/magit-20181110.1820/magit-gitignore.el new file mode 100644 index 00000000..1d4e84a9 --- /dev/null +++ b/elpa/magit-20181110.1820/magit-gitignore.el @@ -0,0 +1,98 @@ +;;; magit-gitignore.el --- intentionally untracked files -*- lexical-binding: t -*- + +;; Copyright (C) 2008-2018 The Magit Project Contributors +;; +;; You should have received a copy of the AUTHORS.md file which +;; lists all contributors. If not, see http://magit.vc/authors. + +;; Author: Jonas Bernoulli +;; Maintainer: Jonas Bernoulli + +;; Magit is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. +;; +;; Magit is distributed in the hope that it will be useful, but WITHOUT +;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +;; License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with Magit. If not, see http://www.gnu.org/licenses. + +;;; Commentary: + +;; This library implements gitignore commands. + +;;; Code: + +(eval-when-compile + (require 'subr-x)) + +(require 'magit) + +;;; Commands + +;;;###autoload (autoload 'magit-gitignore-popup "magit-gitignore" nil t) +(magit-define-popup magit-gitignore-popup + "Popup console for gitignore commands." + :man-page "gitignore" + :actions '((?l "ignore locally" magit-gitignore-locally) + (?g "ignore globally" magit-gitignore-globally)) + :max-action-columns 1) + +;;;###autoload +(defun magit-gitignore-globally (file-or-pattern) + "Instruct Git to globally ignore FILE-OR-PATTERN." + (interactive (list (magit-gitignore-read-pattern nil))) + (magit--gitignore file-or-pattern nil)) + +;;;###autoload +(defun magit-gitignore-locally (file-or-pattern) + "Instruct Git to locally ignore FILE-OR-PATTERN." + (interactive (list (magit-gitignore-read-pattern t))) + (magit--gitignore file-or-pattern t)) + +(defun magit--gitignore (file-or-pattern local) + (let ((gitignore + (if local + (magit-git-dir (convert-standard-filename "info/exclude")) + (expand-file-name ".gitignore" (magit-toplevel))))) + (make-directory (file-name-directory gitignore) t) + (with-temp-buffer + (when (file-exists-p gitignore) + (insert-file-contents gitignore)) + (goto-char (point-max)) + (unless (bolp) + (insert "\n")) + (insert (replace-regexp-in-string "\\(\\\\*\\)" "\\1\\1" file-or-pattern)) + (insert "\n") + (write-region nil nil gitignore)) + (if local + (magit-refresh) + (magit-run-git "add" ".gitignore")))) + +(defun magit-gitignore-read-pattern (local) + (let* ((default (magit-current-file)) + (choices + (delete-dups + (--mapcat + (cons (concat "/" it) + (when-let ((ext (file-name-extension it))) + (list (concat "/" (file-name-directory "foo") "*." ext) + (concat "*." ext)))) + (magit-untracked-files))))) + (when default + (setq default (concat "/" default)) + (unless (member default choices) + (setq default (concat "*." (file-name-extension default))) + (unless (member default choices) + (setq default nil)))) + (magit-completing-read (concat "File or pattern to ignore" + (and local " locally")) + choices nil nil nil nil default))) + +;;; _ +(provide 'magit-gitignore) +;;; magit-gitignore.el ends here diff --git a/elpa/magit-20180828.1055/magit-imenu.el b/elpa/magit-20181110.1820/magit-imenu.el similarity index 99% rename from elpa/magit-20180828.1055/magit-imenu.el rename to elpa/magit-20181110.1820/magit-imenu.el index 6434f9f3..52b7ed6b 100644 --- a/elpa/magit-20180828.1055/magit-imenu.el +++ b/elpa/magit-20181110.1820/magit-imenu.el @@ -33,7 +33,8 @@ ;;; Code: -(eval-when-compile (require 'subr-x)) +(eval-when-compile + (require 'subr-x)) (require 'magit) (require 'git-rebase) @@ -237,5 +238,6 @@ beginning of the line." (buffer-substring-no-properties (line-beginning-position) (line-end-position))) +;;; _ (provide 'magit-imenu) ;;; magit-imenu.el ends here diff --git a/elpa/magit-20180828.1055/magit-log.el b/elpa/magit-20181110.1820/magit-log.el similarity index 95% rename from elpa/magit-20180828.1055/magit-log.el rename to elpa/magit-20181110.1820/magit-log.el index 63e4f33f..cbaca5b9 100644 --- a/elpa/magit-20180828.1055/magit-log.el +++ b/elpa/magit-20181110.1820/magit-log.el @@ -52,6 +52,9 @@ (require 'crm) (require 'which-func) +(eval-when-compile + (require 'subr-x)) + (defvar bookmark-make-record-function) ;;; Options @@ -141,6 +144,13 @@ This is useful if you use really long branch names." (function-item magit-log-header-line-sentence) function)) +(defcustom magit-log-trace-definition-function 'which-function + "Function used to determine the function at point. +This is used by the command `magit-log-trace-definition'." + :package-version '(magit . "2.90.0") + :group 'magit-log + :type '(choice (function-item which-function) function)) + (defface magit-log-graph '((((class color) (background light)) :foreground "grey30") (((class color) (background dark)) :foreground "grey80")) @@ -175,7 +185,7 @@ This is useful if you use really long branch names." ;;;; Select Mode -(defcustom magit-log-select-arguments '("-n256" "--decorate") +(defcustom magit-log-select-arguments '("-n256" "--graph" "--decorate") "The log arguments used in `magit-log-select-mode' buffers." :package-version '(magit . "2.3.0") :group 'magit-log @@ -377,9 +387,9 @@ the upstream isn't ahead of the current branch) show." :actions ((?l "Log current" magit-log-current) (?L "Log local branches" magit-log-branches) (?r "Reflog current" magit-reflog-current) - (?o "Log other" magit-log) + (?o "Log other" magit-log-other) (?b "Log all branches" magit-log-all-branches) - (?O "Reflog other" magit-reflog) + (?O "Reflog other" magit-reflog-other) (?h "Log HEAD" magit-log-head) (?a "Log all references" magit-log-all) (?H "Reflog HEAD" magit-reflog-head)) @@ -439,11 +449,6 @@ the upstream isn't ahead of the current branch) show." (magit-define-popup-keys-deferred 'magit-log-mode-refresh-popup) (magit-define-popup-keys-deferred 'magit-log-refresh-popup) -(defun magit-read-file-trace (&rest _ignored) - (let ((file (magit-read-file-from-rev "HEAD" "File")) - (trace (magit-read-string "Trace"))) - (concat trace (or (match-string 2 trace) ":") file))) - (defun magit-log-select-order (&rest _ignored) "Set one `---order' option in Git log. This encompasses the options `--author-date-order', @@ -536,6 +541,11 @@ buffer." magit-log-section-arguments)))) (magit-invoke-popup 'magit-log-refresh-popup nil arg))) +(defun magit-read-file-trace (&rest _ignored) + (let ((file (magit-read-file-from-rev "HEAD" "File")) + (trace (magit-read-string "Trace"))) + (concat trace (or (match-string 2 trace) ":") file))) + ;;;; Refresh Commands (defun magit-log-refresh (args files) @@ -609,6 +619,11 @@ buffer." magit-log-read-revs-map) "[, ]" t)))) +(defun magit-git-log (revs args files) + (require 'magit) + (magit-mode-setup #'magit-log-mode revs args files) + (magit-log-goto-same-commit)) + ;;;###autoload (defun magit-log-current (revs &optional args files) "Show log for the current branch. @@ -616,10 +631,10 @@ When `HEAD' is detached or with a prefix argument show log for one or more revs read from the minibuffer." (interactive (cons (magit-log-read-revs t) (magit-log-arguments))) - (magit-log revs args files)) + (magit-git-log revs args files)) ;;;###autoload -(defun magit-log (revs &optional args files) +(defun magit-log-other (revs &optional args files) "Show log for one or more revs read from the minibuffer. The user can input any revision or revisions separated by a space, or even ranges, but only branches and tags, and a @@ -627,21 +642,19 @@ representation of the commit at point, are available as completion candidates." (interactive (cons (magit-log-read-revs) (magit-log-arguments))) - (require 'magit) - (magit-mode-setup #'magit-log-mode revs args files) - (magit-log-goto-same-commit)) + (magit-git-log revs args files)) ;;;###autoload (defun magit-log-head (&optional args files) "Show log for `HEAD'." (interactive (magit-log-arguments)) - (magit-log (list "HEAD") args files)) + (magit-git-log (list "HEAD") args files)) ;;;###autoload (defun magit-log-branches (&optional args files) "Show log for all local branches and `HEAD'." (interactive (magit-log-arguments)) - (magit-log (if (magit-get-current-branch) + (magit-git-log (if (magit-get-current-branch) (list "--branches") (list "HEAD" "--branches")) args files)) @@ -650,19 +663,19 @@ completion candidates." (defun magit-log-all-branches (&optional args files) "Show log for all local and remote branches and `HEAD'." (interactive (magit-log-arguments)) - (magit-log (if (magit-get-current-branch) - (list "--branches" "--remotes") - (list "HEAD" "--branches" "--remotes")) - args files)) + (magit-git-log (if (magit-get-current-branch) + (list "--branches" "--remotes") + (list "HEAD" "--branches" "--remotes")) + args files)) ;;;###autoload (defun magit-log-all (&optional args files) "Show log for all references and `HEAD'." (interactive (magit-log-arguments)) - (magit-log (if (magit-get-current-branch) - (list "--all") - (list "HEAD" "--all")) - args files)) + (magit-git-log (if (magit-get-current-branch) + (list "--all") + (list "HEAD" "--all")) + args files)) ;;;###autoload (defun magit-log-buffer-file (&optional follow beg end) @@ -712,7 +725,7 @@ active, restrict the log to the lines that the region touches." "Show log for the definition at point." (interactive (list (or (magit-file-relative-name) (user-error "Buffer isn't visiting a file")) - (which-function) + (funcall magit-log-trace-definition-function) (or magit-buffer-refname (magit-get-current-branch) "HEAD"))) @@ -740,24 +753,28 @@ active, restrict the log to the lines that the region touches." (goto-char pos) (call-interactively #'magit-log-trace-definition))))) +(defun magit-git-reflog (ref args) + (require 'magit) + (magit-mode-setup #'magit-reflog-mode ref args)) + ;;;###autoload -(defun magit-reflog-current () +(defun magit-reflog-current (args) "Display the reflog of the current branch." - (interactive) - (magit-reflog (magit-get-current-branch))) + (interactive (list magit-reflog-arguments)) + (magit-git-reflog (magit-get-current-branch) args)) ;;;###autoload -(defun magit-reflog (ref) - "Display the reflog of a branch." - (interactive (list (magit-read-local-branch-or-ref "Show reflog for"))) - (require 'magit) - (magit-mode-setup #'magit-reflog-mode ref magit-reflog-arguments)) +(defun magit-reflog-other (ref args) + "Display the reflog of a branch or another ref." + (interactive (list (magit-read-local-branch-or-ref "Show reflog for") + magit-reflog-arguments)) + (magit-git-reflog ref args)) ;;;###autoload -(defun magit-reflog-head () +(defun magit-reflog-head (args) "Display the `HEAD' reflog." - (interactive) - (magit-reflog "HEAD")) + (interactive (list magit-reflog-arguments)) + (magit-git-reflog "HEAD" args)) ;;;; Limit Commands @@ -818,13 +835,14 @@ is displayed in the current frame." "Move to the Nth parent of the current commit." (interactive "p") (when (derived-mode-p 'magit-log-mode) - (magit-section-when commit - (let ((parent-rev (format "%s^%s" (oref it value) (or n 1)))) + (when (magit-section-match 'commit) + (let* ((section (magit-current-section)) + (parent-rev (format "%s^%s" (oref section value) (or n 1)))) (if-let ((parent-hash (magit-rev-parse "--short" parent-rev))) - (if-let ((section (--first (equal (oref it value) - parent-hash) - (magit-section-siblings it 'next)))) - (magit-section-goto section) + (if-let ((parent (--first (equal (oref section value) + parent-hash) + (magit-section-siblings section 'next)))) + (magit-section-goto parent) (user-error (substitute-command-keys (concat "Parent " parent-hash " not found. Try typing " @@ -935,7 +953,11 @@ Do not add this to a hook variable." (remove "--literal-pathspecs" magit-git-global-arguments))) (magit-git-wash (apply-partially #'magit-log-wash-log 'log) "log" - (format "--format=%%h%s%%x00%s%%x00%%aN%%x00%%at%%x00%%s%s" + (format "--format=%s%%h%s%%x00%s%%x00%%aN%%x00%%at%%x00%%s%s" + (if (and (member "--left-right" args) + (not (member "--graph" args))) + "%m " + "") (if (member "--decorate" args) "%d" "") (if (member "--show-signature" args) (progn (setq args (remove "--show-signature" args)) "%G?") @@ -971,12 +993,14 @@ Do not add this to a hook variable." (defconst magit-log-heading-re (concat "^" - "\\(?4:[-_/|\\*o. ]*\\)" ; graph + "\\(?4:[-_/|\\*o<>. ]*\\)" ; graph "\\(?1:[0-9a-fA-F]+\\)" ; sha1 "\\(?3:[^\0\n]+)\\)?\0" ; refs "\\(?7:[BGUXYREN]\\)?\0" ; gpg "\\(?5:[^\0\n]*\\)\0" ; author - "\\(?6:[^\0\n]+\\)\0" ; date + ;; Note: Date is optional because, prior to Git v2.19.0, + ;; `git rebase -i --root` corrupts the root's author date. + "\\(?6:[^\0\n]*\\)\0" ; date "\\(?2:.*\\)$")) ; msg (defconst magit-log-cherry-re @@ -993,7 +1017,7 @@ Do not add this to a hook variable." (defconst magit-log-bisect-vis-re (concat "^" - "\\(?4:[-_/|\\*o. ]*\\)" ; graph + "\\(?4:[-_/|\\*o<>. ]*\\)" ; graph "\\(?1:[0-9a-fA-F]+\\)" ; sha1 "\\(?3:[^\0\n]+)\\)?\0" ; refs "\\(?2:.*\\)$")) ; msg @@ -1183,7 +1207,7 @@ Do not add this to a hook variable." ;; separator line. (save-excursion (forward-line -1) - (looking-at "[-_/|\\*o. ]*")) + (looking-at "[-_/|\\*o<>. ]*")) (setq graph (match-string 0)) (unless (string-match-p "[/\\]" graph) (insert graph ?\n)))))))) @@ -1230,7 +1254,7 @@ If there is no revision buffer in the same frame, then do nothing." (defun magit-log-maybe-update-revision-buffer-1 () (unless magit--update-revision-buffer - (when-let ((commit (magit-section-when 'commit)) + (when-let ((commit (magit-section-value-if 'commit)) (buffer (magit-mode-get-buffer 'magit-revision-mode nil t))) (setq magit--update-revision-buffer (list commit buffer)) (run-with-idle-timer @@ -1254,7 +1278,7 @@ If there is no blob buffer in the same frame, then do nothing." (defun magit-log-maybe-update-blob-buffer-1 () (unless magit--update-revision-buffer - (when-let ((commit (magit-section-when 'commit)) + (when-let ((commit (magit-section-value-if 'commit)) (buffer (--first (with-current-buffer it magit-buffer-revision) (mapcar #'window-buffer (window-list))))) (setq magit--update-blob-buffer (list commit buffer)) @@ -1344,17 +1368,19 @@ The shortstat style is experimental and rather slow." ""))) (defun magit-log-margin-width (style details details-width) - (+ (if details (1+ details-width) 0) - (if (stringp style) - (length (format-time-string style)) - (+ 2 ; two digits - 1 ; trailing space - (if (eq style 'age-abbreviated) - 1 ; single character - (+ 1 ; gap after digits - (apply #'max (--map (max (length (nth 1 it)) - (length (nth 2 it))) - magit--age-spec)))))))) + (if magit-log-margin-show-shortstat + 16 + (+ (if details (1+ details-width) 0) + (if (stringp style) + (length (format-time-string style)) + (+ 2 ; two digits + 1 ; trailing space + (if (eq style 'age-abbreviated) + 1 ; single character + (+ 1 ; gap after digits + (apply #'max (--map (max (length (nth 1 it)) + (length (nth 2 it))) + magit--age-spec))))))))) ;;; Select Mode @@ -1702,5 +1728,6 @@ all others with \"-\"." (magit-git-wash (apply-partially 'magit-log-wash-log 'cherry) "cherry" "-v" (magit-abbrev-arg) "@{upstream}")))) +;;; _ (provide 'magit-log) ;;; magit-log.el ends here diff --git a/elpa/magit-20180828.1055/magit-margin.el b/elpa/magit-20181110.1820/magit-margin.el similarity index 98% rename from elpa/magit-20180828.1055/magit-margin.el rename to elpa/magit-20181110.1820/magit-margin.el index a52c18f4..5aaa4f53 100644 --- a/elpa/magit-20180828.1055/magit-margin.el +++ b/elpa/magit-20181110.1820/magit-margin.el @@ -32,6 +32,9 @@ (require 'dash) +(eval-when-compile + (require 'subr-x)) + (require 'magit-section) (require 'magit-mode) @@ -146,9 +149,7 @@ does not carry to other options." (set-window-margins nil (car (window-margins)) (and (magit-buffer-margin-p) - (if (bound-and-true-p magit-log-margin-show-shortstat) - 16 ; kludge - (nth 2 magit-buffer-margin))))))) + (nth 2 magit-buffer-margin)))))) (defun magit-make-margin-overlay (&optional string previous-line) (if previous-line @@ -236,5 +237,6 @@ English.") date))) magit--age-spec))) +;;; _ (provide 'magit-margin) ;;; magit-margin.el ends here diff --git a/elpa/magit-20180828.1055/magit-merge.el b/elpa/magit-20181110.1820/magit-merge.el similarity index 95% rename from elpa/magit-20180828.1055/magit-merge.el rename to elpa/magit-20181110.1820/magit-merge.el index dc243418..eada3953 100644 --- a/elpa/magit-20180828.1055/magit-merge.el +++ b/elpa/magit-20181110.1820/magit-merge.el @@ -27,8 +27,13 @@ ;;; Code: +(eval-when-compile + (require 'subr-x)) + (require 'magit) +(declare-function magit-git-push "magit-push" (branch target args)) + ;;; Commands ;;;###autoload (autoload 'magit-merge-popup "magit" nil t) @@ -38,21 +43,21 @@ :switches '((?f "Fast-forward only" "--ff-only") (?n "No fast-forward" "--no-ff")) :options '((?s "Strategy" "--strategy=")) - :actions '((?m "Merge" magit-merge) + :actions '((?m "Merge" magit-merge-plain) (?p "Preview merge" magit-merge-preview) (?e "Merge and edit message" magit-merge-editmsg) nil (?n "Merge but don't commit" magit-merge-nocommit) (?s "Squash merge" magit-merge-squash) (?a "Absorb" magit-merge-absorb) (?i "Merge into" magit-merge-into)) - :sequence-actions '((?m "Commit merge" magit-commit) + :sequence-actions '((?m "Commit merge" magit-commit-create) (?a "Abort merge" magit-merge-abort)) :sequence-predicate 'magit-merge-in-progress-p :default-action 'magit-merge :max-action-columns 2) ;;;###autoload -(defun magit-merge (rev &optional args nocommit) +(defun magit-merge-plain (rev &optional args nocommit) "Merge commit REV into the current branch; using default message. Unless there are conflicts or a prefix argument is used create a @@ -107,9 +112,9 @@ branch, then also remove the respective remote branch." (list (magit-read-other-local-branch (format "Merge `%s' into" (magit-get-current-branch)) nil - (when-let* ((upstream (magit-get-upstream-branch)) - (upstream (cdr (magit-split-branch-name upstream)))) - (and (magit-branch-p upstream) upstream))) + (when-let ((upstream (magit-get-upstream-branch))) + (when-let ((upstream (cdr (magit-split-branch-name upstream)))) + (and (magit-branch-p upstream) upstream)))) (magit-merge-arguments))) (let ((current (magit-get-current-branch))) (when (zerop (magit-call-git "checkout" branch)) @@ -275,5 +280,6 @@ If no merge is in progress, do nothing." (push "--decorate=full" args)) args)))))) +;;; _ (provide 'magit-merge) ;;; magit-merge.el ends here diff --git a/elpa/magit-20180828.1055/magit-mode.el b/elpa/magit-20181110.1820/magit-mode.el similarity index 96% rename from elpa/magit-20180828.1055/magit-mode.el rename to elpa/magit-20181110.1820/magit-mode.el index 7f483e42..736e59ae 100644 --- a/elpa/magit-20180828.1055/magit-mode.el +++ b/elpa/magit-20181110.1820/magit-mode.el @@ -32,19 +32,27 @@ (require 'cl-lib) (require 'dash) +(eval-when-compile + (require 'subr-x)) + (require 'magit-section) (require 'magit-git) -(require 'magit-popup) ;; For `magit-display-buffer-fullcolumn-most-v1' from `git-commit' (defvar git-commit-mode) ;; For `magit-xref-insert-buttons' from `magit' (defvar magit-diff-show-xref-buttons) (defvar magit-revision-show-xref-buttons) +;; For `magit-refresh' +(defvar magit-post-commit-hook-commands) +(defvar magit-post-stage-hook-commands) +(defvar magit-post-unstage-hook-commands) ;; For `magit-refresh' and `magit-refresh-all' (declare-function magit-auto-revert-buffers "magit-autorevert" ()) ;; For `magit-refresh-buffer' (declare-function magit-process-unset-mode-line-error-status "magit-process" ()) +;; For `magit-mode-setup-internal' +(declare-function magit-status-goto-initial-section "magit-status" ()) (require 'format-spec) (require 'help-mode) @@ -250,12 +258,11 @@ then fall back to regular region highlighting." :type 'hook :options '(magit-section-update-region magit-diff-update-hunk-region)) -(defcustom magit-create-buffer-hook '(magit-status-goto-commits) +(defcustom magit-create-buffer-hook nil "Normal hook run after creating a new `magit-mode' buffer." :package-version '(magit . "2.90.0") :group 'magit-refresh - :type 'hook - :options '(magit-status-goto-commits)) + :type 'hook) (defcustom magit-refresh-buffer-hook nil "Normal hook for `magit-refresh-buffer' to run after refreshing." @@ -385,7 +392,7 @@ starts complicating other things, then it will be removed." (define-key map (kbd "P") 'magit-push-popup) (define-key map (kbd "k") 'magit-delete-thing) (define-key map (kbd "K") 'magit-file-untrack) - (define-key map (kbd "i") 'magit-gitignore) + (define-key map (kbd "i") 'magit-gitignore-popup) (define-key map (kbd "I") 'magit-gitignore-popup))) (define-key map (kbd "SPC") 'magit-diff-show-or-scroll-up) (define-key map (kbd "DEL") 'magit-diff-show-or-scroll-down) @@ -436,7 +443,7 @@ starts complicating other things, then it will be removed." (define-key map "V" 'magit-revert-popup) (define-key map "w" 'magit-am-popup) (define-key map "W" 'magit-patch-popup) - (define-key map "x" 'magit-reset) + (define-key map "x" 'magit-reset-quickly) (define-key map "X" 'magit-reset-popup) (define-key map "y" 'magit-show-refs-popup) (define-key map "Y" 'magit-cherry) @@ -451,8 +458,10 @@ starts complicating other things, then it will be removed." (define-key map (kbd "C-x 4 a") 'magit-add-change-log-entry-other-window) (define-key map (kbd "C-w") 'magit-copy-section-value) (define-key map (kbd "M-w") 'magit-copy-buffer-revision) + (define-key map [remap previous-line] 'magit-previous-line) + (define-key map [remap next-line] 'magit-next-line) (define-key map [remap evil-previous-line] 'evil-previous-visual-line) - (define-key map [remap evil-next-line] 'evil-next-visual-line) + (define-key map [remap evil-next-line] 'evil-next-visual-line) map) "Parent keymap for all keymaps of modes derived from `magit-mode'.") @@ -481,7 +490,7 @@ which lets you edit the thing at point, likely in another buffer." (if (eq magit-current-popup 'magit-dispatch-popup) (progn (setq magit-current-popup nil) (call-interactively (key-binding (this-command-keys)))) - (user-error "There is no thing at point that could be visited"))) + (user-error "There is no thing at point that could be edited"))) (defun magit-browse-thing () "This is a placeholder command. @@ -502,24 +511,24 @@ which visits the thing at point using `browse-url'." ["Reset index" magit-reset-index t] ["Commit" magit-commit-popup t] ["Add log entry" magit-commit-add-log t] - ["Tag" magit-tag t] + ["Tag" magit-tag-create t] "---" ["Diff working tree" magit-diff-working-tree t] ["Diff" magit-diff t] ("Log" - ["Log" magit-log t] - ["Reflog" magit-reflog t] + ["Log" magit-log-other t] + ["Reflog" magit-reflog-other t] ["Extended..." magit-log-popup t]) "---" ["Cherry pick" magit-cherry-pick t] ["Revert commit" magit-revert-popup t] "---" - ["Ignore" magit-gitignore t] + ["Ignore globally" magit-gitignore-globally t] ["Ignore locally" magit-gitignore-locally t] ["Discard" magit-discard t] - ["Reset head" magit-reset-head t] - ["Stash" magit-stash t] - ["Snapshot" magit-snapshot t] + ["Reset head and index" magit-reset-mixed t] + ["Stash" magit-stash-both t] + ["Snapshot" magit-snapshot-both t] "---" ["Branch..." magit-checkout t] ["Merge" magit-merge t] @@ -527,7 +536,7 @@ which visits the thing at point using `browse-url'." ["Rebase..." magit-rebase-popup t] "---" ["Push" magit-push t] - ["Pull" magit-pull t] + ["Pull" magit-pull-branch t] ["Remote update" magit-fetch-all t] ("Submodule" ["Submodule update" magit-submodule-update t] @@ -565,6 +574,7 @@ Magit is documented in info node `(magit)'." (add-hook 'deactivate-mark-hook #'magit-section-update-highlight t t) (setq-local redisplay-highlight-region-function 'magit-highlight-region) (setq-local redisplay-unhighlight-region-function 'magit-unhighlight-region) + (setq mode-line-process (magit-repository-local-get 'mode-line-process)) (when (bound-and-true-p global-linum-mode) (linum-mode -1)) (when (and (fboundp 'nlinum-mode) @@ -626,6 +636,7 @@ locked to its value, which is derived from MODE and ARGS." (setq magit-refresh-args args) (funcall mode) (when created + (magit-status-goto-initial-section) (run-hooks 'magit-create-buffer-hook))) (magit-display-buffer buffer) (with-current-buffer buffer @@ -648,9 +659,11 @@ and `magit-post-display-buffer-hook'." (run-hooks 'magit-pre-display-buffer-hook)) (let ((window (funcall magit-display-buffer-function buffer))) (unless magit-display-buffer-noselect - (select-frame-set-input-focus - (window-frame - (select-window window))))) + (let* ((old-frame (selected-frame)) + (new-frame (window-frame window))) + (select-window window) + (unless (eq old-frame new-frame) + (select-frame-set-input-focus new-frame))))) (with-current-buffer buffer (run-hooks 'magit-post-display-buffer-hook))) @@ -1008,6 +1021,14 @@ Run hooks `magit-pre-refresh-hook' and `magit-post-refresh-hook'." (with-current-buffer it (magit-refresh-buffer))) (magit-auto-revert-buffers) + (cond + ((and (not this-command) + (memq last-command magit-post-commit-hook-commands)) + (magit-run-hook-with-benchmark 'magit-post-commit-hook)) + ((memq this-command magit-post-stage-hook-commands) + (magit-run-hook-with-benchmark 'magit-post-stage-hook)) + ((memq this-command magit-post-unstage-hook-commands) + (magit-run-hook-with-benchmark 'magit-post-unstage-hook))) (magit-run-hook-with-benchmark 'magit-post-refresh-hook) (when magit-refresh-verbose (message "Refreshing magit...done (%.3fs, cached %s/%s)" @@ -1353,7 +1374,7 @@ Unless specified, REPOSITORY is the current buffer's repository." (defun magit-zap-caches () "Zap caches for the current repository. -Remove the repository's entry from `magit-repository-cache' +Remove the repository's entry from `magit-repository-local-cache' and set `magit-section-visibility-cache' to nil in all of the repository's Magit buffers." (interactive) @@ -1378,5 +1399,6 @@ repository's Magit buffers." (float-time (time-subtract (current-time) start)))) (run-hooks hook)))) +;;; _ (provide 'magit-mode) ;;; magit-mode.el ends here diff --git a/elpa/magit-20180828.1055/magit-notes.el b/elpa/magit-20181110.1820/magit-notes.el similarity index 99% rename from elpa/magit-20180828.1055/magit-notes.el rename to elpa/magit-20181110.1820/magit-notes.el index 79b2fa53..e4806a23 100644 --- a/elpa/magit-20180828.1055/magit-notes.el +++ b/elpa/magit-20181110.1820/magit-notes.el @@ -197,5 +197,6 @@ Also see `magit-notes-merge'." (magit-notes-arguments)) (match-string 1 it)))) +;;; _ (provide 'magit-notes) ;;; magit-notes.el ends here diff --git a/elpa/magit-20181110.1820/magit-obsolete.el b/elpa/magit-20181110.1820/magit-obsolete.el new file mode 100644 index 00000000..67a3d1ce --- /dev/null +++ b/elpa/magit-20181110.1820/magit-obsolete.el @@ -0,0 +1,55 @@ +;;; magit-obsolete.el --- obsolete definitions -*- lexical-binding: t -*- + +;; Copyright (C) 2010-2018 The Magit Project Contributors +;; +;; You should have received a copy of the AUTHORS.md file which +;; lists all contributors. If not, see http://magit.vc/authors. + +;; Author: Jonas Bernoulli +;; Maintainer: Jonas Bernoulli + +;; Magit is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. +;; +;; Magit is distributed in the hope that it will be useful, but WITHOUT +;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +;; License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with Magit. If not, see http://www.gnu.org/licenses. + +;;; Commentary: + +;; This library defines aliases for obsolete variables and functions. + +;;; Code: + +(require 'magit) + +;;; Obsolete since v2.90.0 + +(define-obsolete-function-alias 'magit-reset-head 'magit-reset-mixed "Magit 2.90.0") +(define-obsolete-function-alias 'magit-gitignore 'magit-gitignore-globally "Magit 2.90.0") +(define-obsolete-function-alias 'magit-branch 'magit-branch-create "Magit 2.90.0") +(define-obsolete-function-alias 'magit-tag 'magit-tag-create "Magit 2.90.0") +(define-obsolete-function-alias 'magit-fetch 'magit-fetch-other "Magit 2.90.0") +(define-obsolete-function-alias 'magit-pull 'magit-pull-branch "Magit 2.90.0") +(define-obsolete-function-alias 'magit-rebase 'magit-rebase-branch "Magit 2.90.0") +(define-obsolete-function-alias 'magit-blame 'magit-blame-addition "Magit 2.90.0") +(define-obsolete-function-alias 'magit-revert 'magit-revert-and-commit "Magit 2.90.0") +(define-obsolete-function-alias 'magit-reset 'magit-reset-quickly "Magit 2.90.0") +(define-obsolete-function-alias 'magit-merge 'magit-merge-plain "Magit 2.90.0") +(define-obsolete-function-alias 'magit-stash 'magit-stash-both "Magit 2.90.0") +(define-obsolete-function-alias 'magit-snapshot 'magit-snapshot-both "Magit 2.90.0") +(define-obsolete-function-alias 'magit-push 'magit-push-other "Magit 2.90.0") +(define-obsolete-function-alias 'magit-commit 'magit-commit-create "Magit 2.90.0") +(define-obsolete-function-alias 'magit-log 'magit-log-other "Magit 2.90.0") +(define-obsolete-function-alias 'magit-reflog 'magit-reflog-other "Magit 2.90.0") +(define-obsolete-function-alias 'magit-diff 'magit-diff-range "Magit 2.90.0") + +;;; _ +(provide 'magit-obsolete) +;;; magit-obsolete.el ends here diff --git a/elpa/magit-20181110.1820/magit-patch.el b/elpa/magit-20181110.1820/magit-patch.el new file mode 100644 index 00000000..e42b44a6 --- /dev/null +++ b/elpa/magit-20181110.1820/magit-patch.el @@ -0,0 +1,188 @@ +;;; magit-patch.el --- creating and applying patches -*- lexical-binding: t -*- + +;; Copyright (C) 2008-2018 The Magit Project Contributors +;; +;; You should have received a copy of the AUTHORS.md file which +;; lists all contributors. If not, see http://magit.vc/authors. + +;; Author: Jonas Bernoulli +;; Maintainer: Jonas Bernoulli + +;; Magit is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. +;; +;; Magit is distributed in the hope that it will be useful, but WITHOUT +;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +;; License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with Magit. If not, see http://www.gnu.org/licenses. + +;;; Commentary: + +;; This library implements patch commands. + +;;; Code: + +(eval-when-compile + (require 'subr-x)) + +(require 'magit) + +;;; Options + +(defcustom magit-patch-save-arguments '(exclude "--stat") + "Arguments used by `magit-patch-save-arguments' (which see)" + :package-version '(magit . "2.12.0") + :group 'magit-diff + :type '(choice (const :tag "use buffer arguments" buffer) + (cons :tag "use buffer arguments except" + (const :format "" exclude) + (repeat :format "%v%i\n" + (string :tag "Argument"))) + (repeat :tag "use constant arguments" + (string :tag "Argument")))) + +;;; Commands + +;;;###autoload (autoload 'magit-patch-popup "magit-patch" nil t) +(magit-define-popup magit-patch-popup + "Popup console for patch commands." + :man-page "git-format-patch" + :switches '("Switches for formatting patches" + (?l "Add cover letter" "--cover-letter")) + :options '("Options for formatting patches" + (?f "From" "--from=") + (?t "To" "--to=") + (?c "CC" "--cc=") + (?r "In reply to" "--in-reply-to=") + (?P "Subject Prefix" "--subject-prefix=") + (?v "Reroll count" "--reroll-count=") + (?s "Thread style" "--thread=") + (?U "Context lines" "-U") + (?M "Detect renames" "-M") + (?C "Detect copies" "-C") + (?A "Diff algorithm" "--diff-algorithm=" + magit-diff-select-algorithm) + (?o "Output directory" "--output-directory=") + (?F "Limit to files" "-- " magit-read-files)) + :actions '((?p "Format patches" magit-format-patch) + (?r "Request pull" magit-request-pull)) + :default-action 'magit-format-patch) + +;;;###autoload +(defun magit-format-patch (range args files) + "Create patches for the commits in RANGE. +When a single commit is given for RANGE, create a patch for the +changes introduced by that commit (unlike 'git format-patch' +which creates patches for all commits that are reachable from +`HEAD' but not from the specified commit)." + (interactive + (cons (if-let ((revs (magit-region-values 'commit t))) + (concat (car (last revs)) "^.." (car revs)) + (let ((range (magit-read-range-or-commit + "Format range or commit"))) + (if (string-match-p "\\.\\." range) + range + (format "%s~..%s" range range)))) + (magit-popup-export-file-args (magit-patch-arguments)))) + (magit-run-git "format-patch" range args "--" files) + (when (member "--cover-letter" args) + (find-file + (expand-file-name + "0000-cover-letter.patch" + (let ((topdir (magit-toplevel))) + (or (--some (and (string-match "--output-directory=\\(.+\\)" it) + (expand-file-name (match-string 1 it) topdir)) + args) + topdir)))))) + +;;;###autoload +(defun magit-request-pull (url start end) + "Request upstream to pull from you public repository. + +URL is the url of your publically accessible repository. +START is a commit that already is in the upstream repository. +END is the last commit, usually a branch name, which upstream +is asked to pull. START has to be reachable from that commit." + (interactive + (list (magit-get "remote" (magit-read-remote "Remote") "url") + (magit-read-branch-or-commit "Start" (magit-get-upstream-branch)) + (magit-read-branch-or-commit "End"))) + (let ((dir default-directory)) + ;; mu4e changes default-directory + (compose-mail) + (setq default-directory dir)) + (message-goto-body) + (magit-git-insert "request-pull" start url end) + (set-buffer-modified-p nil)) + +;;;###autoload (autoload 'magit-patch-apply-popup "magit-patch" nil t) +(magit-define-popup magit-patch-apply-popup + "Popup console for applying a patch file." + :man-page "git-apply" + :switches '((?i "Also apply to index" "--index") + (?c "Only apply to index" "--cached") + (?3 "Fall back on 3way merge" "--3way")) + :actions '((?a "Apply patch" magit-patch-apply)) + :default-action 'magit-patch-apply) + +;;;###autoload +(defun magit-patch-apply (file &rest args) + "Apply the patch file FILE." + (interactive (list (expand-file-name + (read-file-name "Apply patch: " + default-directory nil nil + (--when-let (magit-file-at-point) + (file-relative-name it)))) + (magit-patch-apply-arguments))) + (magit-run-git "apply" args "--" (magit-convert-filename-for-git file))) + +;;;###autoload +(defun magit-patch-save (file &optional arg) + "Write current diff into patch FILE. + +What arguments are used to create the patch depends on the value +of `magit-patch-save-arguments' and whether a prefix argument is +used. + +If the value is the symbol `buffer', then use the same arguments +as the buffer. With a prefix argument use no arguments. + +If the value is a list beginning with the symbol `exclude', then +use the same arguments as the buffer except for those matched by +entries in the cdr of the list. The comparison is done using +`string-prefix-p'. With a prefix argument use the same arguments +as the buffer. + +If the value is a list of strings (including the empty list), +then use those arguments. With a prefix argument use the same +arguments as the buffer. + +Of course the arguments that are required to actually show the +same differences as those shown in the buffer are always used." + (interactive (list (read-file-name "Write patch file: " default-directory) + current-prefix-arg)) + (unless (derived-mode-p 'magit-diff-mode) + (user-error "Only diff buffers can be saved as patches")) + (pcase-let ((`(,rev ,const ,args ,files) magit-refresh-args)) + (when (derived-mode-p 'magit-revision-mode) + (setq rev (format "%s~..%s" rev rev))) + (cond ((eq magit-patch-save-arguments 'buffer) + (when arg + (setq args nil))) + ((eq (car-safe magit-patch-save-arguments) 'exclude) + (unless arg + (setq args (-difference args (cdr magit-patch-save-arguments))))) + ((not arg) + (setq args magit-patch-save-arguments))) + (with-temp-file file + (magit-git-insert "diff" rev "-p" const args "--" files))) + (magit-refresh)) + +;;; _ +(provide 'magit-patch) +;;; magit-patch.el ends here diff --git a/elpa/magit-20181110.1820/magit-pkg.el b/elpa/magit-20181110.1820/magit-pkg.el new file mode 100644 index 00000000..905fb4d6 --- /dev/null +++ b/elpa/magit-20181110.1820/magit-pkg.el @@ -0,0 +1,11 @@ +(define-package "magit" "20181110.1820" "A Git porcelain inside Emacs." + '((emacs "25.1") + (async "20180527") + (dash "20180910") + (ghub "20181107") + (git-commit "20181104") + (magit-popup "20181003") + (with-editor "20181103"))) +;; Local Variables: +;; no-byte-compile: t +;; End: diff --git a/elpa/magit-20180828.1055/magit-process.el b/elpa/magit-20181110.1820/magit-process.el similarity index 97% rename from elpa/magit-20180828.1055/magit-process.el rename to elpa/magit-20181110.1820/magit-process.el index 5daa0c28..6378ffc1 100644 --- a/elpa/magit-20180828.1055/magit-process.el +++ b/elpa/magit-20181110.1820/magit-process.el @@ -35,6 +35,9 @@ (require 'cl-lib) (require 'dash) +(eval-when-compile + (require 'subr-x)) + (require 'with-editor) (require 'magit-utils) (require 'magit-section) @@ -155,8 +158,8 @@ itself from the hook, to avoid further futile attempts." (defcustom magit-process-password-prompt-regexps '("^\\(Enter \\)?[Pp]assphrase\\( for \\(RSA \\)?key '.*'\\)?: ?$" - ;; match-group 99 is used to identify a host - "^\\(Enter \\)?[Pp]assword\\( for '\\(?99:.*\\)'\\)?: ?$" + ;; Match-group 99 is used to identify the "user@host" part. + "^\\(Enter \\)?[Pp]assword\\( for '\\(https?://\\)?\\(?99:.*\\)'\\)?: ?$" "^.*'s password: ?$" "^Yubikey for .*: ?$" "^Enter PIN for .*: ?$") @@ -282,12 +285,11 @@ optional NODISPLAY is non-nil also display it." (defun magit-process-kill () "Kill the process at point." (interactive) - (magit-section-when process - (let ((process (oref it value))) - (unless (eq (process-status process) 'run) - (user-error "Process isn't running")) - (magit-confirm 'kill-process) - (kill-process process)))) + (when-let ((process (magit-section-value-if 'process))) + (unless (eq (process-status process) 'run) + (user-error "Process isn't running")) + (magit-confirm 'kill-process) + (kill-process process))) ;;; Synchronous Processes @@ -394,7 +396,6 @@ Option `magit-git-executable' specifies the Git executable and option `magit-git-global-arguments' specifies constant arguments. The remaining arguments ARGS specify arguments to Git, they are flattened before use." - (declare (indent 1)) (when (eq system-type 'windows-nt) ;; On w32, git expects UTF-8 encoded input, ignore any user ;; configuration telling us otherwise (see #3250). @@ -748,19 +749,18 @@ which matches the ~/.authinfo.gpg entry machine bitbucket.org login tarsius password 12345 or iff that is undefined, for backward compatibility machine tarsius@bitbucket.org password 12345" - (message "key: %S" key) (require 'auth-source) - (let ((secret - (plist-get - (car (or (and (string-match "\\([^@]+\\)@\\([^@]+\\)" key) - (auth-source-search :max 1 - :host (match-string 2 key) - :login (match-string 1 key))) - (auth-source-search :max 1 :host key))) - :secret))) - (if (functionp secret) - (funcall secret) - secret))) + (and (string-match "\\`\\([^@]+\\)@\\([^@]+\\)\\'" key) + (let* ((user (match-string 1 key)) + (host (match-string 2 key)) + (secret + (plist-get + (car (or (auth-source-search :max 1 :host host :user user) + (auth-source-search :max 1 :host key))) + :secret))) + (if (functionp secret) + (funcall secret) + secret)))) (defun magit-process-password-prompt (process string) "Find a password based on prompt STRING and send it to git. @@ -769,14 +769,14 @@ prompt. If and only if one is found, then call functions in `magit-process-find-password-functions' until one of them returns the password. If all function return nil, then read the password from the user." - (--when-let (magit-process-match-prompt - magit-process-password-prompt-regexps string) + (when-let ((prompt (magit-process-match-prompt + magit-process-password-prompt-regexps string))) (process-send-string process (magit-process-kill-on-abort process - (concat (or (--when-let (match-string 99 string) + (concat (or (when-let ((key (match-string 99 string))) (run-hook-with-args-until-success - 'magit-process-find-password-functions it)) - (read-passwd it)) + 'magit-process-find-password-functions key)) + (read-passwd prompt)) "\n"))))) (defun magit-process-username-prompt (process string) @@ -1117,5 +1117,6 @@ Limited by `magit-process-error-tooltip-max-lines'." (setq lines (cons heading lines))) (message (mapconcat #'identity lines "\n")))))) +;;; _ (provide 'magit-process) ;;; magit-process.el ends here diff --git a/elpa/magit-20181110.1820/magit-pull.el b/elpa/magit-20181110.1820/magit-pull.el new file mode 100644 index 00000000..67abe436 --- /dev/null +++ b/elpa/magit-20181110.1820/magit-pull.el @@ -0,0 +1,151 @@ +;;; magit-pull.el --- update local objects and refs -*- lexical-binding: t -*- + +;; Copyright (C) 2008-2018 The Magit Project Contributors +;; +;; You should have received a copy of the AUTHORS.md file which +;; lists all contributors. If not, see http://magit.vc/authors. + +;; Author: Jonas Bernoulli +;; Maintainer: Jonas Bernoulli + +;; Magit is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. +;; +;; Magit is distributed in the hope that it will be useful, but WITHOUT +;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +;; License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with Magit. If not, see http://www.gnu.org/licenses. + +;;; Commentary: + +;; This library implements pull commands. + +;;; Code: + +(require 'magit) + +;;; Commands + +;;;###autoload (autoload 'magit-pull-popup "magit-pull" nil t) +(magit-define-popup magit-pull-popup + "Popup console for pull commands." + :man-page "git-pull" + :variables '("Configure" + (?r "branch.%s.rebase" + magit-cycle-branch*rebase + magit-pull-format-branch*rebase) + (?C "variables..." magit-branch-config-popup)) + :actions '((lambda () + (--if-let (magit-get-current-branch) + (concat + (propertize "Pull into " 'face 'magit-popup-heading) + (propertize it 'face 'magit-branch-local) + (propertize " from" 'face 'magit-popup-heading)) + (propertize "Pull from" 'face 'magit-popup-heading))) + (?p magit-get-push-branch magit-pull-from-pushremote) + (?u magit-get-upstream-branch magit-pull-from-upstream) + (?e "elsewhere" magit-pull-branch)) + :default-action 'magit-pull + :max-action-columns 1) + +;;;###autoload (autoload 'magit-pull-and-fetch-popup "magit-pull" nil t) +(magit-define-popup magit-pull-and-fetch-popup + "Popup console for pull and fetch commands. + +This popup is intended as a replacement for the separate popups +`magit-pull-popup' and `magit-fetch-popup'. To use it, add this +to your init file: + + (with-eval-after-load \\='magit-remote + (define-key magit-mode-map \"f\" \\='magit-pull-and-fetch-popup) + (define-key magit-mode-map \"F\" nil)) + +The combined popup does not offer all commands and arguments +available from the individual popups. Instead of the argument +`--prune' and the command `magit-fetch-all' it uses two commands +`magit-fetch-prune' and `magit-fetch-no-prune'. And the commands +`magit-fetch-from-pushremote' and `magit-fetch-from-upstream' are +missing. To add them use something like: + + (with-eval-after-load \\='magit-remote + (magit-define-popup-action \\='magit-pull-and-fetch-popup ?U + \\='magit-get-upstream-branch + \\='magit-fetch-from-upstream-remote ?F) + (magit-define-popup-action \\='magit-pull-and-fetch-popup ?P + \\='magit-get-push-branch + \\='magit-fetch-from-push-remote ?F))" + :man-page "git-pull" + :variables '("Configure" + (?r "branch.%s.rebase" + magit-cycle-branch*rebase + magit-pull-format-branch*rebase) + (?C "variables..." magit-branch-config-popup)) + :actions '((lambda () + (--if-let (magit-get-current-branch) + (concat + (propertize "Pull into " 'face 'magit-popup-heading) + (propertize it 'face 'magit-branch-local) + (propertize " from" 'face 'magit-popup-heading)) + (propertize "Pull from" 'face 'magit-popup-heading))) + (?p magit-get-push-branch magit-pull-from-pushremote) + (?u magit-get-upstream-branch magit-pull-from-upstream) + (?e "elsewhere" magit-pull-branch) + "Fetch from" + (?f "remotes" magit-fetch-all-no-prune) + (?F "remotes and prune" magit-fetch-all-prune) + "Fetch" + (?o "another branch" magit-fetch-branch) + (?s "explicit refspec" magit-fetch-refspec) + (?m "submodules" magit-fetch-modules)) + :default-action 'magit-fetch + :max-action-columns 1) + +(defun magit-pull-format-branch*rebase () + (magit--format-popup-variable:choices + (format "branch.%s.rebase" (or (magit-get-current-branch) "")) + '("true" "false") + "false" "pull.rebase")) + +(defun magit-git-pull (source args) + (run-hooks 'magit-credential-hook) + (pcase-let ((`(,remote . ,branch) + (magit-split-branch-name source))) + (magit-run-git-with-editor "pull" args remote branch))) + +;;;###autoload +(defun magit-pull-from-pushremote (args) + "Pull from the push-remote of the current branch." + (interactive (list (magit-pull-arguments))) + (--if-let (magit-get-push-branch) + (magit-git-pull it args) + (--if-let (magit-get-current-branch) + (user-error "No push-remote is configured for %s" it) + (user-error "No branch is checked out")))) + +;;;###autoload +(defun magit-pull-from-upstream (args) + "Pull from the upstream of the current branch." + (interactive (list (magit-pull-arguments))) + (--if-let (magit-get-upstream-branch) + (progn (run-hooks 'magit-credential-hook) + (magit-run-git-with-editor + "pull" args (car (magit-split-branch-name it)))) + (--if-let (magit-get-current-branch) + (user-error "No upstream is configured for %s" it) + (user-error "No branch is checked out")))) + +;;;###autoload +(defun magit-pull-branch (source args) + "Pull from a branch read in the minibuffer." + (interactive (list (magit-read-remote-branch "Pull" nil nil nil t) + (magit-pull-arguments))) + (magit-git-pull source args)) + +;;; _ +(provide 'magit-pull) +;;; magit-pull.el ends here diff --git a/elpa/magit-20181110.1820/magit-push.el b/elpa/magit-20181110.1820/magit-push.el new file mode 100644 index 00000000..f6e04282 --- /dev/null +++ b/elpa/magit-20181110.1820/magit-push.el @@ -0,0 +1,345 @@ +;;; magit-push.el --- update remote objects and refs -*- lexical-binding: t -*- + +;; Copyright (C) 2008-2018 The Magit Project Contributors +;; +;; You should have received a copy of the AUTHORS.md file which +;; lists all contributors. If not, see http://magit.vc/authors. + +;; Author: Jonas Bernoulli +;; Maintainer: Jonas Bernoulli + +;; Magit is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. +;; +;; Magit is distributed in the hope that it will be useful, but WITHOUT +;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +;; License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with Magit. If not, see http://www.gnu.org/licenses. + +;;; Commentary: + +;; This library implements push commands. + +;;; Code: + +(eval-when-compile + (require 'subr-x)) + +(require 'magit) + +;;; Options + +(defcustom magit-push-current-set-remote-if-missing t + "Whether to configure missing remotes before pushing. + +When nil, then the command `magit-push-current-to-pushremote' and +`magit-push-current-to-upstream' do not appear in the push popup +if the push-remote resp. upstream is not configured. If the user +invokes one of these commands anyway, then it raises an error. + +When non-nil, then these commands always appear in the push +popup. But if the required configuration is missing, then they +do appear in a way that indicates that this is the case. If the +user invokes one of them, then it asks for the necessary +configuration, stores the configuration, and then uses it to push +a first time. + +This option also affects whether the argument `--set-upstream' is +available in the popup. If the value is t, then that argument is +redundant. But note that changing the value of this option does +not take affect immediately, the argument will only be added or +removed after restarting Emacs." + :package-version '(magit . "2.6.0") + :group 'magit-commands + :type '(choice (const :tag "don't set" nil) + (const :tag "set branch..pushRemote" t) + (const :tag "set remote.pushDefault" default))) + +;;; Commands + +;;;###autoload (autoload 'magit-push-popup "magit-push" nil t) +(magit-define-popup magit-push-popup + "Popup console for push commands." + :man-page "git-push" + :switches `((?f "Force with lease" "--force-with-lease") + (?F "Force" "--force") + (?h "Disable hooks" "--no-verify") + (?d "Dry run" "--dry-run") + ,@(and (not magit-push-current-set-remote-if-missing) + '((?u "Set upstream" "--set-upstream")))) + :actions '("Configure" + (?C "variables..." magit-branch-config-popup) + (lambda () + (--when-let (magit-get-current-branch) + (concat (propertize "Push " 'face 'magit-popup-heading) + (propertize it 'face 'magit-branch-local) + (propertize " to" 'face 'magit-popup-heading)))) + (?p magit--push-current-to-pushremote-desc + magit-push-current-to-pushremote) + (?u magit--push-current-to-upstream-desc + magit-push-current-to-upstream) + (?e "elsewhere\n" magit-push-current) + "Push" + (?o "another branch" magit-push-other) + (?T "a tag" magit-push-tag) + (?r "explicit refspecs" magit-push-refspecs) + (?t "all tags" magit-push-tags) + (?m "matching branches" magit-push-matching)) + :max-action-columns 2) + +(defun magit-git-push (branch target args) + (run-hooks 'magit-credential-hook) + (pcase-let ((`(,remote . ,target) + (magit-split-branch-name target))) + (magit-run-git-async "push" "-v" args remote + (format "%s:refs/heads/%s" branch target)))) + +;;;###autoload +(defun magit-push-current-to-pushremote (args &optional push-remote) + "Push the current branch to `branch..pushRemote'. +If that variable is unset, then push to `remote.pushDefault'. + +When `magit-push-current-set-remote-if-missing' is non-nil and +the push-remote is not configured, then read the push-remote from +the user, set it, and then push to it. With a prefix argument +the push-remote can be changed before pushed to it." + (interactive + (list (magit-push-arguments) + (and (magit--push-current-set-pushremote-p current-prefix-arg) + (magit-read-remote + (if (eq magit-push-current-set-remote-if-missing 'default) + "Set `remote.pushDefault' and push there" + (format "Set `branch.%s.pushRemote' and push there" + (magit-get-current-branch))))))) + (--if-let (magit-get-current-branch) + (progn (when push-remote + (setf (magit-get + (if (eq magit-push-current-set-remote-if-missing 'default) + "remote.pushDefault" + (format "branch.%s.pushRemote" it))) + push-remote)) + (if-let ((remote (magit-get-push-remote it))) + (if (member remote (magit-list-remotes)) + (magit-git-push it (concat remote "/" it) args) + (user-error "Remote `%s' doesn't exist" remote)) + (user-error "No push-remote is configured for %s" it))) + (user-error "No branch is checked out"))) + +(defun magit--push-current-set-pushremote-p (&optional change) + (and (or change + (and magit-push-current-set-remote-if-missing + (not (magit-get-push-remote)))) + (magit-get-current-branch))) + +(defun magit--push-current-to-pushremote-desc () + (--if-let (magit-get-push-branch) + (concat (magit-branch-set-face it) "\n") + (and (magit--push-current-set-pushremote-p) + (concat + (propertize (if (eq magit-push-current-set-remote-if-missing 'default) + "pushDefault" + "pushRemote") + 'face 'bold) + ", after setting that\n")))) + +;;;###autoload +(defun magit-push-current-to-upstream (args &optional upstream) + "Push the current branch to its upstream branch. + +When `magit-push-current-set-remote-if-missing' is non-nil and +the upstream is not configured, then read the upstream from the +user, set it, and then push to it. With a prefix argument the +upstream can be changed before pushed to it." + (interactive + (list (magit-push-arguments) + (and (magit--push-current-set-upstream-p current-prefix-arg) + (magit-read-upstream-branch)))) + (--if-let (magit-get-current-branch) + (progn + (when upstream + (magit-set-upstream-branch it upstream)) + (if-let ((target (magit-get-upstream-branch it))) + (magit-git-push it target args) + (user-error "No upstream is configured for %s" it))) + (user-error "No branch is checked out"))) + +(defun magit--push-current-set-upstream-p (&optional change) + (and (or change + (and magit-push-current-set-remote-if-missing + (not (magit-get-upstream-branch)))) + (magit-get-current-branch))) + +(defun magit--push-current-to-upstream-desc () + (--if-let (magit-get-upstream-branch) + (concat (magit-branch-set-face it) "\n") + (and (magit--push-current-set-upstream-p) + (concat (propertize "@{upstream}" 'face 'bold) + ", after setting that\n")))) + +;;;###autoload +(defun magit-push-current (target args) + "Push the current branch to a branch read in the minibuffer." + (interactive + (--if-let (magit-get-current-branch) + (list (magit-read-remote-branch (format "Push %s to" it) + nil nil it 'confirm) + (magit-push-arguments)) + (user-error "No branch is checked out"))) + (magit-git-push (magit-get-current-branch) target args)) + +;;;###autoload +(defun magit-push-other (source target args) + "Push an arbitrary branch or commit somewhere. +Both the source and the target are read in the minibuffer." + (interactive + (let ((source (magit-read-local-branch-or-commit "Push"))) + (list source + (magit-read-remote-branch + (format "Push %s to" source) nil + (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-git-push source target args)) + +(defvar magit-push-refspecs-history nil) + +;;;###autoload +(defun magit-push-refspecs (remote refspecs args) + "Push one or multiple REFSPECS to a REMOTE. +Both the REMOTE and the REFSPECS are read in the minibuffer. To +use multiple REFSPECS, separate them with commas. Completion is +only available for the part before the colon, or when no colon +is used." + (interactive + (list (magit-read-remote "Push to remote") + (split-string (magit-completing-read-multiple + "Push refspec,s" + (cons "HEAD" (magit-list-local-branch-names)) + nil nil 'magit-push-refspecs-history) + crm-default-separator t) + (magit-push-arguments))) + (run-hooks 'magit-credential-hook) + (magit-run-git-async "push" "-v" args remote refspecs)) + +;;;###autoload +(defun magit-push-matching (remote &optional args) + "Push all matching branches to another repository. +If multiple remotes exist, then read one from the user. +If just one exists, use that without requiring confirmation." + (interactive (list (magit-read-remote "Push matching branches to" nil t) + (magit-push-arguments))) + (run-hooks 'magit-credential-hook) + (magit-run-git-async "push" "-v" args remote ":")) + +;;;###autoload +(defun magit-push-tags (remote &optional args) + "Push all tags to another repository. +If only one remote exists, then push to that. Otherwise prompt +for a remote, offering the remote configured for the current +branch as default." + (interactive (list (magit-read-remote "Push tags to remote" nil t) + (magit-push-arguments))) + (run-hooks 'magit-credential-hook) + (magit-run-git-async "push" remote "--tags" args)) + +;;;###autoload +(defun magit-push-tag (tag remote &optional args) + "Push a tag to another repository." + (interactive + (let ((tag (magit-read-tag "Push tag"))) + (list tag (magit-read-remote (format "Push %s to remote" tag) nil t) + (magit-push-arguments)))) + (run-hooks 'magit-credential-hook) + (magit-run-git-async "push" remote tag args)) + +;;;###autoload +(defun magit-push-implicitly (args) + "Push somewhere without using an explicit refspec. + +This command simply runs \"git push -v [ARGS]\". ARGS are the +arguments specified in the popup buffer. No explicit refspec +arguments are used. Instead the behavior depends on at least +these Git variables: `push.default', `remote.pushDefault', +`branch..pushRemote', `branch..remote', +`branch..merge', and `remote..push'. + +To add this command to the push popup add this to your init file: + + (with-eval-after-load \\='magit-remote + (magit-define-popup-action \\='magit-push-popup ?P + \\='magit-push-implicitly--desc + \\='magit-push-implicitly ?p t)) + +The function `magit-push-implicitly--desc' attempts to predict +what this command will do. The value it returns is displayed in +the popup buffer." + (interactive (list (magit-push-arguments))) + (run-hooks 'magit-credential-hook) + (magit-run-git-async "push" "-v" args)) + +(defun magit-push-implicitly--desc () + (let ((default (magit-get "push.default"))) + (unless (equal default "nothing") + (or (when-let ((remote (or (magit-get-remote) + (magit-remote-p "origin"))) + (refspec (magit-get "remote" remote "push"))) + (format "%s using %s" + (propertize remote 'face 'magit-branch-remote) + (propertize refspec 'face 'bold))) + (--when-let (and (not (magit-get-push-branch)) + (magit-get-upstream-branch)) + (format "%s aka %s\n" + (magit-branch-set-face it) + (propertize "@{upstream}" 'face 'bold))) + (--when-let (magit-get-push-branch) + (format "%s aka %s\n" + (magit-branch-set-face it) + (propertize "pushRemote" 'face 'bold))) + (--when-let (magit-get-@{push}-branch) + (format "%s aka %s\n" + (magit-branch-set-face it) + (propertize "@{push}" 'face 'bold))) + (format "using %s (%s is %s)\n" + (propertize "git push" 'face 'bold) + (propertize "push.default" 'face 'bold) + (propertize default 'face 'bold)))))) + +;;;###autoload +(defun magit-push-to-remote (remote args) + "Push to REMOTE without using an explicit refspec. +The REMOTE is read in the minibuffer. + +This command simply runs \"git push -v [ARGS] REMOTE\". ARGS +are the arguments specified in the popup buffer. No refspec +arguments are used. Instead the behavior depends on at least +these Git variables: `push.default', `remote.pushDefault', +`branch..pushRemote', `branch..remote', +`branch..merge', and `remote..push'. + +To add this command to the push popup add this to your init file: + + (with-eval-after-load \\='magit-remote + (magit-define-popup-action \\='magit-push-popup ?r + \\='magit-push-to-remote--desc + \\='magit-push-to-remote ?p t))" + (interactive (list (magit-read-remote "Push to remote") + (magit-push-arguments))) + (run-hooks 'magit-credential-hook) + (magit-run-git-async "push" "-v" args remote)) + +(defun magit-push-to-remote--desc () + (format "using %s\n" (propertize "git push " 'face 'bold))) + +;;; _ +(provide 'magit-push) +;;; magit-push.el ends here diff --git a/elpa/magit-20180828.1055/magit-refs.el b/elpa/magit-20181110.1820/magit-refs.el similarity index 96% rename from elpa/magit-20180828.1055/magit-refs.el rename to elpa/magit-20181110.1820/magit-refs.el index b18cc27c..a0bddd3f 100644 --- a/elpa/magit-20180828.1055/magit-refs.el +++ b/elpa/magit-20181110.1820/magit-refs.el @@ -27,6 +27,9 @@ ;;; Code: +(eval-when-compile + (require 'subr-x)) + (require 'magit) (defvar bookmark-make-record-function) @@ -539,10 +542,10 @@ line is inserted at all." (concat pull (and pull push ", ") push)))) (let (head) (dolist (line (magit-git-lines "for-each-ref" "--format=\ -%(symref:short)%00%(refname:short)%00%(subject)" +%(symref:short)%00%(refname:short)%00%(refname)%00%(subject)" (concat "refs/remotes/" remote) (cadr magit-refresh-args))) - (pcase-let ((`(,head-branch ,branch ,msg) + (pcase-let ((`(,head-branch ,branch ,ref ,msg) (-replace "" nil (split-string line "\0")))) (if head-branch (progn (cl-assert (equal branch (concat remote "/HEAD"))) @@ -555,10 +558,8 @@ line is inserted at all." (substring branch (1+ (length remote)))))) (magit-insert-heading (magit-refs--format-focus-column branch) - (propertize abbrev 'face - (if headp - 'magit-branch-remote-head - 'magit-branch-remote)) + (magit-refs--propertize-branch + abbrev ref (and headp 'magit-branch-remote-head)) (make-string (max 1 (- magit-refs-primary-column-width (length abbrev))) ?\s) @@ -591,7 +592,7 @@ line is inserted at all." (magit-git-lines "for-each-ref" (concat "--format=\ -%(HEAD)%00%(refname:short)%00\ +%(HEAD)%00%(refname:short)%00%(refname)%00\ %(upstream:short)%00%(upstream)%00%(upstream:track)%00" (if magit-refs-show-push-remote "\ %(push:remotename)%00%(push)%00%(push:track)%00%(subject)" @@ -600,7 +601,7 @@ line is inserted at all." (cadr magit-refresh-args))))) (unless (magit-get-current-branch) (push (magit-refs--format-local-branch - (concat "*\0\0\0\0\0\0\0" (magit-rev-format "%s"))) + (concat "*\0\0\0\0\0\0\0\0" (magit-rev-format "%s"))) lines)) (setq-local magit-refs-primary-column-width (let ((def (default-value 'magit-refs-primary-column-width))) @@ -622,7 +623,7 @@ line is inserted at all." lines))) (defun magit-refs--format-local-branch (line) - (pcase-let ((`(,head ,branch ,upstream ,u:ref ,u:track + (pcase-let ((`(,head ,branch ,ref ,upstream ,u:ref ,u:track ,push ,p:ref ,p:track ,msg) (-replace "" nil (split-string line "\0")))) (when (or (not branch) @@ -632,10 +633,11 @@ line is inserted at all." magit-refs-show-push-remote (magit-rev-verify p:ref) (not (equal p:ref u:ref)))) - (branch-desc (propertize (or branch "(detached)") - 'face (if (and headp branch) - 'magit-branch-current - 'magit-branch-local))) + (branch-desc + (if branch + (magit-refs--propertize-branch + branch ref (and headp 'magit-branch-current)) + (propertize "(detached)" 'face 'font-lock-warning-face))) (u:ahead (and u:track (string-match "ahead \\([0-9]+\\)" u:track) (propertize @@ -669,14 +671,9 @@ line is inserted at all." (magit-refs--format-focus-column branch headp) branch-desc u:ahead p:ahead u:behind (and upstream - (concat (propertize - upstream 'face - (cond ((equal u:track "[gone]") - 'error) - ((string-prefix-p "refs/heads/" u:ref) - 'magit-branch-local) - (t - 'magit-branch-remote))) + (concat (if (equal u:track "[gone]") + (propertize upstream 'face 'error) + (magit-refs--propertize-branch upstream u:ref)) " ")) (and pushp (concat p:behind @@ -711,6 +708,12 @@ line is inserted at all." 'face 'magit-dimmed))) (t ""))))) +(defun magit-refs--propertize-branch (branch ref &optional head-face) + (let ((face (cdr (cl-find-if (pcase-lambda (`(,re . ,_)) + (string-match-p re ref)) + magit-ref-namespaces)))) + (propertize branch 'face (if head-face (list face head-face) face)))) + (defun magit-refs--insert-refname-p (refname) (--if-let (-first (pcase-lambda (`(,key . ,_)) (if (functionp key) @@ -744,5 +747,6 @@ line is inserted at all." (substring line 10) (substring line 0 10))))) +;;; _ (provide 'magit-refs) ;;; magit-refs.el ends here diff --git a/elpa/magit-20181110.1820/magit-remote.el b/elpa/magit-20181110.1820/magit-remote.el new file mode 100644 index 00000000..5f80452a --- /dev/null +++ b/elpa/magit-20181110.1820/magit-remote.el @@ -0,0 +1,376 @@ +;;; magit-remote.el --- transfer Git commits -*- lexical-binding: t -*- + +;; Copyright (C) 2008-2018 The Magit Project Contributors +;; +;; You should have received a copy of the AUTHORS.md file which +;; lists all contributors. If not, see http://magit.vc/authors. + +;; Author: Jonas Bernoulli +;; Maintainer: Jonas Bernoulli + +;; Magit is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. +;; +;; Magit is distributed in the hope that it will be useful, but WITHOUT +;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +;; License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with Magit. If not, see http://www.gnu.org/licenses. + +;;; Commentary: + +;; This library implements remote commands. + +;;; Code: + +(require 'magit) + +;;; Options + +(defcustom magit-remote-add-set-remote.pushDefault 'ask-if-unset + "Whether to set the value of `remote.pushDefault' after adding a remote. + +If `ask', then always ask. If `ask-if-unset', then ask, but only +if the variable isn't set already. If nil, then don't ever set. +If the value is a string, then set without asking, provided that +the name of the added remote is equal to that string and the +variable isn't already set." + :package-version '(magit . "2.4.0") + :group 'magit-commands + :type '(choice (const :tag "ask if unset" ask-if-unset) + (const :tag "always ask" ask) + (string :tag "set if named") + (const :tag "don't set"))) + +(defcustom magit-remote-popup-show-variables t + "Whether the `magit-remote-popup' shows Git variables. +When set to nil, no variables are displayed directly in this +popup, instead the sub-popup `magit-remote-config-popup' has +to be used to view and change remote related variables." + :package-version '(magit . "2.12.0") + :group 'magit-commands + :type 'boolean) + +;;; Commands + +(defvar magit-remote-config-variables) + +;;;###autoload (autoload 'magit-remote-popup "magit-remote" nil t) +(magit-define-popup magit-remote-popup + "Popup console for remote commands." + :man-page "git-remote" + :default-arguments '("-f") + :variables (lambda () + (and magit-remote-popup-show-variables + magit-remote-config-variables)) + :switches '("Switches for add" + (?f "Fetch after add" "-f")) + :actions '((?a "Add" magit-remote-add) + (?C "Configure..." magit-remote-config-popup) + (?r "Rename" magit-remote-rename) + (?p "Prune stale branches" magit-remote-prune) + (?k "Remove" magit-remote-remove) + (?P "Prune stale refspecs" magit-remote-prune-refspecs)) + :max-action-columns 2) + +(defun magit-read-url (prompt &optional initial-input) + (let ((url (magit-read-string-ns prompt initial-input))) + (if (string-prefix-p "~" url) + (expand-file-name url) + url))) + +;;;###autoload +(defun magit-remote-add (remote url &optional args) + "Add a remote named REMOTE and fetch it." + (interactive (list (magit-read-string-ns "Remote name") + (magit-read-url "Remote url") + (magit-remote-arguments))) + (if (pcase (list magit-remote-add-set-remote.pushDefault + (magit-get "remote.pushDefault")) + (`(,(pred stringp) ,_) t) + ((or `(ask ,_) `(ask-if-unset nil)) + (y-or-n-p (format "Set `remote.pushDefault' to \"%s\"? " remote)))) + (progn (magit-call-git "remote" "add" args remote url) + (setf (magit-get "remote.pushDefault") remote) + (magit-refresh)) + (magit-run-git-async "remote" "add" args remote url))) + +;;;###autoload +(defun magit-remote-rename (old new) + "Rename the remote named OLD to NEW." + (interactive + (let ((remote (magit-read-remote "Rename remote"))) + (list remote (magit-read-string-ns (format "Rename %s to" remote))))) + (unless (string= old new) + (magit-call-git "remote" "rename" old new) + (magit-remote--cleanup-push-variables old new) + (magit-refresh))) + +;;;###autoload +(defun magit-remote-remove (remote) + "Delete the remote named REMOTE." + (interactive (list (magit-read-remote "Delete remote"))) + (magit-call-git "remote" "rm" remote) + (magit-remote--cleanup-push-variables remote) + (magit-refresh)) + +(defun magit-remote--cleanup-push-variables (remote &optional new-name) + (magit-with-toplevel + (when (equal (magit-get "remote.pushDefault") remote) + (magit-set new-name "remote.pushDefault")) + (dolist (var (magit-git-lines "config" "--name-only" + "--get-regexp" "^branch\.[^.]*\.pushRemote" + (format "^%s$" remote))) + (magit-call-git "config" (and (not new-name) "--unset") var new-name)))) + +(defconst magit--refspec-re "\\`\\(\\+\\)?\\([^:]+\\):\\(.*\\)\\'") + +;;;###autoload +(defun magit-remote-prune (remote) + "Remove stale remote-tracking branches for REMOTE." + (interactive (list (magit-read-remote "Prune stale branches of remote"))) + (magit-run-git-async "remote" "prune" remote)) + +;;;###autoload +(defun magit-remote-prune-refspecs (remote) + "Remove stale refspecs for REMOTE. + +A refspec is stale if there no longer exists at least one branch +on the remote that would be fetched due to that refspec. A stale +refspec is problematic because its existence causes Git to refuse +to fetch according to the remaining non-stale refspecs. + +If only stale refspecs remain, then offer to either delete the +remote or to replace the stale refspecs with the default refspec. + +Also remove the remote-tracking branches that were created due to +the now stale refspecs. Other stale branches are not removed." + (interactive (list (magit-read-remote "Prune refspecs of remote"))) + (let* ((tracking-refs (magit-list-remote-branches remote)) + (remote-refs (magit-remote-list-refs remote)) + (variable (format "remote.%s.fetch" remote)) + (refspecs (magit-get-all variable)) + stale) + (dolist (refspec refspecs) + (when (string-match magit--refspec-re refspec) + (let ((theirs (match-string 2 refspec)) + (ours (match-string 3 refspec))) + (unless (if (string-match "\\*" theirs) + (let ((re (replace-match ".*" t t theirs))) + (--some (string-match-p re it) remote-refs)) + (member theirs remote-refs)) + (push (cons refspec + (if (string-match "\\*" ours) + (let ((re (replace-match ".*" t t ours))) + (--filter (string-match-p re it) tracking-refs)) + (list (car (member ours tracking-refs))))) + stale))))) + (if (not stale) + (message "No stale refspecs for remote %S" remote) + (if (= (length stale) + (length refspecs)) + (magit-read-char-case + (format "All of %s's refspecs are stale. " remote) nil + (?s "replace with [d]efault refspec" + (magit-set-all + (list (format "+refs/heads/*:refs/remotes/%s/*" remote)) + variable)) + (?r "[r]emove remote" + (magit-call-git "remote" "rm" remote)) + (?a "or [a]abort" + (user-error "Abort"))) + (if (if (= (length stale) 1) + (pcase-let ((`(,refspec . ,refs) (car stale))) + (magit-confirm 'prune-stale-refspecs + (format "Prune stale refspec %s and branch %%s" refspec) + (format "Prune stale refspec %s and %%i branches" refspec) + nil refs)) + (magit-confirm 'prune-stale-refspecs nil + (format "Prune %%i stale refspecs and %i branches" + (length (cl-mapcan (lambda (s) (copy-sequence (cdr s))) + stale))) + nil + (mapcar (pcase-lambda (`(,refspec . ,refs)) + (concat refspec "\n" + (mapconcat (lambda (b) (concat " " b)) + refs "\n"))) + stale))) + (pcase-dolist (`(,refspec . ,refs) stale) + (magit-call-git "config" "--unset" variable + (regexp-quote refspec)) + (magit--log-action + (lambda (refs) + (format "Deleting %i branches" (length refs))) + (lambda (ref) + (format "Deleting branch %s (was %s)" ref + (magit-rev-parse "--short" ref))) + refs) + (dolist (ref refs) + (magit-call-git "update-ref" "-d" ref))) + (user-error "Abort"))) + (magit-refresh)))) + +;;;###autoload +(defun magit-remote-set-head (remote &optional branch) + "Set the local representation of REMOTE's default branch. +Query REMOTE and set the symbolic-ref refs/remotes//HEAD +accordingly. With a prefix argument query for the branch to be +used, which allows you to select an incorrect value if you fancy +doing that." + (interactive + (let ((remote (magit-read-remote "Set HEAD for remote"))) + (list remote + (and current-prefix-arg + (magit-read-remote-branch (format "Set %s/HEAD to" remote) + remote nil nil t))))) + (magit-run-git "remote" "set-head" remote (or branch "--auto"))) + +;;;###autoload +(defun magit-remote-unset-head (remote) + "Unset the local representation of REMOTE's default branch. +Delete the symbolic-ref \"refs/remotes//HEAD\"." + (interactive (list (magit-read-remote "Unset HEAD for remote"))) + (magit-run-git "remote" "set-head" remote "--delete")) + +;;; Configure + +(defvar magit-remote-config--remote nil) + +;;;###autoload +(defun magit-remote-config-popup (remote) + "Popup console for setting remote variables." + (interactive + (list (if (or current-prefix-arg + (and (eq magit-current-popup 'magit-remote-popup) + magit-remote-popup-show-variables)) + (magit-read-remote "Configure remote") + (magit-remote-config--remote-1)))) + (let ((magit-remote-config--remote remote)) + (magit-invoke-popup 'magit-remote-config-popup nil nil))) + +(defvar magit-remote-config-variables + '((lambda () + (concat + (propertize "Configure " 'face 'magit-popup-heading) + (propertize (magit-remote-config--remote) 'face 'magit-branch-remote))) + (?u "remote.%s.url" + magit-set-remote*url + magit-format-remote*url) + (?U "remote.%s.fetch" + magit-set-remote*fetch + magit-format-remote*fetch) + (?s "remote.%s.pushurl" + magit-set-remote*pushurl + magit-format-remote*pushurl) + (?S "remote.%s.push" + magit-set-remote*push + magit-format-remote*push) + (?O "remote.%s.tagOpt" + magit-cycle-remote*tagOpt + magit-format-remote*tagOpt))) + +(defvar magit-remote-config-popup + `(:man-page "git-remote" + :variables ,magit-remote-config-variables + :setup-function magit-remote-config-popup-setup)) + +(defun magit-remote-config-popup-setup (val def) + (magit-popup-default-setup val def) + (setq-local magit-remote-config--remote magit-remote-config--remote)) + +(defun magit-remote-config--remote (&optional prompt) + (if prompt + (or (and (not current-prefix-arg) + (or magit-remote-config--remote + (magit-remote-config--remote-1))) + (magit-read-remote prompt)) + (or magit-remote-config--remote + (magit-remote-config--remote-1) + ""))) + +(defun magit-remote-config--remote-1 () + (let ((remote (magit-get-upstream-remote))) + (if (or (not remote) + (equal remote ".")) + (and (magit-remote-p "origin") "origin") + remote))) + +(defun magit-set-remote*url (remote urls) + "Set the variable `url' for the remote named REMOTE to URLS." + (interactive (magit-remote-config--read-args "url" "Urls: ")) + (magit-remote-config--set-url remote "url" urls)) + +(defun magit-set-remote*fetch (remote values) + "Set the variable `fetch' for the remote named REMOTE to VALUES." + (interactive (magit-remote-config--read-args "fetch" "Fetch specs: ")) + (magit-set-all values "remote" remote "fetch") + (magit-refresh)) + +(defun magit-set-remote*pushurl (remote urls) + "Set the variable `pushurl' for the remote named REMOTE to URLS." + (interactive (magit-remote-config--read-args "pushurl" "Urls: ")) + (magit-remote-config--set-url remote "pushurl" urls "--push")) + +(defun magit-set-remote*push (remote values) + "Set the variable `push' for the remote named REMOTE to VALUES." + (interactive (magit-remote-config--read-args "push" "Push specs: ")) + (magit-set-all values "remote" remote "push") + (magit-refresh)) + +(defun magit-cycle-remote*tagOpt (remote) + (interactive (list (magit-remote-config--remote))) + (magit--set-popup-variable (format "remote.%s.tagOpt" remote) + '("--no-tags" "--tags") nil)) + +(defun magit-format-remote*url () + (magit-remote-config--format-variable "url")) + +(defun magit-format-remote*fetch () + (magit-remote-config--format-variable "fetch")) + +(defun magit-format-remote*pushurl () + (magit-remote-config--format-variable "pushurl")) + +(defun magit-format-remote*push () + (magit-remote-config--format-variable "push")) + +(defun magit-format-remote*tagOpt () + (let ((remote (magit-remote-config--remote))) + (magit--format-popup-variable:choices + (format "remote.%s.tagOpts" remote) + '("--no-tags" "--tags") nil nil + (+ (length remote) 16)))) + +(defun magit-remote-config--read-args (var prompt) + (let* ((remote (magit-remote-config--remote (format "Set `%s' of remote" var))) + (value (magit-get-all "remote" remote var))) + (list remote + (mapcar (lambda (url) + (if (string-prefix-p "~" url) + (expand-file-name url) + url)) + (completing-read-multiple + prompt nil nil nil + (and value (mapconcat #'identity value ","))))))) + +(defun magit-remote-config--set-url (remote var values &optional arg) + (let ((old (magit-get-all "remote" remote var))) + (dolist (v (-difference values old)) + (magit-call-git "remote" "set-url" arg "--add" remote v)) + (dolist (v (-difference old values)) + (magit-call-git "remote" "set-url" arg "--delete" remote + (concat "^" (regexp-quote v) "$")))) + (magit-refresh)) + +(defun magit-remote-config--format-variable (variable) + (magit--format-popup-variable:values + (format "remote.%s.%s" (magit-remote-config--remote) variable) + 25)) + +;;; _ +(provide 'magit-remote) +;;; magit-remote.el ends here diff --git a/elpa/magit-20180828.1055/magit-repos.el b/elpa/magit-20181110.1820/magit-repos.el similarity index 92% rename from elpa/magit-20180828.1055/magit-repos.el rename to elpa/magit-20181110.1820/magit-repos.el index 39b4d095..8db44d86 100644 --- a/elpa/magit-20180828.1055/magit-repos.el +++ b/elpa/magit-20181110.1820/magit-repos.el @@ -29,6 +29,9 @@ ;;; Code: +(eval-when-compile + (require 'subr-x)) + (require 'magit-core) (declare-function magit-status-internal "magit-status" (directory)) @@ -37,14 +40,16 @@ ;;; Options -(defcustom magit-repository-directories nil +(defcustom magit-repository-directories + '(("~/.emacs.d/" . 0) ; this should always be a repository + ("~/.emacs.d/lib/" . 1)) ; useful for `borg' users "List of directories that are or contain Git repositories. Each element has the form (DIRECTORY . DEPTH). DIRECTORY has to be a directory or a directory file-name, a string. DEPTH, an integer, specifies the maximum depth to look for Git repositories. If it is 0, then only add DIRECTORY itself." - :package-version '(magit . "2.8.0") + :package-version '(magit . "2.90.0") :group 'magit-essentials :type '(repeat (cons directory (integer :tag "Depth")))) @@ -174,13 +179,16 @@ Usually this is just its basename." (defun magit-repolist-column-version (_id) "Insert a description of the repository's `HEAD' revision." - (let ((v (or (magit-git-string "describe" "--tags") + (let ((v (or (magit-git-string "describe" "--tags" "--dirty") ;; If there are no tags, use the date in MELPA format. (magit-git-string "show" "--no-patch" "--format=%cd-g%h" "--date=format:%Y%m%d.%H%M")))) - (if (and v (string-match-p "\\`[0-9]" v)) - (concat " " v) - v))) + (save-match-data + (when (string-match "-dirty\\'" v) + (put-text-property (1+ (match-beginning 0)) (length v) 'face 'error v)) + (if (and v (string-match "\\`[0-9]" v)) + (concat " " v) + v)))) (defun magit-repolist-column-branch (_id) "Insert the current branch." @@ -249,13 +257,14 @@ to the selected repository. With prefix argument simply read a directory name using `read-directory-name'." - (if (and (not read-directory-name) magit-repository-directories) - (let* ((repos (magit-list-repos-uniquify - (--map (cons (file-name-nondirectory - (directory-file-name it)) - it) - (magit-list-repos)))) - (reply (magit-completing-read "Git repository" repos))) + (if-let ((repos (and (not read-directory-name) + magit-repository-directories + (magit-list-repos-uniquify + (--map (cons (file-name-nondirectory + (directory-file-name it)) + it) + (magit-list-repos)))))) + (let ((reply (magit-completing-read "Git repository" repos))) (file-name-as-directory (or (cdr (assoc reply repos)) (if (file-directory-p reply) @@ -300,5 +309,6 @@ With prefix argument simply read a directory name using dict) result)) +;;; _ (provide 'magit-repos) ;;; magit-repos.el ends here diff --git a/elpa/magit-20180828.1055/magit-reset.el b/elpa/magit-20181110.1820/magit-reset.el similarity index 95% rename from elpa/magit-20180828.1055/magit-reset.el rename to elpa/magit-20181110.1820/magit-reset.el index 59b6ab98..c4876499 100644 --- a/elpa/magit-20180828.1055/magit-reset.el +++ b/elpa/magit-20181110.1820/magit-reset.el @@ -33,7 +33,7 @@ (magit-define-popup magit-reset-popup "Popup console for reset commands." :man-page "git-reset" - :actions '((?m "reset mixed (HEAD and index)" magit-reset-head) + :actions '((?m "reset mixed (HEAD and index)" magit-reset-mixed) (?s "reset soft (HEAD only)" magit-reset-soft) (?h "reset hard (HEAD, index, and files)" magit-reset-hard) (?i "reset index (only)" magit-reset-index) @@ -43,20 +43,7 @@ :max-action-columns 1) ;;;###autoload -(defun magit-reset (commit &optional hard) - "Reset the `HEAD' and index to COMMIT, but not the working tree. -With a prefix argument also reset the working tree. -\n(git reset --mixed|--hard COMMIT)" - (interactive (list (magit-reset-read-branch-or-commit - (if current-prefix-arg - (concat (propertize "Hard" 'face 'bold) - " reset %s to") - "Reset %s to")) - current-prefix-arg)) - (magit-reset-internal (if hard "--hard" "--mixed") commit)) - -;;;###autoload -(defun magit-reset-head (commit) +(defun magit-reset-mixed (commit) "Reset the `HEAD' and index to COMMIT, but not the working tree. \n(git reset --mixed COMMIT)" (interactive (list (magit-reset-read-branch-or-commit "Reset %s to"))) @@ -97,6 +84,19 @@ Keep the `HEAD' and index as-is." (magit-run-git "checkout-index" "--all" "--force") (magit-wip-commit-after-apply nil " after reset"))) +;;;###autoload +(defun magit-reset-quickly (commit &optional hard) + "Reset the `HEAD' and index to COMMIT, and possibly the working tree. +With a prefix argument reset the working tree otherwise don't. +\n(git reset --mixed|--hard COMMIT)" + (interactive (list (magit-reset-read-branch-or-commit + (if current-prefix-arg + (concat (propertize "Hard" 'face 'bold) + " reset %s to") + "Reset %s to")) + current-prefix-arg)) + (magit-reset-internal (if hard "--hard" "--mixed") commit)) + (defun magit-reset-read-branch-or-commit (prompt) "Prompt for and return a ref to reset HEAD to. @@ -121,5 +121,6 @@ or \"detached head\" will be substituted for %s." (when (equal cmd "unstage") (magit-wip-commit-after-apply nil " after unstage")))) +;;; _ (provide 'magit-reset) ;;; magit-reset.el ends here diff --git a/elpa/magit-20180828.1055/magit-section.el b/elpa/magit-20181110.1820/magit-section.el similarity index 89% rename from elpa/magit-20180828.1055/magit-section.el rename to elpa/magit-20181110.1820/magit-section.el index 3dc1988e..b7c4c8d4 100644 --- a/elpa/magit-20180828.1055/magit-section.el +++ b/elpa/magit-20181110.1820/magit-section.el @@ -33,6 +33,9 @@ (require 'dash) (require 'eieio) +(eval-when-compile + (require 'subr-x)) + (require 'magit-utils) (declare-function magit-maybe-make-margin-overlay "magit-margin" ()) @@ -129,7 +132,8 @@ then don't do so for any sections." (const :tag "Cache visibility of all sections" t) (repeat :tag "Cache visibility for section types" symbol))) -(defcustom magit-section-initial-visibility-alist nil +(defcustom magit-section-initial-visibility-alist + '((stashes . hide)) "Alist controlling the initial visibility of sections. Each element maps a section type or lineage to the initial @@ -143,7 +147,12 @@ and the type is the first element of that vector. Wildcards can be used, see `magit-section-match'. Currently this option is only used to override hardcoded defaults, -but in the future it will also be used set the defaults." +but in the future it will also be used set the defaults. + +An entry whose key is `magit-status-initial-section' specifies +the visibility of the section `magit-status-goto-initial-section' +jumps to. This does not only override defaults, but also other +entries of this alist." :package-version '(magit . "2.12.0") :group 'magit-section :type '(alist :key-type (sexp :tag "Section type/lineage") @@ -173,11 +182,18 @@ but in the future it will also be used set the defaults." "Face for selected section headings." :group 'magit-faces) -;;; Core +;;; Classes (defvar magit--current-section-hook nil "Internal variable used for `magit-explain-section'.") +(defvar magit--section-type-alist + '( + (file . magit-file-section) + (hunk . magit-hunk-section) + (module . magit-module-section) + )) + (defclass magit-section () ((type :initform nil :initarg :type) (value :initform nil :initarg :value) @@ -199,6 +215,11 @@ but in the future it will also be used set the defaults." (defclass magit-hunk-section (magit-section) ((refined :initform nil))) +(defclass magit-module-section (magit-file-section) + ()) + +;;; Core + (defvar-local magit-root-section nil "The root section in the current buffer. All other sections are descendants of this section. The value @@ -247,8 +268,10 @@ IDENT has to be a list as returned by `magit-section-ident'." (defun magit-section-lineage (section) "Return the lineage of SECTION. -The return value has the form [TYPE...]." - (apply #'vector (mapcar #'car (magit-section-ident section)))) +The return value has the form (TYPE...)." + (cons (oref section type) + (when-let ((parent (oref section parent))) + (magit-section-lineage parent)))) (defvar magit-insert-section--current nil "For internal use only.") (defvar magit-insert-section--parent nil "For internal use only.") @@ -608,16 +631,24 @@ Sections at higher levels are hidden." ;;;; Auxiliary -(defun magit-describe-section-briefly (section &optional message) +(defun magit-describe-section-briefly (section &optional message ident) "Show information about the section at point. -This command is intended for debugging purposes." +With a prefix argument show the section identity instead of the +section lineage. This command is intended for debugging purposes." (interactive (list (magit-current-section) t)) - (let ((str (format "#" + (let ((str (format "#<%s %S %S %s-%s>" + (eieio-object-class section) (let ((val (oref section value))) - (if (stringp val) - (substring-no-properties val) - val)) - (magit-section-lineage section) + (cond ((stringp val) + (substring-no-properties val)) + ((and (eieio-object-p val) + (fboundp 'cl-prin1-to-string)) + (cl-prin1-to-string val)) + (t + val))) + (if ident + (magit-section-ident section) + (apply #'vector (magit-section-lineage section))) (when-let ((m (oref section start))) (marker-position m)) (when-let ((m (oref section end))) @@ -682,39 +713,66 @@ nil. CONDITION can take the following forms: (CONDITION...) matches if any of the CONDITIONs matches. - [TYPE...] matches if the first TYPE matches the type - of the section, the second matches that of - its parent, and so on. - [* TYPE...] matches sections that match [TYPE...] and + [CLASS...] matches if the section's class is the same + as the first CLASS or a subclass of that; + the section's parent class matches the + second CLASS; and so on. + [* CLASS...] matches sections that match [CLASS...] and also recursively all their child sections. - TYPE matches sections of TYPE regardless of the - types of the parent sections. - -Each TYPE is a symbol. Note that it is not necessary to specify -all TYPEs up to the root section as printed by -`magit-describe-type', unless of course you want to be that -precise." + CLASS matches if the section's class is the same + as CLASS or a subclass of that; regardless + of the classes of the parent sections. + +Each CLASS should be a class symbol, identifying a class that +derives from `magit-section'. For backward compatibility CLASS +can also be a \"type symbol\". A section matches such a symbol +if the value of its `type' slot is `eq'. If a type symbol has +an entry in `magit--section-type-alist', then a section also +matches that type if its class is a subclass of the class that +corresponds to the type as per that alist. + +Note that it is not necessary to specify the complete section +lineage as printed by `magit-describe-section-briefly', unless +of course you want to be that precise." + (and section (magit-section-match-1 condition section))) + +(defun magit-section-match-1 (condition section) + (cl-assert condition) (and section - (magit-section-match-1 condition - (mapcar #'car (magit-section-ident section))))) - -(defun magit-section-match-1 (condition type-list) - (if (listp condition) - (--first (magit-section-match-1 it type-list) condition) - (magit-section-match-2 (if (symbolp condition) - (list condition) - (append condition nil)) - type-list))) - -(defun magit-section-match-2 (l1 l2) - (or (null l1) - (if (eq (car l1) '*) - (or (magit-section-match-2 (cdr l1) l2) - (and l2 - (magit-section-match-2 l1 (cdr l2)))) - (and l2 - (equal (car l1) (car l2)) - (magit-section-match-2 (cdr l1) (cdr l2)))))) + (if (listp condition) + (--first (magit-section-match-1 it section) condition) + (magit-section-match-2 (if (symbolp condition) + (list condition) + (cl-coerce condition 'list)) + section)))) + +(defun magit-section-match-2 (condition section) + (if (eq (car condition) '*) + (or (magit-section-match-2 (cdr condition) section) + (when-let ((parent (oref section parent))) + (magit-section-match-2 condition parent))) + (and (let ((c (car condition))) + (if (class-p c) + (cl-typep section c) + (if-let ((class (cdr (assq c magit--section-type-alist)))) + (cl-typep section class) + (eq (oref section type) c)))) + (or (not (setq condition (cdr condition))) + (when-let ((parent (oref section parent))) + (magit-section-match-2 condition parent)))))) + +(defun magit-section-value-if (condition &optional section) + "If the section at point matches CONDITION, then return its value. + +If optional SECTION is non-nil then test whether that matches +instead. If there is no section at point and SECTION is nil, +then return nil. If the section does not match, then return +nil. + +See `magit-section-match' for the forms CONDITION can take." + (when-let ((section (or section (magit-current-section)))) + (and (magit-section-match condition section) + (oref section value)))) (defmacro magit-section-when (condition &rest body) "If the section at point matches CONDITION, evaluate BODY. @@ -726,7 +784,10 @@ section. If the section does not match or if there is no section at point, then return nil. See `magit-section-match' for the forms CONDITION can take." - (declare (indent 1) + (declare (obsolete + "instead use `magit-section-match' or `magit-section-value-if'." + "Magit 2.90.0") + (indent 1) (debug (sexp body))) `(--when-let (magit-current-section) ;; Quoting CONDITION here often leads to double-quotes, which @@ -753,22 +814,19 @@ matches if no other CONDITION match, even if there is no section at point." (declare (indent 0) (debug (&rest (sexp body)))) - (let ((lineage (cl-gensym "lineage"))) - `(let* ((it (magit-current-section)) - (,lineage (and it (append (magit-section-lineage it) nil)))) - (cond ,@(mapcar (lambda (clause) - `(,(or (eq (car clause) t) - `(and it (magit-section-match-1 - ',(car clause) ,lineage))) - ,@(cdr clause))) - clauses))))) + `(let* ((it (magit-current-section))) + (cond ,@(mapcar (lambda (clause) + `(,(or (eq (car clause) t) + `(and it + (magit-section-match-1 ',(car clause) it))) + ,@(cdr clause))) + clauses)))) (defun magit-section-match-assoc (section alist) "Return the value associated with SECTION's type or lineage in ALIST." - (let ((ident (mapcar #'car (magit-section-ident section)))) - (-some (pcase-lambda (`(,key . ,val)) - (and (magit-section-match-1 key ident) val)) - alist))) + (-some (pcase-lambda (`(,key . ,val)) + (and (magit-section-match-1 key section) val)) + alist)) ;;; Create @@ -829,11 +887,16 @@ anything this time around. (if (eq (car-safe type) 'eval) (cadr type) `',type))) - (,s (funcall (pcase ,tp - (`file 'magit-file-section) - (`hunk 'magit-hunk-section) - (_ 'magit-section)) - :type ,tp + (,s (funcall (if (class-p ,tp) + ,tp + (or (cdr (assq ,tp magit--section-type-alist)) + 'magit-section)) + :type + (if (class-p ,tp) + (or (car (rassq ,tp magit--section-type-alist)) + (error "BUG: No entry for %s in %s" ,tp + 'magit--section-type-alist)) + ,tp) :value ,(nth 1 (car args)) :start (point-marker) :parent magit-insert-section--parent))) @@ -872,8 +935,12 @@ anything this time around. (magit-insert-child-count ,s) (set-marker-insertion-type (oref ,s start) t) (let* ((end (oset ,s end (point-marker))) - (map (intern (format "magit-%s-section-map" (oref ,s type)))) - (map (and (boundp map) (symbol-value map)))) + (magit-map (intern (format "magit-%s-section-map" + (oref ,s type)))) + (forge-map (intern (format "forge-%s-section-map" + (oref ,s type)))) + (map (or (and (boundp magit-map) (symbol-value magit-map)) + (and (boundp forge-map) (symbol-value forge-map))))) (save-excursion (goto-char (oref ,s start)) (while (< (point) end) @@ -1204,19 +1271,15 @@ excluding SECTION itself." (`next (cdr (member section siblings))) (_ (remq section siblings)))))) -(defun magit-region-values (&optional types multiple) +(defun magit-region-values (&optional condition multiple) "Return a list of the values of the selected sections. -Also see `magit-region-sections' whose doc-string explains when a -region is a valid section selection. If the region is not active -or is not a valid section selection, then return nil. If optional -TYPES is non-nil then the selection not only has to be valid; the -types of all selected sections additionally have to match one of -TYPES, or nil is returned." +Return the values that themselves would be returned by +`magit-region-sections' (which see)." (--map (oref it value) - (magit-region-sections types multiple))) + (magit-region-sections condition multiple))) -(defun magit-region-sections (&optional types multiple) +(defun magit-region-sections (&optional condition multiple) "Return a list of the selected sections. When the region is active and constitutes a valid section @@ -1237,10 +1300,10 @@ apply to diffs where things get a bit more complicated, but even here if the region looks like it usually does, then that's not a valid selection as far as this function is concerned. -If optional TYPES is non-nil, then the selection not only has to -be valid; the types of all selected sections additionally have -to match one of TYPES, or nil is returned. TYPES can also be a -single type, instead of a list of types." +If optional CONDITION is non-nil, then the selection not only +has to be valid; all selected sections additionally have to match +CONDITION, or nil is returned. See `magit-section-match' for the +forms CONDITION can take." (when (region-active-p) (let* ((rbeg (region-beginning)) (rend (region-end)) @@ -1259,10 +1322,8 @@ single type, instead of a list of types." (when (eq (pop siblings) send) (setq siblings nil))) (setq sections (nreverse sections)) - (when (and types (symbolp types)) - (setq types (list types))) - (when (or (not types) - (--all-p (memq (oref it type) types) sections)) + (when (or (not condition) + (--all-p (magit-section-match condition it) sections)) sections))))))) (defun magit-section-position-in-heading-p (&optional section pos) @@ -1391,5 +1452,6 @@ again use `remove-hook'." magit--current-section-hook))) (apply entry args))))) +;;; _ (provide 'magit-section) ;;; magit-section.el ends here diff --git a/elpa/magit-20180828.1055/magit-sequence.el b/elpa/magit-20181110.1820/magit-sequence.el similarity index 97% rename from elpa/magit-20180828.1055/magit-sequence.el rename to elpa/magit-20181110.1820/magit-sequence.el index bf98f355..0eb1ec6b 100644 --- a/elpa/magit-20180828.1055/magit-sequence.el +++ b/elpa/magit-20181110.1820/magit-sequence.el @@ -29,6 +29,9 @@ ;;; Code: +(eval-when-compile + (require 'subr-x)) + (require 'magit) ;;; Options @@ -130,7 +133,7 @@ This discards all changes made since the sequence started." :options '((?s "Strategy" "--strategy=") (?m "Replay merge relative to parent" "--mainline=")) :actions '("Apply here" - (?A "Pick" magit-cherry-pick) + (?A "Pick" magit-cherry-copy) (?a "Apply" magit-cherry-apply) (?h "Harvest" magit-cherry-harvest) "Apply elsewhere" @@ -174,7 +177,7 @@ This discards all changes made since the sequence started." (format "Create branch from %s cherries" commits)))))) ;;;###autoload -(defun magit-cherry-pick (commits &optional args) +(defun magit-cherry-copy (commits &optional args) "Copy COMMITS from another branch onto the current branch. Prompt for a commit, defaulting to the commit at point. If the region selects multiple commits, then pick all of them, @@ -335,7 +338,7 @@ the process manually." :options '((?s "Strategy" "--strategy=") (?S "Sign using gpg" "--gpg-sign=" magit-read-gpg-secret-key) (?m "Replay merge relative to parent" "--mainline=")) - :actions '((?V "Revert commit(s)" magit-revert) + :actions '((?V "Revert commit(s)" magit-revert-and-commit) (?v "Revert changes" magit-revert-no-commit)) :sequence-actions '((?V "Continue" magit-sequencer-continue) (?s "Skip" magit-sequencer-skip) @@ -349,7 +352,7 @@ the process manually." (magit-revert-arguments))) ;;;###autoload -(defun magit-revert (commit &optional args) +(defun magit-revert-and-commit (commit &optional args) "Revert COMMIT by creating a new commit. Prompt for a commit, defaulting to the commit at point. If the region selects multiple commits, then revert all of them, @@ -385,7 +388,7 @@ without prompting." "--committer-date-is-author-date") (?D "Use committer date as author date" "--ignore-date")) :options '((?p "Remove leading slashes from paths" "-p" - magit-popup-read-number)) + magit-read-number-string)) :actions '((?m "Apply maildir" magit-am-apply-maildir) (?w "Apply patches" magit-am-apply-patches) (?a "Apply plain patch" magit-patch-apply-popup)) @@ -475,7 +478,7 @@ This discards all changes made since the sequence started." (?u (lambda () (--when-let (magit-get-upstream-branch) (concat it "\n"))) magit-rebase-onto-upstream) - (?e "elsewhere" magit-rebase) + (?e "elsewhere" magit-rebase-branch) "Rebase" (?i "interactively" magit-rebase-interactive) (?m "to modify a commit" magit-rebase-edit-commit) @@ -517,7 +520,7 @@ If that variable is unset, then rebase onto `remote.pushDefault'." (user-error "No branch is checked out"))) ;;;###autoload -(defun magit-rebase (target args) +(defun magit-rebase-branch (target args) "Rebase the current branch onto a branch read in the minibuffer. All commits that are reachable from `HEAD' but not from the selected branch TARGET are being rebased." @@ -675,11 +678,11 @@ edit. With a prefix argument the old message is reused as-is." (if noedit (let ((process-environment process-environment)) (push "GIT_EDITOR=true" process-environment) - (magit-run-git-async "rebase" "--continue") + (magit-run-git-async (magit--rebase-resume-command) "--continue") (set-process-sentinel magit-this-process #'magit-sequencer-process-sentinel) magit-this-process) - (magit-run-git-sequencer "rebase" "--continue"))) + (magit-run-git-sequencer (magit--rebase-resume-command) "--continue"))) (user-error "No rebase in progress"))) ;;;###autoload @@ -688,7 +691,7 @@ edit. With a prefix argument the old message is reused as-is." (interactive) (unless (magit-rebase-in-progress-p) (user-error "No rebase in progress")) - (magit-run-git-sequencer "rebase" "--skip")) + (magit-run-git-sequencer (magit--rebase-resume-command) "--skip")) ;;;###autoload (defun magit-rebase-edit () @@ -705,13 +708,16 @@ edit. With a prefix argument the old message is reused as-is." (unless (magit-rebase-in-progress-p) (user-error "No rebase in progress")) (magit-confirm 'abort-rebase "Abort this rebase") - (magit-run-git "rebase" "--abort")) + (magit-run-git (magit--rebase-resume-command) "--abort")) (defun magit-rebase-in-progress-p () "Return t if a rebase is in progress." (or (file-exists-p (magit-git-dir "rebase-merge")) (file-exists-p (magit-git-dir "rebase-apply/onto")))) +(defun magit--rebase-resume-command () + (if (file-exists-p (magit-git-dir "rebase-recursive")) "rbr" "rebase")) + ;;; Sections (defun magit-insert-sequencer-sequence () @@ -899,10 +905,11 @@ If no such sequence is in progress, do nothing." (defun magit-sequence-insert-commit (type hash face &optional exec) (magit-insert-section (commit hash) (magit-insert-heading - (concat (propertize type 'face face) "\s" - (magit-format-rev-summary hash) "\n")) + (propertize type 'face face) "\s" + (magit-format-rev-summary hash) "\n") (when exec (insert (propertize "exec" 'face 'magit-sequence-onto) "\s" exec "\n")))) +;;; _ (provide 'magit-sequence) ;;; magit-sequence.el ends here diff --git a/elpa/magit-20180828.1055/magit-stash.el b/elpa/magit-20181110.1820/magit-stash.el similarity index 97% rename from elpa/magit-20180828.1055/magit-stash.el rename to elpa/magit-20181110.1820/magit-stash.el index 3b17e075..9012c9aa 100644 --- a/elpa/magit-20180828.1055/magit-stash.el +++ b/elpa/magit-20181110.1820/magit-stash.el @@ -27,6 +27,9 @@ ;;; Code: +(eval-when-compile + (require 'subr-x)) + (require 'magit) (defvar bookmark-make-record-function) @@ -87,8 +90,8 @@ AUTHOR-WIDTH has to be an integer. When the name of the author :man-page "git-stash" :switches '((?u "Also save untracked files" "--include-untracked") (?a "Also save untracked and ignored files" "--all")) - :actions '((?z "Save" magit-stash) - (?Z "Snapshot" magit-snapshot) + :actions '((?z "Save" magit-stash-both) + (?Z "Snapshot" magit-snapshot-both) (?p "Pop" magit-stash-pop) (?i "Save index" magit-stash-index) (?I "Snapshot index" magit-snapshot-index) @@ -107,7 +110,7 @@ AUTHOR-WIDTH has to be an integer. When the name of the author :max-action-columns 3) ;;;###autoload -(defun magit-stash (message &optional include-untracked) +(defun magit-stash-both (message &optional include-untracked) "Create a stash of the index and working tree. Untracked files are included according to popup arguments. One prefix argument is equivalent to `--include-untracked' @@ -162,7 +165,7 @@ while two prefix arguments are equivalent to `--all'." input))) ;;;###autoload -(defun magit-snapshot (&optional include-untracked) +(defun magit-snapshot-both (&optional include-untracked) "Create a snapshot of the index and working tree. Untracked files are included according to popup arguments. One prefix argument is equivalent to `--include-untracked' @@ -238,7 +241,7 @@ When the region is active offer to drop all contained stashes." ;;;###autoload (defun magit-stash-clear (ref) "Remove all stashes saved in REF's reflog by deleting REF." - (interactive (let ((ref (or (magit-section-when 'stashes) "refs/stash"))) + (interactive (let ((ref (or (magit-section-value-if 'stashes) "refs/stash"))) (magit-confirm t (format "Drop all stashes in %s" ref)) (list ref))) (magit-run-git "update-ref" "-d" ref)) @@ -258,7 +261,7 @@ branch or `HEAD' as the string-point." (interactive (list (magit-read-stash "Branch stash") (magit-read-string-ns "Branch name"))) (let ((inhibit-magit-refresh t)) - (magit-branch branch (or (magit-get-current-branch) "HEAD"))) + (magit-branch-create branch (or (magit-get-current-branch) "HEAD"))) (magit-stash-apply stash)) ;;;###autoload @@ -488,5 +491,6 @@ that make up the stash." (magit-git-items "ls-tree" "-z" "--name-only" "-r" "--full-tree" rev))))) +;;; _ (provide 'magit-stash) ;;; magit-stash.el ends here diff --git a/elpa/magit-20180828.1055/magit-status.el b/elpa/magit-20181110.1820/magit-status.el similarity index 87% rename from elpa/magit-20180828.1055/magit-status.el rename to elpa/magit-20181110.1820/magit-status.el index a68aff43..73a31672 100644 --- a/elpa/magit-20180828.1055/magit-status.el +++ b/elpa/magit-20181110.1820/magit-status.el @@ -27,9 +27,10 @@ ;;; Code: -(require 'magit) +(eval-when-compile + (require 'subr-x)) -(eval-when-compile (require 'subr-x)) +(require 'magit) (defvar bookmark-make-record-function) @@ -91,6 +92,33 @@ all." :group 'magit-status :type 'hook) +(defcustom magit-status-initial-section '(1) + "The section point is placed on when a status buffer is created. + +When such a buffer is merely being refreshed or being shown again +after it was merely burried, then this option has no effect. + +If this is nil, then point remains on the very first section as +usual. Otherwise it has to be a list of integers and section +identity lists. The members of that list are tried in order +until a matching section is found. + +An integer means to jump to the nth section, 1 for example +jumps over the headings. To get a section's \"identity list\" +use \\[universal-argument] \\[magit-describe-section-briefly]. + +If, for example, you want to jump to the commits that haven't +been pulled from the upstream, or else the second section, then +use: (((unpulled . \"..@{upstream}\") (status)) 1). + +See option `magit-section-initial-visibility-alist' for how to +control the initial visibility of the jumped to section." + :package-version '(magit . "2.90.0") + :group 'magit-status + :type '(choice (const :tag "as usual" nil) + (repeat (choice (number :tag "nth top-level section") + (sexp :tag "section identity"))))) + (defcustom magit-status-show-hashes-in-headers nil "Whether headers in the status buffer show hashes. The functions which respect this option are @@ -297,23 +325,35 @@ Type \\[magit-commit-popup] to create a commit. (magit-insert-section (status) (magit-run-section-hook 'magit-status-sections-hook))) -(defun magit-status-goto-commits () - "In a `magit-status-mode' buffer, jump to some log. +(defun magit-status-goto-initial-section () + "In a `magit-status-mode' buffer, jump `magit-status-initial-section'. Actually doing so is deferred until `magit-refresh-buffer-hook' -runs `magit-status-goto-commits-1'. That function then removes -itself from the hook, so that this only happens when the status -buffer is first created." - (when (derived-mode-p 'magit-status-mode) - (add-hook 'magit-refresh-buffer-hook 'magit-status-goto-commits-1 nil t))) - -(defun magit-status-goto-commits-1 () - "In a `magit-status-mode' buffer, jump to some log. +runs `magit-status-goto-initial-section-1'. That function then +removes itself from the hook, so that this only happens when the +status buffer is first created." + (when (and magit-status-initial-section + (derived-mode-p 'magit-status-mode)) + (add-hook 'magit-refresh-buffer-hook + 'magit-status-goto-initial-section-1 nil t))) + +(defun magit-status-goto-initial-section-1 () + "In a `magit-status-mode' buffer, jump `magit-status-initial-section'. This function removes itself from `magit-refresh-buffer-hook'." - (when-let - ((s (or (magit-get-section '((unpulled . "..@{upstream}") (status))) - (magit-get-section '((unpushed . "@{upstream}..") (status)))))) - (goto-char (oref s start))) - (remove-hook 'magit-refresh-buffer-hook 'magit-status-goto-commits-1 t)) + (when-let ((section + (--some (if (integerp it) + (nth (1- it) + (magit-section-siblings (magit-current-section) + 'next)) + (magit-get-section it)) + magit-status-initial-section))) + (goto-char (oref section start)) + (when-let ((vis (cdr (assq 'magit-status-initial-section + magit-section-initial-visibility-alist)))) + (if (eq vis 'hide) + (magit-section-hide section) + (magit-section-show section)))) + (remove-hook 'magit-refresh-buffer-hook + 'magit-status-goto-initial-section-1 t)) (defun magit-status-maybe-update-revision-buffer (&optional _) "When moving in the status buffer, update the revision buffer. @@ -363,11 +403,17 @@ the status buffer causes this section to disappear again." (defun magit-insert-diff-filter-header () "Insert a header line showing the effective diff filters." - (when magit-diff-section-file-args - (magit-insert-section (filter 'diff) + (let ((ignore-modules (magit-ignore-submodules-p))) + (when (or ignore-modules + magit-diff-section-file-args) (insert (propertize (format "%-10s" "Filter! ") 'face 'magit-section-heading)) - (insert (mapconcat #'identity magit-diff-section-file-args " ")) + (when ignore-modules + (insert ignore-modules) + (when magit-diff-section-file-args + (insert " -- "))) + (when magit-diff-section-file-args + (insert (mapconcat #'identity magit-diff-section-file-args " "))) (insert ?\n)))) ;;;; Reference Headers @@ -527,10 +573,12 @@ value of that variable can be set using \"D = f DIRECTORY RET g\"." (magit-insert-heading "Untracked files:") (magit-insert-files files base) (insert ?\n))) - (when-let ((files (--mapcat (and (eq (aref it 0) ??) - (list (substring it 3))) - (magit-git-items "status" "-z" "--porcelain" - "--" base)))) + (when-let ((files + (--mapcat (and (eq (aref it 0) ??) + (list (substring it 3))) + (magit-git-items "status" "-z" "--porcelain" + (magit-ignore-submodules-p) + "--" base)))) (magit-insert-section (untracked) (magit-insert-heading "Untracked files:") (dolist (file files) @@ -581,5 +629,6 @@ of that variable can be set using \"D = f DIRECTORY RET g\"." (setq files (magit-insert-files files dir)))))) files) +;;; _ (provide 'magit-status) ;;; magit-status.el ends here diff --git a/elpa/magit-20180828.1055/magit-submodule.el b/elpa/magit-20181110.1820/magit-submodule.el similarity index 69% rename from elpa/magit-20180828.1055/magit-submodule.el rename to elpa/magit-20181110.1820/magit-submodule.el index 875b6294..d05b7e8d 100644 --- a/elpa/magit-20180828.1055/magit-submodule.el +++ b/elpa/magit-20181110.1820/magit-submodule.el @@ -23,6 +23,9 @@ ;;; Code: +(eval-when-compile + (require 'subr-x)) + (require 'magit) (defvar x-stretch-cursor) @@ -96,6 +99,20 @@ an alist that supports the keys `:right-align' and `:pad-right'." (symbol)) (sexp :tag "Value")))))) +(defcustom magit-submodule-remove-trash-gitdirs nil + "Whether `magit-submodule-remove' offers to trash module gitdirs. + +If this is nil, then that command does not offer to do so unless +a prefix argument is used. When this is t, then it does offer to +do so even without a prefix argument. + +In both cases the action still has to be confirmed unless that is +disabled using the option `magit-no-confirm'. Doing the latter +and also setting this variable to t will lead to tears." + :package-version '(magit . "2.90.0") + :group 'magit-commands + :type 'boolean) + ;;; Popup ;;;###autoload (autoload 'magit-submodule-popup "magit-submodule" nil t) @@ -123,6 +140,7 @@ an alist that supports the keys `:right-align' and `:pad-right'." magit-submodule-synchronize) (?d "Unpopulate git submodule deinit [--force]" magit-submodule-unpopulate) + (?k "Remove" magit-submodule-remove) nil (?l "List all modules" magit-list-submodules) (?f "Fetch all modules" magit-fetch-modules)) @@ -162,11 +180,21 @@ it is nil, then PATH also becomes the name." (magit-submodule-read-name-for-path path) (magit-submodule-filtered-arguments "--force"))))) (magit-with-toplevel - (magit-call-git "submodule" "add" (and name (list "--name" name)) - args "--" url path) - (unless (version< (magit-git-version) "2.11.0") - (magit-call-git "submodule" "absorbgitdirs" path)) - (magit-refresh))) + (magit-submodule--maybe-reuse-gitdir name path) + (magit-run-git-async "submodule" "add" + (and name (list "--name" name)) + args "--" url path) + (set-process-sentinel + magit-this-process + (lambda (process event) + (when (memq (process-status process) '(exit signal)) + (if (> (process-exit-status process) 0) + (magit-process-sentinel process event) + (process-put process 'inhibit-refresh t) + (magit-process-sentinel process event) + (unless (version< (magit-git-version) "2.12.0") + (magit-call-git "submodule" "absorbgitdirs" path)) + (magit-refresh))))))) ;;;###autoload (defun magit-submodule-read-name-for-path (path &optional prefer-short) @@ -270,6 +298,82 @@ single module from the user." (magit-with-toplevel (magit-run-git-async "submodule" "deinit" args "--" modules))) +;;;###autoload +(defun magit-submodule-remove (modules args trash-gitdirs) + "Unregister MODULES and remove their working directories. + +For safety reasons, do not remove the gitdirs and if a module has +uncomitted changes, then do not remove it at all. If a module's +gitdir is located inside the working directory, then move it into +the gitdir of the superproject first. + +With the \"--force\" argument offer to remove dirty working +directories and with a prefix argument offer to delete gitdirs. +Both actions are very dangerous and have to be confirmed. There +are additional safety precautions in place, so you might be able +to recover from making a mistake here, but don't count on it." + (interactive + (list (if-let ((modules (magit-region-values 'magit-module-section t))) + (magit-confirm 'remove-modules nil "Remove %i modules" nil modules) + (list (magit-read-module-path "Remove module"))) + (magit-submodule-filtered-arguments "--force") + current-prefix-arg)) + (when (version< (magit-git-version) "2.12.0") + (error "This command requires Git v2.12.0")) + (when magit-submodule-remove-trash-gitdirs + (setq trash-gitdirs t)) + (magit-with-toplevel + (when-let + ((modified + (-filter (lambda (module) + (let ((default-directory (file-name-as-directory + (expand-file-name module)))) + (and (cddr (directory-files default-directory)) + (magit-anything-modified-p)))) + modules))) + (if (member "--force" args) + (if (magit-confirm 'remove-dirty-modules + "Remove dirty module %s" + "Remove %i dirty modules" + t modified) + (dolist (module modified) + (let ((default-directory (file-name-as-directory + (expand-file-name module)))) + (magit-git "stash" "push" + "-m" "backup before removal of this module"))) + (setq modules (cl-set-difference modules modified))) + (if (cdr modified) + (message "Omitting %s modules with uncommitted changes: %s" + (length modified) + (mapconcat #'identity modified ", ")) + (message "Omitting module %s, it has uncommitted changes" + (car modified))) + (setq modules (cl-set-difference modules modified)))) + (when modules + (let ((alist + (and trash-gitdirs + (--map (split-string it "\0") + (magit-git-lines "submodule" "foreach" "-q" + "printf \"$sm_path\\0$name\n\""))))) + (magit-git "submodule" "absorbgitdirs" "--" modules) + (magit-git "submodule" "deinit" args "--" modules) + (magit-git "rm" args "--" modules) + (when (and trash-gitdirs + (magit-confirm 'trash-module-gitdirs + "Trash gitdir of module %s" + "Trash gitdirs of %i modules" + t modules)) + (dolist (module modules) + (if-let ((name (cadr (assoc module alist)))) + ;; Disregard if `magit-delete-by-moving-to-trash' + ;; is nil. Not doing so would be too dangerous. + (delete-directory (magit-git-dir + (convert-standard-filename + (concat "modules/" name))) + t t) + (error "BUG: Weird module name and/or path for %s" module))))) + (magit-refresh)))) + ;;; Sections ;;;###autoload @@ -280,7 +384,7 @@ are inserted, and option `magit-module-sections-nested' controls whether they are wrapped in an additional section." (when-let ((modules (magit-list-module-paths))) (if magit-module-sections-nested - (magit-insert-section section (submodules nil t) + (magit-insert-section section (modules nil t) (magit-insert-heading (format "%s (%s)" (propertize "Modules" 'face 'magit-section-heading) @@ -299,7 +403,7 @@ whether they are wrapped in an additional section." For each section insert the path and the output of `git describe --tags', or, failing that, the abbreviated HEAD commit hash." (when-let ((modules (magit-list-module-paths))) - (magit-insert-section section (submodules nil t) + (magit-insert-section section (modules nil t) (magit-insert-heading (format "%s (%s)" (propertize "Modules overview" 'face 'magit-section-heading) @@ -320,7 +424,7 @@ or, failing that, the abbreviated HEAD commit hash." (dolist (module modules) (let ((default-directory (expand-file-name (file-name-as-directory module)))) - (magit-insert-section (submodule module t) + (magit-insert-section (magit-module-section module t) (insert (propertize (format path-format module) 'face 'magit-diff-file-heading)) (if (not (file-exists-p ".git")) @@ -339,38 +443,38 @@ or, failing that, the abbreviated HEAD commit hash." (insert ?\n)))))) (insert ?\n)) -(defvar magit-submodules-section-map +(defvar magit-modules-section-map (let ((map (make-sparse-keymap))) (define-key map [remap magit-visit-thing] 'magit-list-submodules) map) - "Keymap for `submodules' sections.") + "Keymap for `modules' sections.") -(defvar magit-submodule-section-map +(defvar magit-module-section-map (let ((map (make-sparse-keymap))) + (set-keymap-parent map magit-file-section-map) (unless (featurep 'jkl) (define-key map "\C-j" 'magit-submodule-visit)) (define-key map [C-return] 'magit-submodule-visit) (define-key map [remap magit-visit-thing] 'magit-submodule-visit) - (define-key map [remap magit-delete-thing] 'magit-submodule-deinit) + (define-key map [remap magit-delete-thing] 'magit-submodule-unpopulate) (define-key map "K" 'magit-file-untrack) (define-key map "R" 'magit-file-rename) map) - "Keymap for `submodule' sections.") + "Keymap for `module' sections.") (defun magit-submodule-visit (module &optional other-window) "Visit MODULE by calling `magit-status' on it. Offer to initialize MODULE if it's not checked out yet. With a prefix argument, visit in another window." - (interactive (list (or (magit-section-when submodule) + (interactive (list (or (magit-section-value-if 'module) (magit-read-module-path "Visit module")) current-prefix-arg)) (magit-with-toplevel (let ((path (expand-file-name module))) - (if (and (not (file-exists-p (expand-file-name ".git" module))) - (not (y-or-n-p (format "Initialize submodule '%s' first?" - module)))) - (when (file-exists-p path) - (dired-jump other-window (concat path "/."))) + (cond + ((file-exists-p (expand-file-name ".git" module)) + (magit-diff-visit-directory path other-window)) + ((y-or-n-p (format "Initialize submodule '%s' first?" module)) (magit-run-git-async "submodule" "update" "--init" "--" module) (set-process-sentinel magit-this-process @@ -379,7 +483,9 @@ With a prefix argument, visit in another window." (magit-process-sentinel process event)) (when (and (eq (process-status process) 'exit) (= (process-exit-status process) 0)) - (magit-diff-visit-directory path other-window)))))))) + (magit-diff-visit-directory path other-window))))) + ((file-exists-p path) + (dired-jump other-window (concat path "/."))))))) ;;;###autoload (defun magit-insert-modules-unpulled-from-upstream () @@ -393,7 +499,7 @@ These sections can be expanded to show the respective commits." (defun magit-insert-modules-unpulled-from-pushremote () "Insert sections for modules that haven't been pulled from the push-remote. These sections can be expanded to show the respective commits." - (magit--insert-modules-logs "Modules unpulled from ${push}" + (magit--insert-modules-logs "Modules unpulled from @{push}" 'modules-unpulled-from-pushremote "HEAD..@{push}")) @@ -411,35 +517,36 @@ These sections can be expanded to show the respective commits." These sections can be expanded to show the respective commits." (magit--insert-modules-logs "Modules unpushed to @{push}" 'modules-unpushed-to-pushremote - "${push}..HEAD")) + "@{push}..HEAD")) (defun magit--insert-modules-logs (heading type range) "For internal use, don't add to a hook." - (when-let ((modules (magit-list-module-paths))) - (magit-insert-section section ((eval type) nil t) - (string-match "\\`\\(.+\\) \\([^ ]+\\)\\'" heading) - (magit-insert-heading - (concat - (propertize (match-string 1 heading) 'face 'magit-section-heading) " " - (propertize (match-string 2 heading) 'face 'magit-branch-remote) ":")) - (magit-with-toplevel - (dolist (module modules) - (when (magit-module-worktree-p module) - (let ((default-directory - (expand-file-name (file-name-as-directory module)))) - (when (magit-file-accessible-directory-p default-directory) - (magit-insert-section sec (file module t) - (magit-insert-heading - (concat (propertize module 'face 'magit-diff-file-heading) ":")) - (magit-git-wash (apply-partially 'magit-log-wash-log 'module) - "-c" "push.default=current" "log" "--oneline" range) - (when (> (point) - (oref sec content)) - (delete-char -1)))))))) - (if (> (point) - (oref section content)) - (insert ?\n) - (magit-cancel-section))))) + (unless (magit-ignore-submodules-p) + (when-let ((modules (magit-list-module-paths))) + (magit-insert-section section ((eval type) nil t) + (string-match "\\`\\(.+\\) \\([^ ]+\\)\\'" heading) + (magit-insert-heading + (propertize (match-string 1 heading) 'face 'magit-section-heading) " " + (propertize (match-string 2 heading) 'face 'magit-branch-remote) ":") + (magit-with-toplevel + (dolist (module modules) + (when (magit-module-worktree-p module) + (let ((default-directory + (expand-file-name (file-name-as-directory module)))) + (when (magit-file-accessible-directory-p default-directory) + (magit-insert-section sec (magit-module-section module t) + (magit-insert-heading + (propertize module 'face 'magit-diff-file-heading) ":") + (magit-git-wash + (apply-partially 'magit-log-wash-log 'module) + "-c" "push.default=current" "log" "--oneline" range) + (when (> (point) + (oref sec content)) + (delete-char -1)))))))) + (if (> (point) + (oref section content)) + (insert ?\n) + (magit-cancel-section)))))) ;;; List @@ -447,7 +554,10 @@ These sections can be expanded to show the respective commits." (defun magit-list-submodules () "Display a list of the current repository's submodules." (interactive) - (magit-display-buffer (magit-mode-get-buffer 'magit-submodule-list-mode t)) + (magit-display-buffer + (or (magit-mode-get-buffer 'magit-submodule-list-mode) + (magit-with-toplevel + (magit-generate-new-buffer 'magit-submodule-list-mode)))) (magit-submodule-list-mode) (magit-submodule-list-refresh) (tabulated-list-print)) @@ -494,5 +604,33 @@ These sections can be expanded to show the respective commits." "Insert the relative path of the submodule." path) +;;; Utilities + +(defun magit-submodule--maybe-reuse-gitdir (name path) + (let ((gitdir + (magit-git-dir (convert-standard-filename (concat "modules/" name))))) + (when (and (file-exists-p gitdir) + (not (file-exists-p path))) + (pcase (read-char-choice + (concat + gitdir " already exists.\n" + "Type [u] to use the existing gitdir and create the working tree\n" + " [r] to rename the existing gitdir and clone again\n" + " [t] to trash the existing gitdir and clone again\n" + " [C-g] to abort ") + '(?u ?r ?t)) + (?u (magit-submodule--restore-worktree (expand-file-name path) gitdir)) + (?r (rename-file gitdir (concat gitdir "-" + (format-time-string "%F-%T")))) + (?t (delete-directory gitdir t t)))))) + +(defun magit-submodule--restore-worktree (worktree gitdir) + (make-directory worktree t) + (with-temp-file (expand-file-name ".git" worktree) + (insert "gitdir: " (file-relative-name gitdir worktree) "\n")) + (let ((default-directory worktree)) + (magit-call-git "reset" "--hard" "HEAD"))) + +;;; _ (provide 'magit-submodule) ;;; magit-submodule.el ends here diff --git a/elpa/magit-20180828.1055/magit-subtree.el b/elpa/magit-20181110.1820/magit-subtree.el similarity index 99% rename from elpa/magit-20180828.1055/magit-subtree.el rename to elpa/magit-20181110.1820/magit-subtree.el index b31d0d8b..4e5d32b0 100644 --- a/elpa/magit-20180828.1055/magit-subtree.el +++ b/elpa/magit-20181110.1820/magit-subtree.el @@ -142,5 +142,6 @@ (magit-subtree-args))) (magit-git-subtree "split" prefix args commit)) +;;; _ (provide 'magit-subtree) ;;; magit-subtree.el ends here diff --git a/elpa/magit-20180828.1055/magit-tag.el b/elpa/magit-20181110.1820/magit-tag.el similarity index 97% rename from elpa/magit-20180828.1055/magit-tag.el rename to elpa/magit-20181110.1820/magit-tag.el index 1153e2ca..ca5f6aba 100644 --- a/elpa/magit-20180828.1055/magit-tag.el +++ b/elpa/magit-20181110.1820/magit-tag.el @@ -37,13 +37,13 @@ (?f "Force" "--force") (?s "Sign" "--sign")) :options '((?f "Sign" "--local-user=" magit-read-gpg-secret-key)) - :actions '((?t "Create" magit-tag) + :actions '((?t "Create" magit-tag-create) (?k "Delete" magit-tag-delete) (?p "Prune" magit-tag-prune)) - :default-action 'magit-tag) + :default-action 'magit-tag-create) ;;;###autoload -(defun magit-tag (name rev &optional args) +(defun magit-tag-create (name rev &optional args) "Create a new tag with the given NAME at REV. With a prefix argument annotate the tag. \n(git tag [--annotate] NAME REV)" @@ -128,5 +128,6 @@ the tag popup by default." tag) (magit-show-refs)) +;;; _ (provide 'magit-tag) ;;; magit-tag.el ends here diff --git a/elpa/magit-20180828.1055/magit-utils.el b/elpa/magit-20181110.1820/magit-utils.el similarity index 87% rename from elpa/magit-20180828.1055/magit-utils.el rename to elpa/magit-20181110.1820/magit-utils.el index 02bdf311..fc819514 100644 --- a/elpa/magit-20180828.1055/magit-utils.el +++ b/elpa/magit-20181110.1820/magit-utils.el @@ -40,7 +40,9 @@ (require 'cl-lib) (require 'dash) -(require 'subr-x) + +(eval-when-compile + (require 'subr-x)) (require 'crm) @@ -56,6 +58,8 @@ (defvar magit-wip-before-change-mode) +(require 'magit-popup) + ;;; Options (defcustom magit-completing-read-function 'magit-builtin-completing-read @@ -92,6 +96,9 @@ alphabetical order, depending on your version of Ivy." (forge-browse-remote nil t) (forge-browse-issue nil t) (forge-browse-pullreq nil t) + (forge-edit-topic-title nil t) + (forge-edit-topic-labels nil t) + (forge-edit-topic-assignees nil t) (forge-visit-issue nil t) (forge-visit-pullreq nil t)) "When not to offer alternatives and ask for confirmation. @@ -137,9 +144,9 @@ The value has the form ((COMMAND nil|PROMPT DEFAULT)...). (const untrack) (const trash) (const delete) (const abort-rebase) (const abort-merge) (const merge-dirty) - (const drop-stashes) (const resect-bisect) + (const drop-stashes) (const reset-bisect) (const kill-process) (const delete-unmerged-branch) - (const delete-pr-branch) + (const delete-pr-branch) (const remove-modules) (const stage-all-changes) (const unstage-all-changes) (const safe-with-wip))) @@ -248,6 +255,29 @@ Edit published history: To disable confirmation completely, add all three symbols here or set `magit-published-branches' to nil. +Removing modules: + + `remove-modules' When you remove the working directory of a + module that does not contain uncommitted changes, then that is + safer than doing so when there are uncommitted changes and/or + when you also remove the gitdir. Still, you don't want to do + that by accident. + + `remove-dirty-modules' When you remove the working directory of + a module that contains uncommitted changes, then those changes + are gone for good. It is better to go to the module, inspect + these changes and only if appropriate discard them manually. + + `trash-module-gitdirs' When you remove the gitdir of a module, + then all unpushed changes are gone for good. It is very easy + to forget that you have some unfinished work on an unpublished + feature branch or even in a stash. + + Actually there are some safety precautions in place, that might + help you out if you make an unwise choice here, but don't count + on it. In case of emergency, stay calm and check the stash and + the `trash-directory' for traces of lost work. + Various: `kill-process' There seldom is a reason to kill a process. @@ -273,6 +303,9 @@ Global settings: :type `(choice (const :tag "Always require confirmation" nil) (const :tag "Never require confirmation" t) (set :tag "Require confirmation except for" + ;; `remove-dirty-modules' and + ;; `trash-module-gitdirs' intentionally + ;; omitted. ,@magit--confirm-actions))) (defcustom magit-slow-confirm '(drop-stashes) @@ -444,8 +477,6 @@ acts similarly to `completing-read', except for the following: '(metadata (display-sort-function . identity)) (complete-with-action action collection string pred)))) -(defvar ivy-sort-functions-alist) - (defun magit-builtin-completing-read (prompt choices &optional predicate require-match initial-input hist def) "Magit wrapper for standard `completing-read' function." @@ -493,6 +524,39 @@ into a list." (user-error "Nothing selected"))) input)) +(defun magit-completing-read-multiple* + (prompt table &optional predicate require-match initial-input + hist def inherit-input-method) + "Read multiple strings in the minibuffer, with completion. +Like `completing-read-multiple' but don't mess with order of +TABLE. Also bind `helm-completion-in-region-default-sort-fn' +to nil." + (unwind-protect + (cl-letf (((symbol-function 'completion-pcm--all-completions) + #'magit-completion-pcm--all-completions)) + (add-hook 'choose-completion-string-functions + 'crm--choose-completion-string) + (let* ((minibuffer-completion-table #'crm--collection-fn) + (minibuffer-completion-predicate predicate) + ;; see completing_read in src/minibuf.c + (minibuffer-completion-confirm + (unless (eq require-match t) require-match)) + (crm-completion-table (magit--completion-table table)) + (map (if require-match + crm-local-must-match-map + crm-local-completion-map)) + (helm-completion-in-region-default-sort-fn nil) + ;; If the user enters empty input, `read-from-minibuffer' + ;; returns the empty string, not DEF. + (input (read-from-minibuffer + prompt initial-input map + nil hist def inherit-input-method))) + (and def (string-equal input "") (setq input def)) + ;; Remove empty strings in the list of read strings. + (split-string input crm-separator t))) + (remove-hook 'choose-completion-string-functions + 'crm--choose-completion-string))) + (defun magit-ido-completing-read (prompt choices &optional predicate require-match initial-input hist def) "Ido-based `completing-read' almost-replacement. @@ -642,6 +706,14 @@ ACTION is a member of option `magit-slow-confirm'." (replace-regexp-in-string "-" " " (concat (upcase (substring prompt 0 1)) (substring prompt 1))))) +(defun magit-read-number-string (prompt &optional default) + "Like `read-number' but return value is a string. +DEFAULT may be a number or a numeric string." + (number-to-string + (read-number prompt (if (stringp default) + (string-to-number default) + default)))) + ;;; Debug Utilities ;;;###autoload @@ -656,10 +728,31 @@ See info node `(magit)Debugging Tools' for more information." ,@(cl-mapcan (lambda (dir) (list "-L" dir)) (delete-dups - (mapcar (lambda (lib) - (file-name-directory (locate-library lib))) - '("magit" "magit-popup" "with-editor" - "git-commit" "dash" "ghub")))) + (cl-mapcan + (lambda (lib) + (let ((path (locate-library lib))) + (cond + (path + (list (file-name-directory path))) + ((not (member lib '("lv" "transient"))) + (error "Cannot find mandatory dependency %s" lib))))) + '(;; Like `LOAD_PATH' in `default.mk'. + "dash" + "ghub" + "graphql" + "lv" + "magit-popup" + "transient" + "treepy" + "with-editor" + ;; Obviously `magit' itself is needed too. + "magit" + ;; While this is part of the Magit repository, + ;; it is distributed as a separate package. + "git-commit" + ;; Even though `async' is a dependency of the + ;; `magit' package, it is not required here. + )))) ;; Avoid Emacs bug#16406 by using full path. "-l" ,(file-name-sans-extension (locate-library "magit"))) " "))) @@ -819,6 +912,31 @@ and https://github.com/magit/magit/issues/2295." (when (equal state "U") (push (expand-file-name file directory) files))))))))) +(when (< emacs-major-version 27) + (defun vc-git--call@bug21559 (fn buffer command &rest args) + "Backport https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21559." + (let ((process-environment process-environment)) + (when revert-buffer-in-progress-p + (push "GIT_OPTIONAL_LOCKS=0" process-environment)) + (apply fn buffer command args))) + (advice-add 'vc-git--call :around 'vc-git--call@bug21559) + + (defun vc-git-command@bug21559 + (fn buffer okstatus file-or-list &rest flags) + "Backport https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21559." + (let ((process-environment process-environment)) + (when revert-buffer-in-progress-p + (push "GIT_OPTIONAL_LOCKS=0" process-environment)) + (apply fn buffer okstatus file-or-list flags))) + (advice-add 'vc-git-command :around 'vc-git-command@bug21559) + + (defun auto-revert-handler@bug21559 (fn) + "Backport https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21559." + (let ((revert-buffer-in-progress-p t)) + (funcall fn))) + (advice-add 'auto-revert-handler :around 'auto-revert-handler@bug21559) + ) + ;; `completion-pcm--all-completions' reverses the completion list. To ;; preserve the order of our pre-sorted completions, we'll temporarily ;; override it with the function below. bug#24676 @@ -976,5 +1094,6 @@ Like `message', except that `message-log-max' is bound to nil." (let ((message-log-max nil)) (apply #'message format-string args))) +;;; _ (provide 'magit-utils) ;;; magit-utils.el ends here diff --git a/elpa/magit-20180828.1055/magit-wip.el b/elpa/magit-20181110.1820/magit-wip.el similarity index 82% rename from elpa/magit-20180828.1055/magit-wip.el rename to elpa/magit-20181110.1820/magit-wip.el index 0bb7efc5..10c085be 100644 --- a/elpa/magit-20180828.1055/magit-wip.el +++ b/elpa/magit-20181110.1820/magit-wip.el @@ -30,6 +30,9 @@ ;;; Code: +(eval-when-compile + (require 'subr-x)) + (require 'magit-core) (require 'magit-log) @@ -41,22 +44,39 @@ :group 'magit-modes :group 'magit-essentials) -(defcustom magit-wip-after-save-local-mode-lighter " sWip" +(defgroup magit-wip-legacy nil + "It is better to not use these modes individually." + :link '(info-link "(magit)Legacy Wip Modes") + :group 'magit-wip) + +(defcustom magit-wip-mode-lighter " Wip" + "Lighter for Magit-Wip mode." + :package-version '(magit . "2.90.0") + :group 'magit-wip + :type 'string) + +(defcustom magit-wip-after-save-local-mode-lighter "" "Lighter for Magit-Wip-After-Save-Local mode." :package-version '(magit . "2.1.0") - :group 'magit-wip + :group 'magit-wip-legacy :type 'string) -(defcustom magit-wip-after-apply-mode-lighter " aWip" +(defcustom magit-wip-after-apply-mode-lighter "" "Lighter for Magit-Wip-After-Apply mode." :package-version '(magit . "2.1.0") - :group 'magit-wip + :group 'magit-wip-legacy :type 'string) -(defcustom magit-wip-before-change-mode-lighter " cWip" +(defcustom magit-wip-before-change-mode-lighter "" "Lighter for Magit-Wip-Before-Change mode." :package-version '(magit . "2.1.0") - :group 'magit-wip + :group 'magit-wip-legacy + :type 'string) + +(defcustom magit-wip-initial-backup-mode-lighter "" + "Lighter for Magit-Wip-Initial Backup mode." + :package-version '(magit . "2.1.0") + :group 'magit-wip-legacy :type 'string) (defcustom magit-wip-merge-branch nil @@ -70,7 +90,7 @@ never garbage collected. If nil and the current branch has new commits, then the wip ref is reset to the tip of the branch before creating a new wip commit. With this setting wip commits are eventually garbage -collected." +collected. This is currently the default." :package-version '(magit . "2.90.0") :group 'magit-wip :type 'boolean) @@ -87,6 +107,26 @@ is used as `branch-ref'." ;;; Modes +(define-minor-mode magit-wip-mode + "Save uncommitted changes to work-in-progress refs. + +Whenever appropriate (i.e. when dataloss would be a possibility +otherwise) this mode causes uncommitted changes to be committed +to dedicated work-in-progress refs. + +For historic reasons this mode is implemented on top of four +other `magit-wip-*' modes, which can also be used individually, +if you want finer control over when the wip refs are updated; +but that is discouraged." + :package-version '(magit . "2.90.0") + :lighter magit-wip-mode-lighter + :global t + (let ((arg (if magit-wip-mode 1 -1))) + (magit-wip-after-save-mode arg) + (magit-wip-after-apply-mode arg) + (magit-wip-before-change-mode arg) + (magit-wip-initial-backup-mode arg))) + (define-minor-mode magit-wip-after-save-local-mode "After saving, also commit to a worktree work-in-progress ref. @@ -177,7 +217,15 @@ command which is about to be called are committed." (magit-with-toplevel (magit-wip-commit files msg)))) -;;; Extras +(define-minor-mode magit-wip-initial-backup-mode + "Before saving a buffer for the first time, commit to a wip ref." + :package-version '(magit . "2.90.0") + :group 'magit-wip + :lighter magit-wip-initial-backup-mode-lighter + :global t + (if magit-wip-initial-backup-mode + (add-hook 'before-save-hook 'magit-wip-commit-initial-backup) + (remove-hook 'before-save-hook 'magit-wip-commit-initial-backup))) (defvar-local magit-wip-buffer-backed-up nil) (put 'magit-wip-buffer-backed-up 'permanent-local t) @@ -305,17 +353,30 @@ commit message." (concat "refs/heads/" branch)) "HEAD"))) +(defun magit-wip-maybe-add-commit-hook () + (when (and magit-wip-merge-branch + (magit-wip-any-enabled-p)) + (add-hook 'git-commit-post-finish-hook 'magit-wip-commit nil t))) + +(defun magit-wip-any-enabled-p () + (or magit-wip-mode + magit-wip-after-save-local-mode + magit-wip-after-save-mode + magit-wip-after-apply-mode + magit-wip-before-change-mode + magit-wip-initial-backup-mode)) + ;;; Log (defun magit-wip-log-index (args files) "Show log for the index wip ref of the current branch." (interactive (magit-log-arguments)) - (magit-log (list (magit--wip-index-ref)) args files)) + (magit-git-log (list (magit--wip-index-ref)) args files)) (defun magit-wip-log-worktree (args files) "Show log for the worktree wip ref of the current branch." (interactive (magit-log-arguments)) - (magit-log (list (magit--wip-wtree-ref)) args files)) + (magit-git-log (list (magit--wip-wtree-ref)) args files)) (defun magit-wip-log-current (branch args files count) "Show log for the current branch and its wip refs. @@ -343,15 +404,15 @@ many \"branches\" of each wip ref are shown." "HEAD"))) (magit-log-arguments) (list (prefix-numeric-value current-prefix-arg)))) - (magit-log (nconc (list branch) - (magit-wip-log-get-tips - (magit--wip-wtree-ref branch) - (abs count)) - (and (>= count 0) - (magit-wip-log-get-tips - (magit--wip-index-ref branch) - (abs count)))) - args files)) + (magit-git-log (nconc (list branch) + (magit-wip-log-get-tips + (magit--wip-wtree-ref branch) + (abs count)) + (and (>= count 0) + (magit-wip-log-get-tips + (magit--wip-index-ref branch) + (abs count)))) + args files)) (defun magit-wip-log-get-tips (wipref count) (when-let ((reflog (magit-git-lines "reflog" wipref))) @@ -366,5 +427,6 @@ many \"branches\" of each wip ref are shown." (cl-decf count)) (cons wipref (nreverse tips))))) +;;; _ (provide 'magit-wip) ;;; magit-wip.el ends here diff --git a/elpa/magit-20180828.1055/magit-worktree.el b/elpa/magit-20181110.1820/magit-worktree.el similarity index 98% rename from elpa/magit-20180828.1055/magit-worktree.el rename to elpa/magit-20181110.1820/magit-worktree.el index 107e2cb7..08941e5a 100644 --- a/elpa/magit-20180828.1055/magit-worktree.el +++ b/elpa/magit-20181110.1820/magit-worktree.el @@ -101,7 +101,7 @@ The primary worktree cannot be deleted." (list (magit-completing-read "Delete worktree" (cdr (magit-list-worktrees)) nil t nil nil - (magit-section-when (worktree))))) + (magit-section-value-if 'worktree)))) (if (file-directory-p (expand-file-name ".git" worktree)) (user-error "Deleting %s would delete the shared .git directory" worktree) (let ((primary (file-name-as-directory (caar (magit-list-worktrees))))) @@ -125,7 +125,7 @@ minibuffer. If the worktree at point is the one whose status is already being displayed in the current buffer, then show it in Dired instead." (interactive - (list (or (magit-section-when (worktree)) + (list (or (magit-section-value-if 'worktree) (magit-completing-read "Show status for worktree" (cl-delete (directory-file-name (magit-toplevel)) @@ -170,5 +170,6 @@ If there is only one worktree, then insert nothing." (insert ?\n)))) (insert ?\n))))) +;;; _ (provide 'magit-worktree) ;;; magit-worktree.el ends here diff --git a/elpa/magit-20180828.1055/magit.el b/elpa/magit-20181110.1820/magit.el similarity index 98% rename from elpa/magit-20180828.1055/magit.el rename to elpa/magit-20181110.1820/magit.el index b25cb4b5..5bd9146f 100644 --- a/elpa/magit-20180828.1055/magit.el +++ b/elpa/magit-20181110.1820/magit.el @@ -50,6 +50,9 @@ (require 'cl-lib) (require 'dash) +(eval-when-compile + (require 'subr-x)) + (require 'with-editor) (require 'git-commit) (require 'magit-core) @@ -121,6 +124,14 @@ own faces for the `header-line', or for parts of the "Face for current branch." :group 'magit-faces) +(defface magit-branch-upstream + '((t :slant italic)) + "Face for upstream branch. +This face is only used in logs and it gets combined + with `magit-branch-local', `magit-branch-remote' +and/or `magit-branch-remote-head'." + :group 'magit-faces) + (defface magit-head '((((class color) (background light)) :inherit magit-branch-local) (((class color) (background dark)) :inherit magit-branch-local)) @@ -395,7 +406,6 @@ is run in the top-level directory of the current working tree." (2 'font-lock-function-name-face nil t)) (,(concat "(" (regexp-opt '("magit-insert-section" "magit-section-case" - "magit-section-when" "magit-bind-match-strings" "magit-with-temp-index" "magit-with-blob" @@ -464,7 +474,7 @@ and Emacs to it." (package-version-join (package-desc-version (cadr it)))))))) (progn - (push 'debug debug) + (push 'dirname debug) (let ((dirname (file-name-nondirectory (directory-file-name topdir)))) (when (string-match "\\`magit-\\([0-9]\\{8\\}\\.[0-9]*\\)" @@ -591,12 +601,16 @@ For X11 something like ~/.xinitrc should work.\n" (require 'magit-sequence) (require 'magit-commit) (require 'magit-remote) + (require 'magit-clone) + (require 'magit-fetch) + (require 'magit-pull) + (require 'magit-push) (require 'magit-bisect) (require 'magit-stash) (require 'magit-blame) (require 'magit-obsolete) + (require 'magit-submodule) (unless (load "magit-autoloads" t t) - (require 'magit-submodule) (require 'magit-subtree) (require 'magit-ediff) (require 'magit-extras) diff --git a/elpa/magit-20181110.1820/magit.info b/elpa/magit-20181110.1820/magit.info new file mode 100644 index 00000000..64e27c03 --- /dev/null +++ b/elpa/magit-20181110.1820/magit.info @@ -0,0 +1,187 @@ +This is magit.info, produced by makeinfo version 6.5 from magit.texi. + + Copyright (C) 2015-2018 Jonas Bernoulli + + You can redistribute this document and/or modify it under the terms + of the GNU General Public License as published by the Free Software + Foundation, either version 3 of the License, or (at your option) + any later version. + + This document is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + +INFO-DIR-SECTION Emacs +START-INFO-DIR-ENTRY +* Magit: (magit). Using Git from Emacs with Magit. +END-INFO-DIR-ENTRY + + +Indirect: +magit.info-1: 754 +magit.info-2: 307175 + +Tag Table: +(Indirect) +Node: Top754 +Node: Introduction6307 +Node: Installation11030 +Node: Installing from Melpa11360 +Node: Installing from the Git Repository12433 +Node: Post-Installation Tasks14979 +Node: Getting Started16264 +Node: Interface Concepts21611 +Node: Modes and Buffers21942 +Node: Switching Buffers23691 +Node: Naming Buffers28234 +Node: Quitting Windows31541 +Node: Automatic Refreshing of Magit Buffers33173 +Node: Automatic Saving of File-Visiting Buffers35941 +Node: Automatic Reverting of File-Visiting Buffers37126 +Node: Risk of Reverting Automatically42122 +Node: Sections44505 +Node: Section Movement45446 +Node: Section Visibility49543 +Node: Section Hooks54402 +Node: Section Types and Values56809 +Node: Section Options58112 +Node: Popup Buffers and Prefix Commands58584 +Node: Completion Confirmation and the Selection60965 +Node: Action Confirmation61402 +Node: Completion and Confirmation68748 +Node: The Selection71934 +Node: The hunk-internal region74833 +Node: Support for Completion Frameworks75922 +Node: Additional Completion Options80738 +Node: Running Git81337 +Node: Viewing Git Output81610 +Node: Git Process Status82743 +Node: Running Git Manually83708 +Node: Git Executable86110 +Node: Global Git Arguments88392 +Node: Inspecting89198 +Node: Status Buffer90345 +Node: Status Sections93109 +Node: Status Header Sections97912 +Node: Status Module Sections100542 +Node: Status Options103047 +Node: Repository List104801 +Node: Logging106959 +Node: Refreshing Logs109412 +Node: Log Buffer110797 +Node: Log Margin114592 +Node: Select from Log117232 +Node: Reflog119336 +Node: Cherries120868 +Node: Diffing122595 +Node: Refreshing Diffs125548 +Node: Diff Buffer129039 +Node: Diff Options133623 +Node: Revision Buffer137899 +Node: Ediffing140833 +Node: References Buffer144429 +Node: References Sections154193 +Node: Bisecting155054 +Node: Visiting Blobs156792 +Node: Blaming157302 +Node: Manipulating163113 +Node: Repository Setup163429 +Node: Staging and Unstaging164469 +Node: Staging from File-Visiting Buffers168550 +Node: Applying169718 +Node: Committing171611 +Node: Initiating a Commit172194 +Node: Editing Commit Messages175522 +Node: Branching185918 +Node: The Two Remotes186148 +Node: The Branch Popup188765 +Node: The Branch Config Popup205825 +Node: Auxiliary Branch Commands211766 +Node: Merging212871 +Node: Resolving Conflicts216802 +Node: Rebasing221803 +Node: Editing Rebase Sequences225967 +Node: Information About In-Progress Rebase228997 +Ref: Information About In-Progress Rebase-Footnote-1237746 +Node: Cherry Picking238342 +Node: Reverting242594 +Node: Resetting243968 +Node: Stashing245622 +Node: Transferring250145 +Node: Remotes250383 +Node: The Remote Popup250539 +Node: The Remote Config Popup254007 +Node: Fetching255663 +Node: Pulling257025 +Node: Pushing257868 +Node: Creating and Sending Patches262609 +Node: Applying Patches263446 +Node: Miscellaneous265032 +Node: Tagging265348 +Node: Notes266696 +Node: Submodules269007 +Node: Listing Submodules269221 +Node: Submodule Popup271145 +Node: Subtree273598 +Node: Worktree274838 +Node: Common Commands276048 +Node: Wip Modes277795 +Node: Wip Graph282728 +Node: Legacy Wip Modes285042 +Node: Minor Mode for Buffers Visiting Files287937 +Node: Minor Mode for Buffers Visiting Blobs293353 +Node: Customizing294166 +Node: Per-Repository Configuration295834 +Node: Essential Settings297483 +Node: Safety297807 +Node: Performance299572 +Node: Microsoft Windows Performance307175 +Node: MacOS Performance308366 +Ref: MacOS Performance-Footnote-1309602 +Ref: MacOS Performance-Footnote-2309684 +Ref: MacOS Performance-Footnote-3309744 +Node: Plumbing309910 +Node: Calling Git310733 +Node: Getting a Value from Git312258 +Node: Calling Git for Effect315344 +Node: Section Plumbing321864 +Node: Creating Sections322092 +Node: Section Selection325992 +Node: Matching Sections327791 +Node: Refreshing Buffers333764 +Node: Conventions336906 +Node: Theming Faces337098 +Node: FAQ345213 +Node: FAQ - How to ...?345655 +Node: How to show git's output?346015 +Node: How to install the gitman info manual?346769 +Node: How to show diffs for gpg-encrypted files?347739 +Node: How does branching and pushing work?348335 +Node: Can Magit be used as ediff-version-control-package?348698 +Node: FAQ - Issues and Errors350687 +Node: Magit is slow351619 +Node: I changed several thousand files at once and now Magit is unusable351833 +Node: I am having problems committing352562 +Node: I am using MS Windows and cannot push with Magit353043 +Node: I am using OS X and SOMETHING works in shell but not in Magit353660 +Node: Diffs contain control sequences354466 +Node: Expanding a file to show the diff causes it to disappear355579 +Node: Point is wrong in the COMMIT_EDITMSG buffer356130 +Node: The mode-line information isn't always up-to-date357176 +Node: A branch and tag sharing the same name breaks SOMETHING358258 +Node: My Git hooks work on the command-line but not inside Magit359146 +Node: git-commit-mode isn't used when committing from the command-line359983 +Node: Point ends up inside invisible text when jumping to a file-visiting buffer362250 +Node: Debugging Tools363048 +Node: Keystroke Index364935 +Node: Command Index396948 +Node: Function Index431821 +Node: Variable Index447202 + +End Tag Table + + +Local Variables: +coding: utf-8 +End: diff --git a/elpa/magit-20180828.1055/magit.info-1 b/elpa/magit-20181110.1820/magit.info-1 similarity index 96% rename from elpa/magit-20180828.1055/magit.info-1 rename to elpa/magit-20181110.1820/magit.info-1 index 12e4ff66..bda4ef17 100644 --- a/elpa/magit-20180828.1055/magit.info-1 +++ b/elpa/magit-20181110.1820/magit.info-1 @@ -11,6 +11,7 @@ This is magit.info, produced by makeinfo version 6.5 from magit.texi. but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + INFO-DIR-SECTION Emacs START-INFO-DIR-ENTRY * Magit: (magit). Using Git from Emacs with Magit. @@ -30,7 +31,7 @@ to perform almost all of their daily version control tasks directly from within Emacs. While many fine Git clients exist, only Magit and Git itself deserve to be called porcelains. -This manual is for Magit version 2.13.0 (2.13.0-166-g1a7f5440+1). +This manual is for Magit version 2.90.0 (v2.90.0-4-g13b32ae1c+1). Copyright (C) 2015-2018 Jonas Bernoulli @@ -67,7 +68,7 @@ This manual is for Magit version 2.13.0 (2.13.0-166-g1a7f5440+1). Installation -* Installing from an Elpa Archive:: +* Installing from Melpa:: * Installing from the Git Repository:: * Post-Installation Tasks:: @@ -190,7 +191,7 @@ Branching * The Two Remotes:: * The Branch Popup:: * The Branch Config Popup:: -* Auxillary Branch Commands:: +* Auxiliary Branch Commands:: Rebasing @@ -237,6 +238,12 @@ Submodules * Submodule Popup:: +Wip Modes + +* Wip Graph:: +* Legacy Wip Modes:: + + Customizing * Per-Repository Configuration:: @@ -400,15 +407,15 @@ development repository. * Menu: -* Installing from an Elpa Archive:: +* Installing from Melpa:: * Installing from the Git Repository:: * Post-Installation Tasks::  -File: magit.info, Node: Installing from an Elpa Archive, Next: Installing from the Git Repository, Up: Installation +File: magit.info, Node: Installing from Melpa, Next: Installing from the Git Repository, Up: Installation -2.1 Installing from an Elpa Archive -=================================== +2.1 Installing from Melpa +========================= Magit is available from Melpa and Melpa-Stable. If you haven’t used Emacs’ package manager before, then it is high time you familiarize @@ -441,21 +448,16 @@ using: Now see *note Post-Installation Tasks::.  -File: magit.info, Node: Installing from the Git Repository, Next: Post-Installation Tasks, Prev: Installing from an Elpa Archive, Up: Installation +File: magit.info, Node: Installing from the Git Repository, Next: Post-Installation Tasks, Prev: Installing from Melpa, Up: Installation 2.2 Installing from the Git Repository ====================================== -Magit depends on the ‘dash’, ‘magit-popup’, ‘ghub’ and ‘with-editor’ -libraries which are available from Melpa and Melpa-Stable. Install them -using ‘M-x package-install RET RET’. Of course you may also -install them manually from their development repository. - - (An ancient release of Magit is also available from Marmalade, but no -new versions will be uploaded. Marmalade is unmaintained — its -maintainer has stopped responding to support requests from package -authors or even just to create new accounts so that new authors can -upload their packages in the first place.) +Magit depends on the ‘dash’, ‘ghub’, ‘graphql’, ‘magit-popup’, ‘treepy’ +and ‘with-editor’ libraries which are available from Melpa and +Melpa-Stable. Install them using ‘M-x package-install RET +RET’. Of course you may also install them manually from their +repository. Then clone the Magit repository: @@ -466,16 +468,18 @@ upload their packages in the first place.) $ make - If you haven’t installed ‘dash’, ‘magit-popup’, ‘ghub’ and -‘with-editor’ from Melpa or at ‘/path/to/magit/../’, then you -have to tell ‘make’ where to find them. To do so create the file -‘/path/to/magit/config.mk’ with the following content before running -‘make’: + If you haven’t installed ‘dash’, ‘ghub’, ‘graphql’, ‘magit-popup’, +‘treepy’ and ‘with-editor’ from Melpa or at +‘/path/to/magit/../’, then you have to tell ‘make’ where to +find them. To do so create the file ‘/path/to/magit/config.mk’ with the +following content before running ‘make’: LOAD_PATH = -L /path/to/magit/lisp LOAD_PATH += -L /path/to/dash - LOAD_PATH += -L /path/to/magit-popup LOAD_PATH += -L /path/to/ghub + LOAD_PATH += -L /path/to/graphql + LOAD_PATH += -L /path/to/magit-popup + LOAD_PATH += -L /path/to/treepy LOAD_PATH += -L /path/to/with-editor Finally add this to your init file: @@ -676,7 +680,7 @@ usually exists only one buffer per repository. Separate modes and thus buffers exist for commits, diffs, logs, and some other things. Besides these special purpose buffers, there also exists an overview -buffer, called the *status buffer*. Its usually from this buffer that +buffer, called the *status buffer*. It’s usually from this buffer that the user invokes Git commands, or creates or visits other buffers. In this manual we often speak about "Magit buffers". By that we mean @@ -692,8 +696,8 @@ buffers whose major-modes derive from ‘magit-mode’. value, which allows telling it apart from other locked buffers and the unlocked buffer. - Not all Magit buffers can be locked to their values, for example it - wouldn’t make sense to lock a status buffer. + Not all Magit buffers can be locked to their values; for example, + it wouldn’t make sense to lock a status buffer. There can only be a single unlocked buffer using a certain major-mode per repository. So when a buffer is being unlocked and @@ -2789,7 +2793,7 @@ Reflog::. prefix argument, show log for one or more revs read from the minibuffer. -‘l o’ (‘magit-log’) +‘l o’ (‘magit-log-other’) Show log for one or more revs read from the minibuffer. The user can input any revision or revisions separated by a space, or even @@ -3113,7 +3117,7 @@ Logging::. ‘l O’ (‘magit-reflog-other’) - Display the reflog of a branch. + Display the reflog of a branch or another ref. ‘l H’ (‘magit-reflog-head’) @@ -3222,7 +3226,7 @@ Buffers and Prefix Commands::). Show changes for the thing at point. -‘d r’ (‘magit-diff’) +‘d r’ (‘magit-diff-range’) Show differences between two commits. @@ -3452,6 +3456,12 @@ These commands are available in diff buffers. From a diff, show log for the definition at point. + -- User Option: magit-log-trace-definition-function + + The function used by ‘magit-log-trace-definition’ to determine the + function at point. For major-modes that have special needs, you + could set that using the mode’s hook. + ‘C-c C-e’ (‘magit-diff-edit-hunk-commit’) From a hunk, edit the respective commit and visit the file. @@ -3510,7 +3520,7 @@ File: magit.info, Node: Diff Options, Next: Revision Buffer, Prev: Diff Buffe variable ‘magit-diff--tab-width-cache’. Set that to nil to invalidate the cache. - • ‘nil’ Never ajust tab width. Use ‘tab-width’s value from the + • ‘nil’ Never adjust tab width. Use ‘tab-width’s value from the Magit buffer itself instead. • ‘t’ If the corresponding file-visiting buffer exits, then use @@ -3598,23 +3608,33 @@ File: magit.info, Node: Revision Buffer, Prev: Diff Options, Up: Diffing -- User Option: magit-revision-insert-related-refs - Whether to show related refs in revision buffers. + Whether to show related branches in revision buffers. + + • ‘nil’ Don’t show any related branches. + + • ‘t’ Show related local branches. - -- User Option: magit-revision-show-gravatar + • ‘all’ Show related local and remote branches. + + • ‘mixed’ Show all containing branches and local merged + branches. + + -- User Option: magit-revision-show-gravatars Whether to show gravatar images in revision buffers. - If non-nil, then the value has to be a cons-cell which specifies - where the gravatar images for the author and/or the committer are - inserted inside the text that was previously inserted according to - ‘magit-revision-header-format’. + If ‘nil’, then don’t insert any gravatar images. If ‘t’, then + insert both images. If ‘author’ or ‘committer’, then insert only + the respective image. - Both cells are regular expressions. The car specifies where to - insert the author gravatar image. The top half of the image is - inserted right after the matched text, the bottom half on the next - line at the same offset. The cdr specifies where to insert the - committer image, accordingly. Either the car or the cdr may be - nil. + If you have customized the option ‘magit-revision-header-format’ + and want to insert the images then you might also have to specify + where to do so. In that case the value has to be a cons-cell of + two regular expressions. The car specifies where to insert the + author’s image. The top half of the image is inserted right after + the matched text, the bottom half on the next line in the same + column. The cdr specifies where to insert the committer’s image, + accordingly. Either the car or the cdr may be nil." -- User Option: magit-revision-use-hash-sections @@ -3809,7 +3829,7 @@ File: magit.info, Node: References Buffer, Next: Bisecting, Prev: Ediffing, Whether to show the remote prefix in lists of remote branches. Showing the prefix is redundant because the name of the remote is - already shown in the heading preceeding the list of its branches. + already shown in the heading preceding the list of its branches. -- User Option: magit-refs-primary-column-width @@ -4117,7 +4137,7 @@ popup from the file popup, which is available on ‘C-c M-g’, provided ‘magit-file-mode’ is enabled, see *note Minor Mode for Buffers Visiting Files::. - -- Command: magit-blame + -- Command: magit-blame-addition This command augments each line or chunk of lines in the current file- or blob-visiting buffer with information about what commits @@ -4134,9 +4154,9 @@ Files::. -- Command: magit-blame-echo - This command is like ‘magit-blame’ except that it doesn’t turn on - ‘read-only-mode’ and that it initially uses the visualization style - specified by option ‘magit-blame-echo-style’. + This command is like ‘magit-blame-addition’ except that it doesn’t + turn on ‘read-only-mode’ and that it initially uses the + visualization style specified by option ‘magit-blame-echo-style’. -- Command: magit-blame-removal @@ -4144,7 +4164,7 @@ Files::. blob-visiting buffer with information about the revision that removes it. It cannot be used in file-visiting buffers. - Like ‘magit-blame’, this command can be used recursively. + Like ‘magit-blame-addition’, this command can be used recursively. -- Command: magit-blame-reverse @@ -4152,7 +4172,7 @@ Files::. file- or blob-visiting buffer with information about the last revision in which a line still existed. - Like ‘magit-blame’, this command can be used recursively. + Like ‘magit-blame-addition’, this command can be used recursively. The following key bindings are available when Magit-Blame mode is enabled and Read-Only mode is not enabled. These commands are also @@ -4518,7 +4538,7 @@ Also see *note (gitman)git-commit::. This prefix command shows the following suffix commands along with the appropriate infix arguments in a popup buffer. -‘c c’ (‘magit-commit’) +‘c c’ (‘magit-commit-create’) Create a new commit on ‘HEAD’. With a prefix argument amend to the commit at ‘HEAD’ instead. @@ -4869,7 +4889,7 @@ File: magit.info, Node: Branching, Next: Merging, Prev: Committing, Up: Mani * The Two Remotes:: * The Branch Popup:: * The Branch Config Popup:: -* Auxillary Branch Commands:: +* Auxiliary Branch Commands::  File: magit.info, Node: The Two Remotes, Next: The Branch Popup, Up: Branching @@ -4964,7 +4984,7 @@ features are available from separate popups. else then ‘HEAD’ becomes detached. Checkout fails if the working tree or the staging area contain changes. -‘b n’ (‘magit-branch’) +‘b n’ (‘magit-branch-create’) Create a new branch. The user is asked for a branch or arbitrary revision to use as the starting point of the new branch. When a @@ -5292,7 +5312,7 @@ features are available from separate popups. 'magit-branch t)  -File: magit.info, Node: The Branch Config Popup, Next: Auxillary Branch Commands, Prev: The Branch Popup, Up: Branching +File: magit.info, Node: The Branch Config Popup, Next: Auxiliary Branch Commands, Prev: The Branch Popup, Up: Branching 6.5.3 The Branch Config Popup ----------------------------- @@ -5442,27 +5462,27 @@ e.g.: change the upstream and many which create new branches.  -File: magit.info, Node: Auxillary Branch Commands, Prev: The Branch Config Popup, Up: Branching +File: magit.info, Node: Auxiliary Branch Commands, Prev: The Branch Config Popup, Up: Branching -6.5.4 Auxillary Branch Commands +6.5.4 Auxiliary Branch Commands ------------------------------- These commands are not available from the branch popup by default. -- Command: magit-branch-shelve - This command shelve a branch. This is done by deleting the branch, - and creating a new reference "refs/shelved/BRANCH-NAME" pointing at - the same commit as the branch pointed at. If the deleted branch - had a reflog, then that is preserved as the reflog of the new - reference. + This command shelves a branch. This is done by deleting the + branch, and creating a new reference "refs/shelved/BRANCH-NAME" + pointing at the same commit as the branch pointed at. If the + deleted branch had a reflog, then that is preserved as the reflog + of the new reference. This is useful if you want to move a branch out of sight, but are not ready to completely discard it yet. -- Command: magit-branch-unshelve - This command unshelve a branch that was previously shelved using + This command unshelves a branch that was previously shelved using ‘magit-branch-shelve’. This is done by deleting the reference "refs/shelved/BRANCH-NAME" and creating a branch "BRANCH-NAME" pointing at the same commit as the deleted reference pointed at. @@ -5486,7 +5506,7 @@ merge conflicts see the next section. When no merge is in progress, then the popup buffer features the following commands. -‘m m’ (‘magit-merge’) +‘m m’ (‘magit-merge-plain’) This command merges another branch or an arbitrary revision into the current branch. The branch or revision to be merged is read in @@ -5709,7 +5729,7 @@ See *note Information About In-Progress Rebase::. Rebase the current branch onto its upstream branch. -‘r e’ (‘magit-rebase’) +‘r e’ (‘magit-rebase-branch’) Rebase the current branch onto a branch read in the minibuffer. All commits that are reachable from head but not from the selected @@ -6093,7 +6113,7 @@ Also see *note (gitman)git-cherry-pick::. When no cherry-pick or revert is in progress, then the popup buffer features the following commands. -‘A A’ (‘magit-cherry-pick’) +‘A A’ (‘magit-cherry-copy’) This command copies COMMITS from another branch onto the current branch. If the region selects multiple commits, then those are @@ -6197,7 +6217,7 @@ File: magit.info, Node: Reverting, Up: Cherry Picking When no cherry-pick or revert is in progress, then the popup buffer features the following commands. -‘V V’ (‘magit-revert’) +‘V V’ (‘magit-revert-and-commit’) Revert a commit by creating a new commit. Prompt for a commit, defaulting to the commit at point. If the region selects multiple @@ -6234,13 +6254,14 @@ File: magit.info, Node: Resetting, Next: Stashing, Prev: Cherry Picking, Up: Also see *note (gitman)git-reset::. -‘x’ (‘magit-reset’) +‘x’ (‘magit-reset-quickly’) - Reset the head and index to some commit read from the user and - defaulting to the commit at point. The working tree is kept as-is. - With a prefix argument also reset the working tree. + Reset the ‘HEAD’ and index to some commit read from the user and + defaulting to the commit at point, and possibly also reset the + working tree. With a prefix argument reset the working tree + otherwise don’t. -‘X m’ (‘magit-reset-head’) +‘X m’ (‘magit-reset-mixed’) Reset the ‘HEAD’ and index to some commit read from the user and defaulting to the commit at point. The working tree is kept as-is. @@ -6287,7 +6308,7 @@ Also see *note (gitman)git-stash::. This prefix command shows the following suffix commands along with the appropriate infix arguments in a popup buffer. -‘z z’ (‘magit-stash’) +‘z z’ (‘magit-stash-both’) Create a stash of the index and working tree. Untracked files are included according to popup arguments. One prefix argument is @@ -6313,7 +6334,7 @@ Also see *note (gitman)git-stash::. prefix argument is equivalent to ‘--include-untracked’ while two prefix arguments are equivalent to ‘--all’. -‘z Z’ (‘magit-snapshot’) +‘z Z’ (‘magit-snapshot-both’) Create a snapshot of the index and working tree. Untracked files are included according to popup arguments. One prefix argument is @@ -6591,7 +6612,7 @@ _push-remote_, see *note Branching::. Fetch from the upstream of the current branch. -‘f e’ (‘magit-fetch’) +‘f e’ (‘magit-fetch-other’) Fetch from another repository. @@ -6642,7 +6663,7 @@ _push-remote_, see *note Branching::. Pull from the upstream of the current branch. -‘F e’ (‘magit-pull’) +‘F e’ (‘magit-pull-branch’) Pull from a branch read in the minibuffer. @@ -6689,7 +6710,7 @@ _push-remote_, see *note Branching::. Push the current branch to a branch read in the minibuffer. -‘P o’ (‘magit-push’) +‘P o’ (‘magit-push-other’) Push an arbitrary branch or commit somewhere. Both the source and the target are read in the minibuffer. @@ -6875,7 +6896,7 @@ Also see *note (gitman)git-tag::. This prefix command shows the following suffix commands along with the appropriate infix arguments in a popup buffer. -‘t t’ (‘magit-tag’) +‘t t’ (‘magit-tag-create’) Create a new tag with the given NAME at REV. With a prefix argument annotate the tag. @@ -7242,90 +7263,55 @@ tree and not even the index (the staging area). Because Magit makes it so convenient to modify uncommitted changes, it also makes it easy to shoot yourself in the foot in the process. - For that reason Magit provides three global modes that save *tracked* + For that reason Magit provides a global mode that saves *tracked* files to work-in-progress references after or before certain actions. -(Untracked files are never saved and these modes also only work after -the first commit has been created). +(At present untracked files are never saved and for technical reasons +nothing is saved before the first commit has been created). Two separate work-in-progress references are used to track the state -of the index and of the working tree: "refs/wip/index/" and -"refs/wip/wtree/", where ‘’ is the full ref of the -current branch, e.g. "refs/heads/master". When the ‘HEAD’ is detached -then "HEAD" is in place of ‘’. +of the index and of the working tree: ‘refs/wip/index/’ and +‘refs/wip/wtree/’, where ‘’ is the full ref of the +current branch, e.g. ‘refs/heads/master’. When the ‘HEAD’ is detached +then ‘HEAD’ is used in place of ‘’. Checking out another branch (or detaching ‘HEAD’) causes the use of -different wip refs for subsequent changes, but the old refs are not -deleted. - - Creating a commit and then making a change causes the wip refs to be -recreated to fork from the new commit. But the old commits on the wip -refs are not lost. They are still available from the reflog. To make -it easier to see when the fork point of a wip ref was changed, an -additional commit with the message "restart autosaving" is created on it -(‘xxO’ commits below are such boundary commits). - - Starting with - - BI0---BI1 refs/wip/index/refs/heads/master - / - A---B refs/heads/master - \ - BW0---BW1 refs/wip/wtree/refs/heads/master - - and committing the staged changes and editing and saving a file would -result in - - BI0---BI1 refs/wip/index/refs/heads/master - / - A---B---C refs/heads/master - \ \ - \ CW0---CW1 refs/wip/wtree/refs/heads/master - \ - BW0---BW1 refs/wip/wtree/refs/heads/master@{2} +different wip refs for subsequent changes. - The fork-point of the index wip ref is not changed until some change -is being staged. Likewise just checking out a branch or creating a -commit does not change the fork-point of the working tree wip ref. The -fork-points are not adjusted until there actually is a change that -should be committed to the respective wip ref. - - -- User Option: magit-wip-merge-branch + -- User Option: magit-wip-mode - This option controls whether the current branch is merged into the - wip refs after a new commit was created on the branch. If nil - (currently the default), then no merge is perfomed and wip refs are - reset as described above. + When this mode is enabled, then uncommitted changes are committed + to dedicated work-in-progress refs whenever appropriate (i.e. when + dataloss would be a possibility otherwise). - If this is non-nil and the current branch has new commits, then it - is merged into the wip ref before creating a new wip commit. This - makes it easier to inspect wip history and the wip commits are - never garbage collected. + Setting this variable directly does not take effect; either use the + Custom interface to do so or call the respective mode function. - *--*--*--*--*--* refs/wip/index/refs/heads/master - / / / - A-----B-----C refs/heads/master + For historic reasons this mode is implemented on top of four other + ‘magit-wip-*’ modes, which can also be used individually, if you + want finer control over when the wip refs are updated; but that is + discouraged. See *note Legacy Wip Modes::. To view the log for a branch and its wip refs use the commands ‘magit-wip-log’ and ‘magit-wip-log-current’. You should use ‘--graph’ -when using these commands. Alternatively you can use the reflog to show -all commits that ever existed on a wip ref. You can then recover lost -changes from the commits shown in the log or reflog. +when using these commands. -- Command: magit-wip-log - This command shows the log for a branch and its wip refs. + This command shows the log for a branch and its wip refs. With a + negative prefix argument only the worktree wip ref is shown. - With a negative prefix argument only the worktree wip ref is shown. The absolute numeric value of the prefix argument controls how many - "branches" of each wip ref are shown. + "branches" of each wip ref are shown. This is only relevant if the + value of ‘magit-wip-merge-branch’ is ‘nil’. -- Command: magit-wip-log-current This command shows the log for the current branch and its wip refs. - With a negative prefix argument only the worktree wip ref is shown. + The absolute numeric value of the prefix argument controls how many - "branches" of each wip ref are shown. + "branches" of each wip ref are shown. This is only relevant if the + value of ‘magit-wip-merge-branch’ is ‘nil’. ‘X w’ (‘magit-reset-worktree’) @@ -7338,13 +7324,114 @@ changes from the commits shown in the log or reflog. have existed before invoking this command (but of course only after committing that to the working tree wip ref). - There exists a total of three global modes that save to the wip refs, -which might seem excessive, but allows fine tuning of when exactly -changes are being committed to the wip refs. Enabling all modes makes -it less likely that a change slips through the cracks. + Note that even if you enable ‘magit-wip-mode’ this won’t give you +perfect protection. The most likely scenario for losing changes despite +the use of ‘magit-wip-mode’ is making a change outside Emacs and then +destroying it also outside Emacs. In some such a scenario, Magit, being +an Emacs package, didn’t get the opportunity to keep you from shooting +yourself in the foot. + + When you are unsure whether Magit did commit a change to the wip +refs, then you can explicitly request that all changes to all tracked +files are being committed. + +‘M-x magit-wip-commit’ (‘magit-wip-commit’) + + This command commits all changes to all tracked files to the index + and working tree work-in-progress refs. Like the modes described + above, it does not commit untracked files, but it does check all + tracked files for changes. Use this command when you suspect that + the modes might have overlooked a change made outside Emacs/Magit. + + -- User Option: magit-wip-namespace + + The namespace used for work-in-progress refs. It has to end with a + slash. The wip refs are named ‘index/’ and + ‘wtree/’. When snapshots are created while + the ‘HEAD’ is detached then ‘HEAD’ is used in place of + ‘’. + + -- User Option: magit-wip-mode-lighter + + Mode-line lighter for ‘magit-wip--mode’. + +* Menu: + +* Wip Graph:: +* Legacy Wip Modes:: + + +File: magit.info, Node: Wip Graph, Next: Legacy Wip Modes, Up: Wip Modes + +8.7.1 Wip Graph +--------------- + + -- User Option: magit-wip-merge-branch + + This option controls whether the current branch is merged into the + wip refs after a new commit was created on the branch. + + If non-nil and the current branch has new commits, then it is + merged into the wip ref before creating a new wip commit. This + makes it easier to inspect wip history and the wip commits are + never garbage collected. + + If nil and the current branch has new commits, then the wip ref is + reset to the tip of the branch before creating a new wip commit. + With this setting wip commits are eventually garbage collected. + + When ‘magit-wip-merge-branch’ is ‘t’, then the history looks like +this: + + *--*--*--*--*--* refs/wip/index/refs/heads/master + / / / + A-----B-----C refs/heads/master + + When ‘magit-wip-merge-branch’ is ‘nil’, then creating a commit on the +real branch and then making a change causes the wip refs to be recreated +to fork from the new commit. But the old commits on the wip refs are +not lost. They are still available from the reflog. To make it easier +to see when the fork point of a wip ref was changed, an additional +commit with the message "restart autosaving" is created on it (‘xxO’ +commits below are such boundary commits). + + Starting with + + BI0---BI1 refs/wip/index/refs/heads/master + / + A---B refs/heads/master + \ + BW0---BW1 refs/wip/wtree/refs/heads/master + + and committing the staged changes and editing and saving a file would +result in + + BI0---BI1 refs/wip/index/refs/heads/master + / + A---B---C refs/heads/master + \ \ + \ CW0---CW1 refs/wip/wtree/refs/heads/master + \ + BW0---BW1 refs/wip/wtree/refs/heads/master@{2} + + The fork-point of the index wip ref is not changed until some change +is being staged. Likewise just checking out a branch or creating a +commit does not change the fork-point of the working tree wip ref. The +fork-points are not adjusted until there actually is a change that +should be committed to the respective wip ref. + + +File: magit.info, Node: Legacy Wip Modes, Prev: Wip Graph, Up: Wip Modes + +8.7.2 Legacy Wip Modes +---------------------- + +It is recommended that you use the mode ‘magit-wip-mode’ (which see) and +ignore the existence of the following modes, which are preserved for +historic reasons. Setting the following variables directly does not take effect; either -customize them or call the respective mode function. +use the Custom interface to do so or call the respective mode functions. -- User Option: magit-wip-after-save-mode @@ -7363,50 +7450,30 @@ customize them or call the respective mode function. If you only ever edit files using Emacs and only ever interact with Git using Magit, then the above two modes should be enough to protect each and every change from accidental loss. In practice nobody does -that. So an additional mode exists that does commit to the wip refs -before making changes that could cause the loss of earlier changes. +that. Two additional modes exists that do commit to the wip refs before +making changes that could cause the loss of earlier changes. -- User Option: magit-wip-before-change-mode When this mode is enabled, then certain commands commit the existing changes to the files they are about to make changes to. - -- Function: magit-wip-commit-initial-backup - - Adding this function to ‘before-save-hook’ causes the current - version of the file to be committed to the worktree wip ref before - the modifications in the buffer are saved. It backs up the same - version of the file as ‘backup-buffer’ would but, instead of using - a backup file as ‘backup-buffer’ would, it uses the same worktree - wip ref as used by the various Magit Wip modes. Like - ‘backup-buffer’, it only does this once; unless you kill the buffer - and visit the file again only one backup will be created per Emacs - session. - - This function ignores the variables that affect ‘backup-buffer’ and - can be used along-side that function, which is recommended because - this function only backs up files that are tracked in a Git - repository. - - Note that even if you enable all three modes and add the above -function to the intended hook, this won’t give you perfect protection. -The most likely scenario for losing changes despite the use of these -modes is making a change outside Emacs and then destroying it also -outside Emacs. In some such a scenario, Magit, being an Emacs package, -didn’t get the opportunity to keep you from shooting yourself in the -foot. + -- User Option: magit-wip-initial-backup-mode - When you are unsure whether Magit did commit a change to the wip -refs, then you can explicitly request that all changes to all tracked -files are being committed. + When this mode is enabled, then the current version of a file is + committed to the worktree wip ref before the buffer visiting that + file is saved for the first time since the buffer was created. -‘M-x magit-wip-commit’ (‘magit-wip-commit’) + This backs up the same version of the file that ‘backup-buffer’ + would save. While ‘backup-buffer’ uses a backup file, this mode + uses the same worktree wip ref as used by the other Magit Wip + modes. Like ‘backup-buffer’, it only does this once; unless you + kill the buffer and visit the file again only one backup will be + created per Emacs session. - This command commits all changes to all tracked files to the index - and working tree work-in-progress refs. Like the modes described - above, it does not commit untracked files, but it does check all - tracked files for changes. Use this command when you suspect that - the modes might have overlooked a change made outside Emacs/Magit. + This mode ignores the variables that affect ‘backup-buffer’ and can + be used along-side that function, which is recommended because it + only backs up files that are tracked in a Git repository. -- User Option: magit-wip-after-save-local-mode-lighter @@ -7420,13 +7487,9 @@ files are being committed. Mode-line lighter for ‘magit-wip-before-change-mode’. - -- User Option: magit-wip-namespace + -- User Option: magit-wip-initial-backup-mode-lighter - The namespace used for work-in-progress refs. It has to end with a - slash. The wip refs are named "index/" and - "wtree/". When snapshots are created while - the ‘HEAD’ is detached then "HEAD" is used in place of - ‘’. + Mode-line lighter for ‘magit-wip-initial-backup-mode’.  File: magit.info, Node: Minor Mode for Buffers Visiting Files, Next: Minor Mode for Buffers Visiting Blobs, Prev: Wip Modes, Up: Miscellaneous @@ -7514,7 +7577,7 @@ few key bindings, but this might be extended in the future. appropriate infix arguments in a popup buffer. See *note Blaming::. -‘C-c M-g b’ (‘magit-blame’) +‘C-c M-g b’ (‘magit-blame-addition’) This command shows for each line the revision in which it was added. diff --git a/elpa/magit-20180828.1055/magit.info-2 b/elpa/magit-20181110.1820/magit.info-2 similarity index 96% rename from elpa/magit-20180828.1055/magit.info-2 rename to elpa/magit-20181110.1820/magit.info-2 index eaf8ba31..18585bb4 100644 --- a/elpa/magit-20180828.1055/magit.info-2 +++ b/elpa/magit-20181110.1820/magit.info-2 @@ -11,6 +11,7 @@ This is magit.info, produced by makeinfo version 6.5 from magit.texi. but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + INFO-DIR-SECTION Emacs START-INFO-DIR-ENTRY * Magit: (magit). Using Git from Emacs with Magit. @@ -482,35 +483,39 @@ File: magit.info, Node: Section Selection, Next: Matching Sections, Prev: Cre Return the section at point. - -- Function: magit-region-sections + -- Function: magit-region-sections &optional condition multiple Return a list of the selected sections. When the region is active and constitutes a valid section selection, then return a list of all selected sections. This is the case when the region begins in the heading of a section and - ends in the heading of a sibling of that first section. When the - selection is not valid then return nil. Most commands that can act - on the selected sections, then instead just act on the current - section, the one point is in. + ends in the heading of the same section or in that of a sibling + section. If optional MULTIPLE is non-nil, then the region cannot + begin and end in the same section. + + When the selection is not valid, then return nil. In this case, + most commands that can act on the selected sections will instead + act on the section at point. When the region looks like it would in any other buffer then the selection is invalid. When the selection is valid then the region - uses the ‘magit-section-highlight’. This does not apply to diffs - where things get a bit more complicated, but even here if the + uses the ‘magit-section-highlight’ face. This does not apply to + diffs where things get a bit more complicated, but even here if the region looks like it usually does, then that’s not a valid selection as far as this function is concerned. - -- Function: magit-region-values &rest types + If optional CONDITION is non-nil, then the selection not only has + to be valid; all selected sections additionally have to match + CONDITION, or nil is returned. See ‘magit-section-match’ for the + forms CONDITION can take. + + -- Function: magit-region-values &optional condition multiple Return a list of the values of the selected sections. - Also see ‘magit-region-sections’ whose doc-string explains when a - region is a valid section selection. If the region is not active - or is not a valid section selection, then return nil. If optional - TYPES is non-nil then the selection not only has to be valid; the - types of all selected sections additionally have to match one of - TYPES, or nil is returned. + Return the values that themselves would be returned by + ‘magit-region-sections’ (which see).  File: magit.info, Node: Matching Sections, Prev: Section Selection, Up: Section Plumbing @@ -523,12 +528,12 @@ File: magit.info, Node: Matching Sections, Prev: Section Selection, Up: Secti Show information about the section at point. This command is intended for debugging purposes. - -- Function: magit-section-ident + -- Function: magit-section-ident section Return an unique identifier for SECTION. The return value has the form ‘((TYPE . VALUE)...)’. - -- Function: magit-get-section + -- Function: magit-get-section ident &optional root Return the section identified by IDENT. IDENT has to be a list as returned by ‘magit-section-ident’. @@ -544,35 +549,42 @@ File: magit.info, Node: Matching Sections, Prev: Section Selection, Up: Secti matches if any of the CONDITIONs matches. - • ‘[TYPE...]’ + • ‘[CLASS...]’ - matches if the first TYPE matches the type of the section, the - second matches that of its parent, and so on. + matches if the section’s class is the same as the first CLASS + or a subclass of that; the section’s parent class matches the + second CLASS; and so on. - • ‘[* TYPE...]’ + • ‘[* CLASS...]’ - matches sections that match [TYPE...] and also recursively all - their child sections. + matches sections that match ‘[CLASS...]’ and also recursively + all their child sections. - • ‘TYPE’ + • ‘CLASS’ - matches sections of TYPE regardless of the types of the parent + matches if the section’s class is the same as CLASS or a + subclass of that; regardless of the classes of the parent sections. - Each TYPE is a symbol. Note that it is not necessary to specify - all TYPEs up to the root section as printed by - ‘magit-describe-type’, unless of course you want to be that - precise. + Each CLASS should be a class symbol, identifying a class that + derives from ‘magit-section’. For backward compatibility CLASS can + also be a "type symbol". A section matches such a symbol if the + value of its ‘type’ slot is ‘eq’. If a type symbol has an entry in + ‘magit--section-type-alist’, then a section also matches that type + if its class is a subclass of the class that corresponds to the + type as per that alist. - -- Function: magit-section-when condition &rest body + Note that it is not necessary to specify the complete section + lineage as printed by ‘magit-describe-section-briefly’, unless of + course you want to be that precise. - If the section at point matches CONDITION evaluate BODY. + -- Function: magit-section-value-if condition &optional section - If the section matches, then evaluate BODY forms sequentially with - ‘it’ bound to the section and return the value of the last form. - If there are no BODY forms, then return the value of the section. - If the section does not match or if there is no section at point - then return nil. + If the section at point matches CONDITION, then return its value. + + If optional SECTION is non-nil then test whether that matches + instead. If there is no section at point and SECTION is nil, then + return nil. If the section does not match, then return nil. See ‘magit-section-match’ for the forms CONDITION can take. @@ -1086,13 +1098,13 @@ A.2.6 Diffs contain control sequences This happens when you configure Git to always color diffs and/or all of its output. The valid values for relevant Git variables ‘color.ui’ and ‘color.diff’ are ‘false’, ‘true’ and ‘always’, and the default is -‘true’. You should leave it that because then you get colorful output -in terminals but git’s output is consumed by something else, then no -colors are used. +‘true’. You should leave it that way because then you get colorful +output in terminals by default but when git’s output is consumed by +something else, then no color control sequences are used. - If you actually use some other tool which expects that requires that -you force git to output control sequences (which is highly unlikely), -then you can override these settings just for Magit by using: + If you actually use some other tool that requires setting ‘color.ui’ +and/or ‘color.diff’ to ‘always’ (which is highly unlikely), then you can +override these settings just for Magit by using: (setq magit-git-global-arguments (nconc magit-git-global-arguments @@ -1275,7 +1287,7 @@ issue. Please include all relevant output when reporting an issue. ‘M-x magit-emacs-Q-command’ (‘magit-emacs-Q-command’) This command shows a debugging shell command in the echo area and - adds it to the kill ring. Paste that command into a shell an run + adds it to the kill ring. Paste that command into a shell and run it. This shell command starts ‘emacs’ with only ‘magit’ and its @@ -1297,9 +1309,9 @@ issue. Please include all relevant output when reporting an issue. ‘M-x with-editor-debug’ (‘with-editor-debug’) This command displays a buffer containing information about the - available and used ‘git’ executable(s), and can be useful when - investigating why Magit (or rather ‘with-editor’) cannot find an - appropriate ‘emacsclient’ executable. + available and used ‘~emacsclient’ executable(s), and can be useful + when investigating why Magit (or rather ‘with-editor’) cannot find + an appropriate ‘emacsclient’ executable. Also see *note (with-editor)Debugging::. @@ -1410,7 +1422,7 @@ Appendix C Keystroke Index * C-c C-d: Refreshing Diffs. (line 80) * C-c C-d <1>: Editing Commit Messages. (line 57) -* C-c C-e: Diff Buffer. (line 74) +* C-c C-e: Diff Buffer. (line 80) * C-c C-f: Log Buffer. (line 23) * C-c C-f <1>: Refreshing Diffs. (line 94) * C-c C-i: Editing Commit Messages. @@ -1488,7 +1500,7 @@ Appendix C Keystroke Index * d w: Diffing. (line 43) * D w: Refreshing Diffs. (line 28) * DEL: Log Buffer. (line 43) -* DEL <1>: Diff Buffer. (line 103) +* DEL <1>: Diff Buffer. (line 109) * DEL <2>: Blaming. (line 73) * DEL <3>: Editing Rebase Sequences. (line 28) @@ -1522,7 +1534,7 @@ Appendix C Keystroke Index (line 22) * G: Automatic Refreshing of Magit Buffers. (line 31) -* j: Diff Buffer. (line 93) +* j: Diff Buffer. (line 99) * k: Viewing Git Output. (line 24) * k <1>: Applying. (line 40) * k <2>: Editing Rebase Sequences. @@ -1604,7 +1616,7 @@ Appendix C Keystroke Index (line 18) * M-x magit-version: Git Executable. (line 17) * M-x magit-version <1>: Debugging Tools. (line 10) -* M-x magit-wip-commit: Wip Modes. (line 174) +* M-x magit-wip-commit: Wip Modes. (line 88) * M-x with-editor-debug: Debugging Tools. (line 38) * n: Section Movement. (line 16) * n <1>: Blaming. (line 91) @@ -1679,7 +1691,7 @@ Appendix C Keystroke Index (line 59) * S-: Section Visibility. (line 22) * SPC: Log Buffer. (line 33) -* SPC <1>: Diff Buffer. (line 99) +* SPC <1>: Diff Buffer. (line 105) * SPC <2>: Blaming. (line 63) * SPC <3>: Editing Rebase Sequences. (line 21) @@ -1723,13 +1735,13 @@ Appendix C Keystroke Index * x: Editing Rebase Sequences. (line 76) * x <1>: Resetting. (line 8) -* X f: Resetting. (line 43) -* X h: Resetting. (line 25) -* X i: Resetting. (line 30) -* X m: Resetting. (line 14) -* X s: Resetting. (line 19) -* X w: Resetting. (line 37) -* X w <1>: Wip Modes. (line 101) +* X f: Resetting. (line 44) +* X h: Resetting. (line 26) +* X i: Resetting. (line 31) +* X m: Resetting. (line 15) +* X s: Resetting. (line 20) +* X w: Resetting. (line 38) +* X w <1>: Wip Modes. (line 66) * Y: Cherries. (line 17) * y: References Buffer. (line 6) * y <1>: Editing Rebase Sequences. @@ -1832,8 +1844,8 @@ Appendix D Command Index * magit-bisect-run: Bisecting. (line 24) * magit-bisect-skip: Bisecting. (line 41) * magit-bisect-start: Bisecting. (line 16) -* magit-blame: Blaming. (line 17) -* magit-blame <1>: Minor Mode for Buffers Visiting Files. +* magit-blame-addition: Blaming. (line 17) +* magit-blame-addition <1>: Minor Mode for Buffers Visiting Files. (line 86) * magit-blame-copy-hash: Blaming. (line 112) * magit-blame-cycle-style: Blaming. (line 120) @@ -1858,12 +1870,12 @@ Appendix D Command Index (line 112) * magit-blob-previous <1>: Minor Mode for Buffers Visiting Blobs. (line 12) -* magit-branch: The Branch Popup. (line 45) * magit-branch-and-checkout: The Branch Popup. (line 55) * magit-branch-checkout: The Branch Popup. (line 62) * magit-branch-config-popup: The Branch Popup. (line 29) * magit-branch-config-popup <1>: The Branch Config Popup. (line 6) +* magit-branch-create: The Branch Popup. (line 45) * magit-branch-delete: The Branch Popup. (line 240) * magit-branch-or-checkout: The Branch Popup. (line 350) * magit-branch-orphan: The Branch Popup. (line 345) @@ -1871,25 +1883,25 @@ Appendix D Command Index * magit-branch-pull-request: The Branch Popup. (line 113) * magit-branch-rename: The Branch Popup. (line 246) * magit-branch-reset: The Branch Popup. (line 224) -* magit-branch-shelve: Auxillary Branch Commands. +* magit-branch-shelve: Auxiliary Branch Commands. (line 8) * magit-branch-spinoff: The Branch Popup. (line 85) -* magit-branch-unshelve: Auxillary Branch Commands. +* magit-branch-unshelve: Auxiliary Branch Commands. (line 19) * magit-checkout: The Branch Popup. (line 37) * magit-checkout-pull-request: The Branch Popup. (line 218) * magit-cherry: Cherries. (line 17) * magit-cherry-apply: Cherry Picking. (line 23) +* magit-cherry-copy: Cherry Picking. (line 16) * magit-cherry-donate: Cherry Picking. (line 53) * magit-cherry-harvest: Cherry Picking. (line 41) -* magit-cherry-pick: Cherry Picking. (line 16) * magit-cherry-pick-popup: Cherry Picking. (line 8) * magit-cherry-spinoff: Cherry Picking. (line 75) * magit-cherry-spinout: Cherry Picking. (line 64) * magit-clone: Repository Setup. (line 16) -* magit-commit: Initiating a Commit. (line 13) * magit-commit-amend: Initiating a Commit. (line 18) * magit-commit-augment: Initiating a Commit. (line 66) +* magit-commit-create: Initiating a Commit. (line 13) * magit-commit-extend: Initiating a Commit. (line 22) * magit-commit-fixup: Initiating a Commit. (line 42) * magit-commit-instant-fixup: Initiating a Commit. (line 50) @@ -1907,19 +1919,19 @@ Appendix D Command Index * magit-describe-section-briefly: Section Types and Values. (line 13) * magit-describe-section-briefly <1>: Matching Sections. (line 6) -* magit-diff: Diffing. (line 29) * magit-diff-buffer-file: Minor Mode for Buffers Visiting Files. (line 47) * magit-diff-buffer-file-popup: Minor Mode for Buffers Visiting Files. (line 39) * magit-diff-default-context: Refreshing Diffs. (line 72) * magit-diff-dwim: Diffing. (line 25) -* magit-diff-edit-hunk-commit: Diff Buffer. (line 74) +* magit-diff-edit-hunk-commit: Diff Buffer. (line 80) * magit-diff-flip-revs: Refreshing Diffs. (line 45) * magit-diff-less-context: Refreshing Diffs. (line 64) * magit-diff-more-context: Refreshing Diffs. (line 68) * magit-diff-paths: Diffing. (line 59) * magit-diff-popup: Diffing. (line 20) +* magit-diff-range: Diffing. (line 29) * magit-diff-refresh: Refreshing Diffs. (line 16) * magit-diff-refresh-popup: Refreshing Diffs. (line 11) * magit-diff-save-default-arguments: Refreshing Diffs. (line 28) @@ -1957,15 +1969,15 @@ Appendix D Command Index * magit-edit-line-commit: Minor Mode for Buffers Visiting Files. (line 102) * magit-emacs-Q-command: Debugging Tools. (line 16) -* magit-fetch: Fetching. (line 24) * magit-fetch-all: Fetching. (line 38) * magit-fetch-branch: Fetching. (line 28) * magit-fetch-from-pushremote: Fetching. (line 16) * magit-fetch-from-upstream: Fetching. (line 20) * magit-fetch-modules: Submodule Popup. (line 57) +* magit-fetch-other: Fetching. (line 24) * magit-fetch-popup: Fetching. (line 11) * magit-fetch-refspec: Fetching. (line 33) -* magit-file-checkout: Resetting. (line 43) +* magit-file-checkout: Resetting. (line 44) * magit-file-checkout <1>: Minor Mode for Buffers Visiting Files. (line 131) * magit-file-delete: Minor Mode for Buffers Visiting Files. @@ -1989,13 +2001,12 @@ Appendix D Command Index * magit-go-forward: Log Buffer. (line 23) * magit-go-forward <1>: Refreshing Diffs. (line 94) * magit-init: Repository Setup. (line 6) -* magit-jump-to-diffstat-or-diff: Diff Buffer. (line 93) +* magit-jump-to-diffstat-or-diff: Diff Buffer. (line 99) * magit-kill-this-buffer: Minor Mode for Buffers Visiting Blobs. (line 20) * magit-list-repositories: Repository List. (line 6) * magit-list-submodules: Listing Submodules. (line 13) * magit-list-submodules <1>: Submodule Popup. (line 53) -* magit-log: Logging. (line 39) * magit-log-all: Logging. (line 58) * magit-log-all-branches: Logging. (line 54) * magit-log-branches: Logging. (line 50) @@ -2009,6 +2020,7 @@ Appendix D Command Index * magit-log-half-commit-limit: Log Buffer. (line 63) * magit-log-head: Logging. (line 46) * magit-log-move-to-parent: Log Buffer. (line 27) +* magit-log-other: Logging. (line 39) * magit-log-popup: Logging. (line 28) * magit-log-refresh: Refreshing Logs. (line 16) * magit-log-refresh-popup: Refreshing Logs. (line 11) @@ -2021,13 +2033,13 @@ Appendix D Command Index * magit-log-trace-definition: Minor Mode for Buffers Visiting Files. (line 71) * magit-margin-popup: Log Margin. (line 47) -* magit-merge: Merging. (line 17) -* magit-merge <1>: Merging. (line 88) +* magit-merge: Merging. (line 88) * magit-merge-abort: Merging. (line 94) * magit-merge-absorb: Merging. (line 44) * magit-merge-editmsg: Merging. (line 30) * magit-merge-into: Merging. (line 57) * magit-merge-nocommit: Merging. (line 37) +* magit-merge-plain: Merging. (line 17) * magit-merge-popup: Merging. (line 9) * magit-merge-preview: Merging. (line 80) * magit-merge-squash: Merging. (line 71) @@ -2047,24 +2059,24 @@ Appendix D Command Index (line 63) * magit-process: Viewing Git Output. (line 16) * magit-process-kill: Viewing Git Output. (line 24) -* magit-pull: Pulling. (line 24) +* magit-pull-branch: Pulling. (line 24) * magit-pull-from-pushremote: Pulling. (line 16) * magit-pull-from-upstream: Pulling. (line 20) * magit-pull-popup: Pulling. (line 11) -* magit-push: Pushing. (line 39) * magit-push-current: Pushing. (line 35) * magit-push-current-to-pushremote: Pushing. (line 16) * magit-push-current-to-upstream: Pushing. (line 26) * magit-push-implicitly args: Pushing. (line 73) * magit-push-matching: Pushing. (line 53) +* magit-push-other: Pushing. (line 39) * magit-push-popup: Pushing. (line 11) * magit-push-refspecs: Pushing. (line 44) * magit-push-tag: Pushing. (line 65) * magit-push-tags: Pushing. (line 59) * magit-push-to-remote remote args: Pushing. (line 84) -* magit-rebase: Rebasing. (line 33) * magit-rebase-abort: Rebasing. (line 107) * magit-rebase-autosquash: Rebasing. (line 73) +* magit-rebase-branch: Rebasing. (line 33) * magit-rebase-continue: Rebasing. (line 92) * magit-rebase-edit: Rebasing. (line 103) * magit-rebase-edit-commit: Rebasing. (line 77) @@ -2095,19 +2107,19 @@ Appendix D Command Index * magit-remote-set-url: The Remote Popup. (line 45) * magit-request-pull: Creating and Sending Patches. (line 17) -* magit-reset: Resetting. (line 8) -* magit-reset-hard: Resetting. (line 25) -* magit-reset-head: Resetting. (line 14) +* magit-reset-hard: Resetting. (line 26) * magit-reset-index: Staging and Unstaging. (line 87) -* magit-reset-index <1>: Resetting. (line 30) -* magit-reset-soft: Resetting. (line 19) -* magit-reset-worktree: Resetting. (line 37) -* magit-reset-worktree <1>: Wip Modes. (line 101) +* magit-reset-index <1>: Resetting. (line 31) +* magit-reset-mixed: Resetting. (line 15) +* magit-reset-quickly: Resetting. (line 8) +* magit-reset-soft: Resetting. (line 20) +* magit-reset-worktree: Resetting. (line 38) +* magit-reset-worktree <1>: Wip Modes. (line 66) * magit-reverse: Applying. (line 44) * magit-reverse-in-index: Staging and Unstaging. (line 62) -* magit-revert: Reverting. (line 14) +* magit-revert-and-commit: Reverting. (line 14) * magit-revert-no-commit: Reverting. (line 20) * magit-revert-popup: Reverting. (line 6) * magit-run-git-gui: Running Git Manually. @@ -2159,7 +2171,7 @@ Appendix D Command Index * magit-show-refs-current: References Buffer. (line 19) * magit-show-refs-head: References Buffer. (line 14) * magit-show-refs-popup: References Buffer. (line 6) -* magit-snapshot: Stashing. (line 39) +* magit-snapshot-both: Stashing. (line 39) * magit-snapshot-index: Stashing. (line 46) * magit-snapshot-worktree: Stashing. (line 51) * magit-stage: Staging and Unstaging. @@ -2170,8 +2182,8 @@ Appendix D Command Index (line 24) * magit-stage-modified: Staging and Unstaging. (line 36) -* magit-stash: Stashing. (line 13) * magit-stash-apply: Stashing. (line 58) +* magit-stash-both: Stashing. (line 13) * magit-stash-branch: Stashing. (line 80) * magit-stash-branch-here: Stashing. (line 85) * magit-stash-clear: Stashing. (line 95) @@ -2200,7 +2212,7 @@ Appendix D Command Index * magit-subtree-pull: Subtree. (line 32) * magit-subtree-push: Subtree. (line 36) * magit-subtree-split: Subtree. (line 41) -* magit-tag: Tagging. (line 13) +* magit-tag-create: Tagging. (line 13) * magit-tag-delete: Tagging. (line 18) * magit-tag-popup: Tagging. (line 8) * magit-tag-prune: Tagging. (line 24) @@ -2221,17 +2233,17 @@ Appendix D Command Index * magit-version: Git Executable. (line 17) * magit-version <1>: Debugging Tools. (line 10) * magit-visit-ref: References Buffer. (line 166) -* magit-wip-commit: Wip Modes. (line 174) -* magit-wip-log: Wip Modes. (line 85) -* magit-wip-log-current: Wip Modes. (line 93) +* magit-wip-commit: Wip Modes. (line 88) +* magit-wip-log: Wip Modes. (line 48) +* magit-wip-log-current: Wip Modes. (line 57) * magit-worktree-branch: Worktree. (line 17) * magit-worktree-checkout: Worktree. (line 13) * magit-worktree-checkout-pull-request: Worktree. (line 21) * magit-worktree-delete: Worktree. (line 28) * magit-worktree-popup: Worktree. (line 8) * magit-worktree-status: Worktree. (line 33) -* scroll-down: Diff Buffer. (line 103) -* scroll-up: Diff Buffer. (line 99) +* scroll-down: Diff Buffer. (line 109) +* scroll-up: Diff Buffer. (line 105) * with-editor-cancel: Editing Commit Messages. (line 24) * with-editor-cancel <1>: Editing Rebase Sequences. @@ -2269,7 +2281,7 @@ Appendix E Function Index * magit-add-section-hook: Section Hooks. (line 20) * magit-after-save-refresh-status: Automatic Refreshing of Magit Buffers. (line 56) -* magit-blame: Blaming. (line 17) +* magit-blame-addition: Blaming. (line 17) * magit-blame-echo: Blaming. (line 32) * magit-blame-removal: Blaming. (line 38) * magit-blame-reverse: Blaming. (line 46) @@ -2277,9 +2289,9 @@ Appendix E Function Index (line 6) * magit-branch-or-checkout: The Branch Popup. (line 350) * magit-branch-orphan: The Branch Popup. (line 345) -* magit-branch-shelve: Auxillary Branch Commands. +* magit-branch-shelve: Auxiliary Branch Commands. (line 8) -* magit-branch-unshelve: Auxillary Branch Commands. +* magit-branch-unshelve: Auxiliary Branch Commands. (line 19) * magit-builtin-completing-read: Support for Completion Frameworks. (line 42) @@ -2292,8 +2304,8 @@ Appendix E Function Index (line 60) * magit-current-section: Section Selection. (line 6) * magit-define-section-jumper: Creating Sections. (line 77) -* magit-diff-scope: Matching Sections. (line 111) -* magit-diff-type: Matching Sections. (line 88) +* magit-diff-scope: Matching Sections. (line 118) +* magit-diff-type: Matching Sections. (line 95) * magit-diff-visit-file-other-window: Diff Buffer. (line 65) * magit-display-buffer: Switching Buffers. (line 6) * magit-display-buffer-fullcolumn-most-v1: Switching Buffers. (line 72) @@ -2413,7 +2425,7 @@ Appendix E Function Index * magit-push-implicitly: Pushing. (line 73) * magit-push-to-remote: Pushing. (line 84) * magit-region-sections: Section Selection. (line 10) -* magit-region-values: Section Selection. (line 29) +* magit-region-values: Section Selection. (line 37) * magit-remote-config-popup: The Remote Config Popup. (line 6) * magit-repolist-column-ident: Repository List. (line 30) @@ -2441,7 +2453,7 @@ Appendix E Function Index * magit-run-git-with-logfile: Calling Git for Effect. (line 56) * magit-save-window-configuration: Switching Buffers. (line 86) -* magit-section-case: Matching Sections. (line 64) +* magit-section-case: Matching Sections. (line 71) * magit-section-hide: Section Visibility. (line 49) * magit-section-hide-children: Section Visibility. (line 64) * magit-section-ident: Matching Sections. (line 11) @@ -2451,7 +2463,7 @@ Appendix E Function Index * magit-section-show-children: Section Visibility. (line 58) * magit-section-show-headings: Section Visibility. (line 53) * magit-section-toggle-children: Section Visibility. (line 68) -* magit-section-when: Matching Sections. (line 52) +* magit-section-value-if: Matching Sections. (line 61) * magit-start-git: Calling Git for Effect. (line 105) * magit-start-process: Calling Git for Effect. @@ -2460,9 +2472,8 @@ Appendix E Function Index * magit-status-maybe-update-revision-buffer: Section Movement. (line 77) * magit-tag-release: Tagging. (line 28) -* magit-wip-commit-initial-backup: Wip Modes. (line 145) -* magit-wip-log: Wip Modes. (line 85) -* magit-wip-log-current: Wip Modes. (line 93) +* magit-wip-log: Wip Modes. (line 48) +* magit-wip-log-current: Wip Modes. (line 57) * with-editor-usage-message: Editing Commit Messages. (line 215) @@ -2586,6 +2597,7 @@ Appendix F Variable Index * magit-log-section-commit-count: Status Sections. (line 120) * magit-log-select-margin: Select from Log. (line 30) * magit-log-show-refname-after-summary: Log Buffer. (line 73) +* magit-log-trace-definition-function: Diff Buffer. (line 74) * magit-module-sections-hook: Status Module Sections. (line 20) * magit-module-sections-nested: Status Module Sections. @@ -2622,9 +2634,9 @@ Appendix F Variable Index * magit-repository-directories: Status Buffer. (line 30) * magit-repository-directories-depth: Status Buffer. (line 40) * magit-revision-insert-related-refs: Revision Buffer. (line 6) -* magit-revision-show-gravatar: Revision Buffer. (line 10) -* magit-revision-use-hash-sections: Revision Buffer. (line 26) -* magit-root-section: Matching Sections. (line 80) +* magit-revision-show-gravatars: Revision Buffer. (line 19) +* magit-revision-use-hash-sections: Revision Buffer. (line 36) +* magit-root-section: Matching Sections. (line 87) * magit-save-repository-buffers: Automatic Saving of File-Visiting Buffers. (line 13) * magit-section-cache-visibility: Section Visibility. (line 95) @@ -2650,14 +2662,18 @@ Appendix F Variable Index * magit-use-sticky-arguments: Popup Buffers and Prefix Commands. (line 36) * magit-visit-ref-behavior: References Buffer. (line 177) -* magit-wip-after-apply-mode: Wip Modes. (line 126) -* magit-wip-after-apply-mode-lighter: Wip Modes. (line 186) -* magit-wip-after-save-local-mode-lighter: Wip Modes. (line 182) -* magit-wip-after-save-mode: Wip Modes. (line 120) -* magit-wip-before-change-mode: Wip Modes. (line 140) -* magit-wip-before-change-mode-lighter: Wip Modes. (line 190) -* magit-wip-merge-branch: Wip Modes. (line 63) -* magit-wip-namespace: Wip Modes. (line 194) +* magit-wip-after-apply-mode: Legacy Wip Modes. (line 19) +* magit-wip-after-apply-mode-lighter: Legacy Wip Modes. (line 59) +* magit-wip-after-save-local-mode-lighter: Legacy Wip Modes. (line 55) +* magit-wip-after-save-mode: Legacy Wip Modes. (line 13) +* magit-wip-before-change-mode: Legacy Wip Modes. (line 33) +* magit-wip-before-change-mode-lighter: Legacy Wip Modes. (line 63) +* magit-wip-initial-backup-mode: Legacy Wip Modes. (line 38) +* magit-wip-initial-backup-mode-lighter: Legacy Wip Modes. (line 67) +* magit-wip-merge-branch: Wip Graph. (line 6) +* magit-wip-mode: Wip Modes. (line 30) +* magit-wip-mode-lighter: Wip Modes. (line 104) +* magit-wip-namespace: Wip Modes. (line 96) * notes.displayRef: Notes. (line 64) * pull.rebase: The Branch Config Popup. (line 70) diff --git a/elpa/magit-gitflow-20170929.124/magit-gitflow-pkg.el b/elpa/magit-gitflow-20170929.124/magit-gitflow-pkg.el deleted file mode 100644 index ac187030..00000000 --- a/elpa/magit-gitflow-20170929.124/magit-gitflow-pkg.el +++ /dev/null @@ -1,2 +0,0 @@ -;;; -*- no-byte-compile: t -*- -(define-package "magit-gitflow" "20170929.124" "gitflow extension for magit" '((magit "2.1.0") (magit-popup "2.2.0")) :commit "cc41b561ec6eea947fe9a176349fb4f771ed865b" :url "https://github.com/jtatarik/magit-gitflow" :keywords '("vc" "tools")) diff --git a/elpa/magit-gitflow-20170929.124/magit-gitflow-autoloads.el b/elpa/magit-gitflow-20170929.824/magit-gitflow-autoloads.el similarity index 54% rename from elpa/magit-gitflow-20170929.124/magit-gitflow-autoloads.el rename to elpa/magit-gitflow-20170929.824/magit-gitflow-autoloads.el index 2bfad37e..905a75bc 100644 --- a/elpa/magit-gitflow-20170929.124/magit-gitflow-autoloads.el +++ b/elpa/magit-gitflow-20170929.824/magit-gitflow-autoloads.el @@ -1,10 +1,12 @@ ;;; magit-gitflow-autoloads.el --- automatically extracted autoloads ;; ;;; 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 "magit-gitflow" "magit-gitflow.el" (23053 36961 -;;;;;; 0 0)) +;;;### (autoloads nil "magit-gitflow" "magit-gitflow.el" (0 0 0 0)) ;;; Generated autoloads from magit-gitflow.el (autoload 'turn-on-magit-gitflow "magit-gitflow" "\ @@ -12,11 +14,14 @@ Unconditionally turn on `magit-gitflow-mode'. \(fn)" nil nil) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "magit-gitflow" '("magit-" "define-magit-gitflow-"))) + ;;;*** ;; Local Variables: ;; version-control: never ;; no-byte-compile: t ;; no-update-autoloads: t +;; coding: utf-8 ;; End: ;;; magit-gitflow-autoloads.el ends here diff --git a/elpa/magit-gitflow-20170929.824/magit-gitflow-pkg.el b/elpa/magit-gitflow-20170929.824/magit-gitflow-pkg.el new file mode 100644 index 00000000..1ad305e4 --- /dev/null +++ b/elpa/magit-gitflow-20170929.824/magit-gitflow-pkg.el @@ -0,0 +1,2 @@ +;;; -*- no-byte-compile: t -*- +(define-package "magit-gitflow" "20170929.824" "gitflow extension for magit" '((magit "2.1.0") (magit-popup "2.2.0")) :commit "cc41b561ec6eea947fe9a176349fb4f771ed865b" :keywords '("vc" "tools") :authors '(("Jan Tatarik" . "Jan.Tatarik@gmail.com")) :maintainer '("Jan Tatarik" . "Jan.Tatarik@gmail.com") :url "https://github.com/jtatarik/magit-gitflow") diff --git a/elpa/magit-gitflow-20170929.124/magit-gitflow.el b/elpa/magit-gitflow-20170929.824/magit-gitflow.el similarity index 99% rename from elpa/magit-gitflow-20170929.124/magit-gitflow.el rename to elpa/magit-gitflow-20170929.824/magit-gitflow.el index 758a1298..3f91f06e 100644 --- a/elpa/magit-gitflow-20170929.124/magit-gitflow.el +++ b/elpa/magit-gitflow-20170929.824/magit-gitflow.el @@ -4,7 +4,7 @@ ;; Author: Jan Tatarik ;; Keywords: vc tools -;; Package-Version: 20170929.124 +;; Package-Version: 20170929.824 ;; URL: https://github.com/jtatarik/magit-gitflow ;; Package: magit-gitflow ;; Package-Requires: ((magit "2.1.0") (magit-popup "2.2.0")) -- 2.47.3