update packages
This commit is contained in:
@@ -119,13 +119,8 @@ displays the text of `magit-process-error-summary' instead."
|
||||
"\\`\\(?:\\(?:/.*/\\)?git-credential-\\)?cache\\'" prog)
|
||||
(or (cadr (member "--socket" args))
|
||||
(expand-file-name "~/.git-credential-cache/socket")))))
|
||||
;; Note: `magit-process-file' is not yet defined when
|
||||
;; evaluating this form, so we use `process-lines'.
|
||||
(ignore-errors
|
||||
(let ((process-environment
|
||||
(append magit-git-environment process-environment)))
|
||||
(process-lines magit-git-executable
|
||||
"config" "--get-all" "credential.helper"))))
|
||||
(magit--early-process-lines
|
||||
magit-git-executable "config" "--get-all" "credential.helper"))
|
||||
"If non-nil, start a credential cache daemon using this socket.
|
||||
|
||||
When using Git's cache credential helper in the normal way, Emacs
|
||||
@@ -529,12 +524,26 @@ eol conversion."
|
||||
(default-process-coding-system (magit--process-coding-system)))
|
||||
(apply #'process-file process infile buffer display args)))
|
||||
|
||||
(defvar magit--shadowed-githook-directory nil)
|
||||
|
||||
(defun magit--shadowed-githook-directory ()
|
||||
(or magit--shadowed-githook-directory
|
||||
(setq magit--shadowed-githook-directory
|
||||
(let ((magit-git-global-arguments nil))
|
||||
(cl-letf (((symbol-function 'magit-process-environment)
|
||||
(lambda () process-environment)))
|
||||
(or (magit-get "core.hooksPath")
|
||||
(expand-file-name "hooks" (magit-gitdir))))))))
|
||||
|
||||
(defun magit-process-environment ()
|
||||
;; The various w32 hacks are only applicable when running on the local
|
||||
;; machine. A local binding of process-environment different from the
|
||||
;; top-level value affects the environment used by Tramp.
|
||||
(let ((local (not (file-remote-p default-directory))))
|
||||
(append magit-git-environment
|
||||
(and magit-overriding-githook-directory
|
||||
(list (concat "SHADOWED_GITHOOK_DIRECTORY="
|
||||
(magit--shadowed-githook-directory))))
|
||||
(and local
|
||||
(cdr (assoc magit-git-executable magit-git-w32-path-hack)))
|
||||
(and local magit-need-cygwin-noglob
|
||||
@@ -574,7 +583,7 @@ flattened before use."
|
||||
(run-hooks 'magit-pre-call-git-hook)
|
||||
(pcase-let* ((process-environment (magit-process-environment))
|
||||
(default-process-coding-system (magit--process-coding-system))
|
||||
(flat-args (magit-process-git-arguments args))
|
||||
(flat-args (magit-process-git-arguments args t))
|
||||
(`(,process-buf . ,section)
|
||||
(magit-process-setup (magit-git-executable) flat-args))
|
||||
(inhibit-read-only t))
|
||||
@@ -657,7 +666,7 @@ See `magit-start-process' for more information."
|
||||
(run-hooks 'magit-pre-start-git-hook)
|
||||
(let ((default-process-coding-system (magit--process-coding-system)))
|
||||
(apply #'magit-start-process (magit-git-executable) input
|
||||
(magit-process-git-arguments args))))
|
||||
(magit-process-git-arguments args t))))
|
||||
|
||||
(defun magit-start-process (program &optional input &rest args)
|
||||
"Start PROGRAM, prepare for refresh, and return the process object.
|
||||
@@ -730,7 +739,7 @@ Magit status buffer."
|
||||
process))
|
||||
|
||||
(defun magit-parse-git-async (&rest args)
|
||||
(setq args (magit-process-git-arguments args))
|
||||
(setq args (magit-process-git-arguments args t))
|
||||
(let ((command-buf (current-buffer))
|
||||
(stdout-buf (generate-new-buffer " *git-stdout*"))
|
||||
(stderr-buf (generate-new-buffer " *git-stderr*"))
|
||||
@@ -797,7 +806,7 @@ Magit status buffer."
|
||||
(defun magit-process--format-arguments (program args)
|
||||
(cond
|
||||
((and args (equal program (magit-git-executable)))
|
||||
(let ((global (length magit-git-global-arguments)))
|
||||
(let ((global (magit-process-git-arguments--length)))
|
||||
(concat
|
||||
(propertize (file-name-nondirectory program)
|
||||
'font-lock-face 'magit-section-heading)
|
||||
@@ -869,7 +878,7 @@ Magit status buffer."
|
||||
`((commit . ,(magit-rev-parse "HEAD"))
|
||||
(,(pcase (car (seq-drop
|
||||
(process-command process)
|
||||
(1+ (length magit-git-global-arguments))))
|
||||
(1+ (magit-process-git-arguments--length))))
|
||||
((or "rebase" "am") 'rebase-sequence)
|
||||
((or "cherry-pick" "revert") 'sequence)))
|
||||
(status)))))
|
||||
@@ -1106,7 +1115,7 @@ as argument."
|
||||
(defun magit-process-set-mode-line (program args)
|
||||
"Display the git command (sans arguments) in the mode line."
|
||||
(when (equal program (magit-git-executable))
|
||||
(setq args (nthcdr (length magit-git-global-arguments) args)))
|
||||
(setq args (nthcdr (magit-process-git-arguments--length) args)))
|
||||
(let ((str (concat " " (propertize
|
||||
(concat (file-name-nondirectory program)
|
||||
(and args (concat " " (car args))))
|
||||
|
||||
Reference in New Issue
Block a user