pkg update and first config fix
org-brain not working, add org-roam
This commit is contained in:
@@ -1,19 +1,16 @@
|
||||
;;; magit-branch.el --- branch support -*- lexical-binding: t -*-
|
||||
;;; magit-branch.el --- Branch support -*- lexical-binding:t -*-
|
||||
|
||||
;; Copyright (C) 2010-2022 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.
|
||||
;; Copyright (C) 2008-2022 The Magit Project Contributors
|
||||
|
||||
;; Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
;; Magit is free software; you can redistribute it and/or modify it
|
||||
;; 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.
|
||||
;; the Free Software Foundation, either version 3 of the License, 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
|
||||
@@ -21,7 +18,7 @@
|
||||
;; 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.
|
||||
;; along with Magit. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
@@ -554,7 +551,7 @@ defaulting to the branch at point."
|
||||
(interactive
|
||||
(let ((branches (magit-region-values 'branch t))
|
||||
(force current-prefix-arg))
|
||||
(if (> (length branches) 1)
|
||||
(if (length> branches 1)
|
||||
(magit-confirm t nil "Delete %i branches" nil branches)
|
||||
(setq branches
|
||||
(list (magit-read-branch-prefer-other
|
||||
@@ -605,22 +602,22 @@ defaulting to the branch at point."
|
||||
;; If that is not the case, then this deletes the tracking branches.
|
||||
(set-process-sentinel
|
||||
magit-this-process
|
||||
(apply-partially 'magit-delete-remote-branch-sentinel remote refs)))
|
||||
(apply-partially #'magit-delete-remote-branch-sentinel remote refs)))
|
||||
(t
|
||||
(dolist (ref refs)
|
||||
(message "Delete %s (was %s)" ref
|
||||
(magit-rev-parse "--short" ref))
|
||||
(magit-call-git "update-ref" "-d" ref))
|
||||
(magit-refresh)))))
|
||||
((> (length branches) 1)
|
||||
((length> branches 1)
|
||||
(setq branches (delete (magit-get-current-branch) branches))
|
||||
(mapc 'magit-branch-maybe-delete-pr-remote branches)
|
||||
(mapc 'magit-branch-unset-pushRemote branches)
|
||||
(mapc #'magit-branch-maybe-delete-pr-remote branches)
|
||||
(mapc #'magit-branch-unset-pushRemote branches)
|
||||
(magit-run-git "branch" (if force "-D" "-d") branches))
|
||||
(t ; And now for something completely different.
|
||||
(let* ((branch (car branches))
|
||||
(prompt (format "Branch %s is checked out. " branch))
|
||||
(target (magit-get-upstream-branch)))
|
||||
(target (magit-get-indirect-upstream-branch branch t)))
|
||||
(when (equal branch (magit-get-current-branch))
|
||||
(when (or (equal branch target)
|
||||
(not target))
|
||||
@@ -673,7 +670,7 @@ defaulting to the branch at point."
|
||||
(format "+refs/heads/%s:refs/remotes/%s/%s"
|
||||
merge remote merge))))))
|
||||
(when (member refspec refspecs)
|
||||
(if (and (= (length refspecs) 1)
|
||||
(if (and (length= refspecs 1)
|
||||
(magit-confirm 'delete-pr-remote
|
||||
(format "Also delete remote %s (%s)" remote
|
||||
"no pull-request branch remains")
|
||||
@@ -847,7 +844,7 @@ and also rename the respective reflog file."
|
||||
(interactive (list (oref transient-current-prefix scope)))
|
||||
(magit-run-git-with-editor "branch" "--edit-description" branch))
|
||||
|
||||
(add-hook 'find-file-hook 'magit-branch-description-check-buffers)
|
||||
(add-hook 'find-file-hook #'magit-branch-description-check-buffers)
|
||||
|
||||
(defun magit-branch-description-check-buffers ()
|
||||
(and buffer-file-name
|
||||
@@ -860,9 +857,9 @@ and also rename the respective reflog file."
|
||||
:class 'magit--git-branch:upstream)
|
||||
|
||||
(cl-defmethod transient-init-value ((obj magit--git-branch:upstream))
|
||||
(when-let ((branch (oref transient--prefix scope))
|
||||
(remote (magit-get "branch" branch "remote"))
|
||||
(merge (magit-get "branch" branch "merge")))
|
||||
(when-let* ((branch (oref transient--prefix scope))
|
||||
(remote (magit-get "branch" branch "remote"))
|
||||
(merge (magit-get "branch" branch "merge")))
|
||||
(oset obj value (list remote merge))))
|
||||
|
||||
(cl-defmethod transient-infix-read ((obj magit--git-branch:upstream))
|
||||
@@ -873,10 +870,10 @@ and also rename the respective reflog file."
|
||||
(cl-defmethod transient-infix-set ((obj magit--git-branch:upstream) refname)
|
||||
(magit-set-upstream-branch (oref transient--prefix scope) refname)
|
||||
(oset obj value
|
||||
(let ((branch (oref transient--prefix scope)))
|
||||
(when-let ((r (magit-get "branch" branch "remote"))
|
||||
(m (magit-get "branch" branch "merge")))
|
||||
(list r m))))
|
||||
(and-let* ((branch (oref transient--prefix scope))
|
||||
(r (magit-get "branch" branch "remote"))
|
||||
(m (magit-get "branch" branch "merge")))
|
||||
(list r m)))
|
||||
(magit-refresh))
|
||||
|
||||
(cl-defmethod transient-format ((obj magit--git-branch:upstream))
|
||||
@@ -896,7 +893,7 @@ and also rename the respective reflog file."
|
||||
|
||||
(transient-define-infix magit-branch.<branch>.rebase ()
|
||||
:class 'magit--git-variable:choices
|
||||
:scope 'magit--read-branch-scope
|
||||
:scope #'magit--read-branch-scope
|
||||
:variable "branch.%s.rebase"
|
||||
:fallback "pull.rebase"
|
||||
:choices '("true" "false")
|
||||
@@ -904,10 +901,10 @@ and also rename the respective reflog file."
|
||||
|
||||
(transient-define-infix magit-branch.<branch>.pushRemote ()
|
||||
:class 'magit--git-variable:choices
|
||||
:scope 'magit--read-branch-scope
|
||||
:scope #'magit--read-branch-scope
|
||||
:variable "branch.%s.pushRemote"
|
||||
:fallback "remote.pushDefault"
|
||||
:choices 'magit-list-remotes)
|
||||
:choices #'magit-list-remotes)
|
||||
|
||||
(transient-define-infix magit-pull.rebase ()
|
||||
:class 'magit--git-variable:choices
|
||||
@@ -918,7 +915,7 @@ and also rename the respective reflog file."
|
||||
(transient-define-infix magit-remote.pushDefault ()
|
||||
:class 'magit--git-variable:choices
|
||||
:variable "remote.pushDefault"
|
||||
:choices 'magit-list-remotes)
|
||||
:choices #'magit-list-remotes)
|
||||
|
||||
(transient-define-infix magit-branch.autoSetupMerge ()
|
||||
:class 'magit--git-variable:choices
|
||||
|
||||
Reference in New Issue
Block a user