update packages
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
;;; magit-remote.el --- transfer Git commits -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2008-2021 The Magit Project Contributors
|
||||
;; Copyright (C) 2008-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.
|
||||
@@ -8,6 +8,8 @@
|
||||
;; 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
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
@@ -85,7 +87,8 @@ has to be used to view and change remote related variables."
|
||||
("k" "Remove" magit-remote-remove)]
|
||||
[("C" "Configure..." magit-remote-configure)
|
||||
("p" "Prune stale branches" magit-remote-prune)
|
||||
("P" "Prune stale refspecs" magit-remote-prune-refspecs)]]
|
||||
("P" "Prune stale refspecs" magit-remote-prune-refspecs)
|
||||
(7 "z" "Unshallow remote" magit-remote-unshallow)]]
|
||||
(interactive (list (magit-get-current-remote)))
|
||||
(transient-setup 'magit-remote nil nil :scope remote))
|
||||
|
||||
@@ -255,6 +258,24 @@ Delete the symbolic-ref \"refs/remotes/<remote>/HEAD\"."
|
||||
(interactive (list (magit-read-remote "Unset HEAD for remote")))
|
||||
(magit-run-git "remote" "set-head" remote "--delete"))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-remote-unshallow (remote)
|
||||
"Convert a shallow remote into a full one.
|
||||
If only a single refspec is set and it does not contain a
|
||||
wildcard, then also offer to replace it with the standard
|
||||
refspec."
|
||||
(interactive (list (or (magit-get-current-remote)
|
||||
(magit-read-remote "Delete remote"))))
|
||||
(let ((refspecs (magit-get-all "remote" remote "fetch"))
|
||||
(standard (format "+refs/heads/*:refs/remotes/%s/*" remote)))
|
||||
(when (and (= (length refspecs) 1)
|
||||
(not (string-match-p "\\*" (car refspecs)))
|
||||
(yes-or-no-p (format "Also replace refspec %s with %s? "
|
||||
(car refspecs)
|
||||
standard)))
|
||||
(magit-set standard "remote" remote "fetch"))
|
||||
(magit-git-fetch "--unshallow" remote)))
|
||||
|
||||
;;; Configure
|
||||
|
||||
;;;###autoload (autoload 'magit-remote-configure "magit-remote" nil t)
|
||||
|
||||
Reference in New Issue
Block a user