From 7b6e50ba03ca40efa614e525dc202a9711337cde Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Tue, 3 Aug 2021 17:56:57 +0200 Subject: [PATCH] update magit --- elpa/magit-20210128.1702/magit-pkg.el | 16 - elpa/magit-20210128.1702/magit.info | 195 ------------ .../AUTHORS.md | 17 +- .../LICENSE | 26 +- .../dir | 0 .../git-rebase.el | 6 +- .../magit-apply.el | 27 +- .../magit-autoloads.el | 53 ++-- .../magit-autorevert.el | 2 + .../magit-bisect.el | 17 +- .../magit-blame.el | 39 +-- .../magit-bookmark.el | 11 +- .../magit-branch.el | 99 ++++-- .../magit-clone.el | 12 +- .../magit-commit.el | 87 ++++-- .../magit-core.el | 2 + .../magit-diff.el | 189 ++++++++---- .../magit-ediff.el | 229 ++++++-------- .../magit-extras.el | 62 ++-- .../magit-fetch.el | 2 + .../magit-files.el | 35 ++- .../magit-git.el | 208 +++++++++---- .../magit-gitignore.el | 8 +- .../magit-imenu.el | 2 + .../magit-log.el | 120 +++++--- .../magit-margin.el | 2 + .../magit-merge.el | 4 +- .../magit-mode.el | 55 ++-- .../magit-notes.el | 14 +- .../magit-obsolete.el | 5 + .../magit-patch.el | 2 + elpa/magit-20210802.1524/magit-pkg.el | 18 ++ .../magit-process.el | 103 +++++-- .../magit-pull.el | 2 + .../magit-push.el | 25 +- .../magit-reflog.el | 2 + .../magit-refs.el | 20 +- .../magit-remote.el | 2 + .../magit-repos.el | 145 +++++---- .../magit-reset.el | 2 + .../magit-sequence.el | 45 +-- .../magit-stash.el | 12 +- .../magit-status.el | 28 +- .../magit-submodule.el | 82 +++-- .../magit-subtree.el | 2 + .../magit-tag.el | 4 +- .../magit-transient.el | 3 +- .../magit-utils.el | 264 ++++++++-------- .../magit-wip.el | 2 + .../magit-worktree.el | 2 + .../magit.el | 62 ++-- elpa/magit-20210802.1524/magit.info | 201 ++++++++++++ .../magit.info-1 | 231 +++++++------- .../magit.info-2 | 277 ++++++++++++----- elpa/magit-section-20210801.1004/dir | 19 ++ .../magit-section-autoloads.el | 26 ++ .../magit-section-pkg.el | 13 + .../magit-section.el | 86 +++++- .../magit-section.info | 289 ++++++++++++++++++ 59 files changed, 2288 insertions(+), 1225 deletions(-) delete mode 100644 elpa/magit-20210128.1702/magit-pkg.el delete mode 100644 elpa/magit-20210128.1702/magit.info rename elpa/{magit-20210128.1702 => magit-20210802.1524}/AUTHORS.md (95%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/LICENSE (98%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/dir (100%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/git-rebase.el (99%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-apply.el (97%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-autoloads.el (98%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-autorevert.el (99%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-bisect.el (95%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-blame.el (96%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-bookmark.el (93%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-branch.el (92%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-clone.el (96%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-commit.el (89%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-core.el (98%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-diff.el (95%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-ediff.el (72%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-extras.el (93%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-fetch.el (99%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-files.el (95%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-git.el (93%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-gitignore.el (96%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-imenu.el (99%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-log.el (95%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-margin.el (99%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-merge.el (99%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-mode.el (96%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-notes.el (94%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-obsolete.el (96%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-patch.el (99%) create mode 100644 elpa/magit-20210802.1524/magit-pkg.el rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-process.el (93%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-pull.el (99%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-push.el (95%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-reflog.el (99%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-refs.el (97%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-remote.el (99%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-repos.el (73%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-reset.el (99%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-sequence.el (97%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-stash.el (98%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-status.el (97%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-submodule.el (92%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-subtree.el (99%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-tag.el (99%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-transient.el (99%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-utils.el (87%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-wip.el (99%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit-worktree.el (99%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit.el (92%) create mode 100644 elpa/magit-20210802.1524/magit.info rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit.info-1 (98%) rename elpa/{magit-20210128.1702 => magit-20210802.1524}/magit.info-2 (96%) create mode 100644 elpa/magit-section-20210801.1004/dir create mode 100644 elpa/magit-section-20210801.1004/magit-section-autoloads.el create mode 100644 elpa/magit-section-20210801.1004/magit-section-pkg.el rename elpa/{magit-20210128.1702 => magit-section-20210801.1004}/magit-section.el (97%) create mode 100644 elpa/magit-section-20210801.1004/magit-section.info diff --git a/elpa/magit-20210128.1702/magit-pkg.el b/elpa/magit-20210128.1702/magit-pkg.el deleted file mode 100644 index f0ce4c77..00000000 --- a/elpa/magit-20210128.1702/magit-pkg.el +++ /dev/null @@ -1,16 +0,0 @@ -(define-package "magit" "20210128.1702" "A Git porcelain inside Emacs." - '((emacs "25.1") - (dash "20200524") - (git-commit "20200516") - (transient "20200601") - (with-editor "20200522")) - :commit "e80eff30d24337a75e07f6d2c154f7d82f140d28" :authors - '(("Marius Vollmer" . "marius.vollmer@gmail.com")) - :maintainer - '("Jonas Bernoulli" . "jonas@bernoul.li") - :keywords - '("git" "tools" "vc") - :url "https://github.com/magit/magit") -;; Local Variables: -;; no-byte-compile: t -;; End: diff --git a/elpa/magit-20210128.1702/magit.info b/elpa/magit-20210128.1702/magit.info deleted file mode 100644 index 3477bfd8..00000000 --- a/elpa/magit-20210128.1702/magit.info +++ /dev/null @@ -1,195 +0,0 @@ -This is magit.info, produced by makeinfo version 6.5 from magit.texi. - - Copyright (C) 2015-2021 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: 301131 - -Tag Table: -(Indirect) -Node: Top754 -Node: Introduction6512 -Node: Installation11235 -Node: Installing from Melpa11565 -Node: Installing from the Git Repository12638 -Node: Post-Installation Tasks15370 -Node: Getting Started16655 -Node: Interface Concepts21895 -Node: Modes and Buffers22256 -Node: Switching Buffers24005 -Node: Naming Buffers28756 -Node: Quitting Windows32063 -Node: Automatic Refreshing of Magit Buffers33809 -Node: Automatic Saving of File-Visiting Buffers36661 -Node: Automatic Reverting of File-Visiting Buffers37846 -Node: Risk of Reverting Automatically42841 -Node: Sections45223 -Node: Section Movement46149 -Node: Section Visibility51059 -Node: Section Hooks57136 -Node: Section Types and Values59543 -Node: Section Options60846 -Node: Transient Commands61318 -Node: Transient Arguments and Buffer Variables62555 -Node: Completion Confirmation and the Selection69573 -Node: Action Confirmation70017 -Node: Completion and Confirmation77833 -Node: The Selection81019 -Node: The hunk-internal region83918 -Node: Support for Completion Frameworks85007 -Node: Additional Completion Options89914 -Node: Running Git90513 -Node: Viewing Git Output90786 -Node: Git Process Status91919 -Node: Running Git Manually92884 -Node: Git Executable95354 -Node: Global Git Arguments97636 -Node: Inspecting98442 -Node: Status Buffer99599 -Node: Status Sections103589 -Node: Status Header Sections109141 -Node: Status Module Sections111771 -Node: Status Options114276 -Node: Repository List115745 -Node: Logging118783 -Node: Refreshing Logs121344 -Node: Log Buffer122790 -Node: Log Margin126646 -Node: Select from Log129825 -Node: Reflog132050 -Node: Cherries133707 -Node: Diffing135555 -Node: Refreshing Diffs138634 -Node: Commands Available in Diffs142213 -Node: Diff Options144749 -Node: Revision Buffer150230 -Node: Ediffing153560 -Node: References Buffer157208 -Node: References Sections167728 -Node: Bisecting168589 -Node: Visiting Files and Blobs170941 -Node: General-Purpose Visit Commands171411 -Node: Visiting Files and Blobs from a Diff172367 -Node: Blaming175826 -Node: Manipulating182167 -Node: Creating Repository182509 -Node: Cloning Repository183064 -Node: Staging and Unstaging188469 -Node: Staging from File-Visiting Buffers192552 -Node: Applying193720 -Node: Committing195613 -Node: Initiating a Commit196196 -Node: Editing Commit Messages199581 -Node: Using the Revision Stack202384 -Node: Commit Pseudo Headers205435 -Node: Commit Mode and Hooks206771 -Node: Commit Message Conventions209709 -Node: Branching211837 -Node: The Two Remotes212063 -Node: Branch Commands214716 -Node: Branch Git Variables227097 -Node: Auxiliary Branch Commands232488 -Node: Merging233606 -Node: Resolving Conflicts237614 -Node: Rebasing242615 -Node: Editing Rebase Sequences247474 -Node: Information About In-Progress Rebase251802 -Ref: Information About In-Progress Rebase-Footnote-1260684 -Node: Cherry Picking261280 -Node: Reverting265611 -Node: Resetting267060 -Node: Stashing268926 -Node: Transferring273627 -Node: Remotes273849 -Node: Remote Commands274001 -Node: Remote Git Variables278082 -Node: Fetching279361 -Node: Pulling281848 -Node: Pushing282894 -Node: Plain Patches286647 -Node: Maildir Patches288138 -Node: Miscellaneous289652 -Node: Tagging289966 -Node: Notes291883 -Node: Submodules294255 -Node: Listing Submodules294473 -Node: Submodule Transient295879 -Node: Subtree298401 -Node: Worktree301131 -Node: Common Commands302236 -Node: Wip Modes304359 -Node: Wip Graph309290 -Node: Legacy Wip Modes311604 -Node: Commands for Buffers Visiting Files314499 -Node: Minor Mode for Buffers Visiting Blobs320121 -Node: Customizing320932 -Node: Per-Repository Configuration322528 -Node: Essential Settings324783 -Node: Safety325128 -Node: Performance326889 -Node: Microsoft Windows Performance334057 -Node: MacOS Performance335248 -Ref: MacOS Performance-Footnote-1336425 -Node: Default Bindings336507 -Node: Plumbing338362 -Node: Calling Git339191 -Node: Getting a Value from Git340716 -Node: Calling Git for Effect343802 -Node: Section Plumbing350079 -Node: Creating Sections350307 -Node: Section Selection354207 -Node: Matching Sections356006 -Node: Refreshing Buffers361979 -Node: Conventions365127 -Node: Theming Faces365319 -Node: FAQ373434 -Node: FAQ - How to ...?373876 -Node: How to pronounce Magit?374289 -Node: How to show git's output?375091 -Node: How to install the gitman info manual?375877 -Node: How to show diffs for gpg-encrypted files?376847 -Node: How does branching and pushing work?377443 -Node: Can Magit be used as ediff-version-control-package?377806 -Node: Should I disable VC?379824 -Node: FAQ - Issues and Errors380442 -Node: Magit is slow381338 -Node: I changed several thousand files at once and now Magit is unusable381552 -Node: I am having problems committing382281 -Node: I am using MS Windows and cannot push with Magit382762 -Node: I am using OS X and SOMETHING works in shell but not in Magit383379 -Node: Expanding a file to show the diff causes it to disappear384210 -Node: Point is wrong in the COMMIT_EDITMSG buffer384791 -Node: The mode-line information isn't always up-to-date385837 -Node: A branch and tag sharing the same name breaks SOMETHING386900 -Node: My Git hooks work on the command-line but not inside Magit387786 -Node: git-commit-mode isn't used when committing from the command-line388632 -Node: Point ends up inside invisible text when jumping to a file-visiting buffer390903 -Node: Debugging Tools391701 -Node: Keystroke Index393880 -Node: Command Index427986 -Node: Function Index465125 -Node: Variable Index481396 - -End Tag Table - - -Local Variables: -coding: utf-8 -End: diff --git a/elpa/magit-20210128.1702/AUTHORS.md b/elpa/magit-20210802.1524/AUTHORS.md similarity index 95% rename from elpa/magit-20210128.1702/AUTHORS.md rename to elpa/magit-20210802.1524/AUTHORS.md index f80e262f..7f70f7a6 100644 --- a/elpa/magit-20210128.1702/AUTHORS.md +++ b/elpa/magit-20210802.1524/AUTHORS.md @@ -57,7 +57,6 @@ Contributors - Alexey Voinov - Alex Kost - Alex Ott -- Allen - Allen Li - Andreas Fuchs - Andreas Liljeqvist @@ -65,6 +64,7 @@ Contributors - Andrei Chițu - Andrew Eggenberger - Andrew Kirkpatrick +- Andrew Psaltis - Andrew Schwartzmeyer - Andrey Smirnov - Andriy Kmit' @@ -72,6 +72,7 @@ Contributors - Aria Edmonds - Arialdo Martini - Arnau Roig Ninerola +- Ashlynn Anderson - Barak A. Pearlmutter - Bar Magal - Bart Bakker @@ -108,6 +109,7 @@ Contributors - Dan Erikson - Daniel Brockman - Daniel Farina +- Daniel Fleischer - Daniel Gröber - Daniel Hackney - Daniel Kraus @@ -118,7 +120,6 @@ Contributors - Dato Simó - David Abrahams - David Ellison -- David Ellison - David Hull - David L. Rager - David Wallin @@ -126,7 +127,6 @@ Contributors - Dennis Paskorz - Divye Kapoor - Dominique Quatravaux -- Dominique Quatravaux - Duianto Vebotci - Eli Barzilay - Eric Davis @@ -158,6 +158,8 @@ Contributors - Hussein Ait-Lahcen - Ian Eure - Ian Milligan +- Ilya Grigoriev +- Ingmar Sittl - Ingo Lohmar - Ioan-Adrian Ratiu - Ivan Brennan @@ -228,6 +230,8 @@ Contributors - Mark Hepburn - Mark Karpov - Mark Oteiza +- Martin Joerg +- Martin Polden - Matthew Fluet - Matthew Kraai - Matthieu Hauglustaine @@ -256,10 +260,12 @@ Contributors - Nikolay Martynov - Noam Postavsky - N. Troy de Freitas +- Ola x Nilsson - Ole Arndt - Oleh Krehel - Orivej Desh - Óscar Fuentes +- Pancho Horrillo - Paul Stadig - Pavel Holejsovsky - Pekka Pessi @@ -267,6 +273,7 @@ Contributors - Peter Jaros - Peter J. Weisberg - Peter Vasil +- Philippe Cavalaria - Philippe Vaucher - Philipp Fehre - Philipp Haselwarter @@ -277,6 +284,7 @@ Contributors - Pierre Neidhardt - Pieter Praet - Prathamesh Sonpatki +- Pritam Baral - rabio - Radon Rosborough - Rafael Laboissiere @@ -296,6 +304,7 @@ Contributors - Rüdiger Sonderfeld - Russell Black - Ryan C. Thompson +- Sam Cedarbaum - Samuel Bronson - Samuel W. Flint - Sanjoy Das @@ -308,6 +317,7 @@ Contributors - Sergey Pashinin - Sergey Vinokurov - Servilio Afre Puentes +- Siavash Askari Nasr - Silent Sphere - Simon Pintarelli - Štěpán Němec @@ -322,6 +332,7 @@ Contributors - Szunti - Takafumi Arakaki - Tassilo Horn +- TEC - Teemu Likonen - Teruki Shigitani - Thierry Volpiatto diff --git a/elpa/magit-20210128.1702/LICENSE b/elpa/magit-20210802.1524/LICENSE similarity index 98% rename from elpa/magit-20210128.1702/LICENSE rename to elpa/magit-20210802.1524/LICENSE index 44325404..f288702d 100644 --- a/elpa/magit-20210128.1702/LICENSE +++ b/elpa/magit-20210802.1524/LICENSE @@ -1,12 +1,11 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - Preamble + Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. @@ -69,7 +68,7 @@ patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. - TERMS AND CONDITIONS + TERMS AND CONDITIONS 0. Definitions. @@ -77,7 +76,7 @@ modification follow. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. - + "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. @@ -510,7 +509,7 @@ actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. - + If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties @@ -619,9 +618,9 @@ an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. - END OF TERMS AND CONDITIONS + END OF TERMS AND CONDITIONS - How to Apply These Terms to Your New Programs + How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it @@ -646,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found. GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . + along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. @@ -665,12 +664,11 @@ might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see -. +. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read -. - +. diff --git a/elpa/magit-20210128.1702/dir b/elpa/magit-20210802.1524/dir similarity index 100% rename from elpa/magit-20210128.1702/dir rename to elpa/magit-20210802.1524/dir diff --git a/elpa/magit-20210128.1702/git-rebase.el b/elpa/magit-20210802.1524/git-rebase.el similarity index 99% rename from elpa/magit-20210128.1702/git-rebase.el rename to elpa/magit-20210802.1524/git-rebase.el index 2268084e..6a8a7775 100644 --- a/elpa/magit-20210128.1702/git-rebase.el +++ b/elpa/magit-20210802.1524/git-rebase.el @@ -8,7 +8,7 @@ ;; Author: Phil Jackson ;; Maintainer: Jonas Bernoulli -;; This file is not part of GNU Emacs. +;; SPDX-License-Identifier: GPL-3.0-or-later ;; This file is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -818,8 +818,8 @@ By default, this is the same except for the \"pick\" command." (add-to-list 'with-editor-server-window-alist (cons git-rebase-filename-regexp 'switch-to-buffer)) -(eval-after-load 'recentf - '(add-to-list 'recentf-exclude git-rebase-filename-regexp)) +(with-eval-after-load 'recentf + (add-to-list 'recentf-exclude git-rebase-filename-regexp)) (add-to-list 'with-editor-file-name-history-exclude git-rebase-filename-regexp) diff --git a/elpa/magit-20210128.1702/magit-apply.el b/elpa/magit-20210802.1524/magit-apply.el similarity index 97% rename from elpa/magit-20210128.1702/magit-apply.el rename to elpa/magit-20210802.1524/magit-apply.el index 127b5839..1feeddf3 100644 --- a/elpa/magit-20210128.1702/magit-apply.el +++ b/elpa/magit-20210802.1524/magit-apply.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) @@ -175,7 +177,7 @@ adjusted as \"@@ -10,6 +10,7 @@\" and \"@@ -18,6 +19,7 @@\"." (offset (if (string-match diff-hunk-header-re-unified first-hunk) (- (string-to-number (match-string 3 first-hunk)) (string-to-number (match-string 1 first-hunk))) - (error "Hunk does not have expected header")))) + (error "Header hunks have to be applied individually")))) (if (= offset 0) hunks (mapcar (lambda (hunk) @@ -205,10 +207,15 @@ adjusted as \"@@ -10,6 +10,7 @@\" and \"@@ -18,6 +19,7 @@\"." (defun magit-apply-hunk (section &rest args) (when (string-match "^diff --cc" (magit-section-parent-value section)) (user-error "Cannot un-/stage resolution hunks. Stage the whole file")) - (magit-apply-patch (oref section parent) args - (concat (magit-diff-file-header section) - (magit-apply--adjust-hunk-new-start - (magit-apply--section-content section))))) + (let* ((header (car (oref section value))) + (header (and (symbolp header) header)) + (content (magit-apply--section-content section))) + (magit-apply-patch + (oref section parent) args + (concat (magit-diff-file-header section (not (eq header 'rename))) + (if header + content + (magit-apply--adjust-hunk-new-start content)))))) (defun magit-apply-region (section &rest args) (when (string-match "^diff --cc" (magit-section-parent-value section)) @@ -229,7 +236,7 @@ adjusted as \"@@ -10,6 +10,7 @@\" and \"@@ -18,6 +19,7 @@\"." (ignore-context (magit-diff-ignore-any-space-p))) (unless (magit-diff-context-p) (user-error "Not enough context to apply patch. Increase the context")) - (when (and magit-wip-before-change-mode (not inhibit-magit-refresh)) + (when (and magit-wip-before-change-mode (not magit-inhibit-refresh)) (magit-wip-commit-before-change files (concat " before " command))) (with-temp-buffer (insert patch) @@ -237,7 +244,7 @@ adjusted as \"@@ -10,6 +10,7 @@\" and \"@@ -18,6 +19,7 @@\"." "apply" args "-p0" (and ignore-context "-C0") "--ignore-space-change" "-")) - (unless inhibit-magit-refresh + (unless magit-inhibit-refresh (when magit-wip-after-apply-mode (magit-wip-commit-after-apply files (concat " after " command))) (magit-refresh)))) @@ -480,7 +487,7 @@ without requiring confirmation." nil (if (magit-file-section-p section) (oref section value) (magit-section-parent-value section))) - (progn (let ((inhibit-magit-refresh t)) + (progn (let ((magit-inhibit-refresh t)) (funcall apply section "--reverse" "--cached") (funcall apply section "--reverse" "--reject")) (magit-refresh)) @@ -500,7 +507,7 @@ without requiring confirmation." nil (if (magit-file-section-p section) (oref section value) (magit-section-parent-value section))) - (progn (let ((inhibit-magit-refresh t)) + (progn (let ((magit-inhibit-refresh t)) (funcall apply sections "--reverse" "--cached") (funcall apply sections "--reverse" "--reject")) (magit-refresh)) @@ -538,7 +545,7 @@ without requiring confirmation." (`(?Y ,_ ?D ) (push file resurrect)) (`(?X ?R ,(or ? ?M ?D)) (push file rename))))) (unwind-protect - (let ((inhibit-magit-refresh t)) + (let ((magit-inhibit-refresh t)) (magit-wip-commit-before-change files " before discard") (when resolve (magit-discard-files--resolve (nreverse resolve))) diff --git a/elpa/magit-20210128.1702/magit-autoloads.el b/elpa/magit-20210802.1524/magit-autoloads.el similarity index 98% rename from elpa/magit-20210128.1702/magit-autoloads.el rename to elpa/magit-20210802.1524/magit-autoloads.el index 9588946d..e17bf129 100644 --- a/elpa/magit-20210128.1702/magit-autoloads.el +++ b/elpa/magit-20210802.1524/magit-autoloads.el @@ -49,7 +49,7 @@ C-x g magit-status C-x M-g magit-dispatch C-c M-g magit-file-dispatch -These bindings may be added when `after-init-hook' is called. +These bindings may be added when `after-init-hook' is run. Each binding is added if and only if at that time no other key is bound to the same command and no other command is bound to the same key. In other words we try to avoid adding bindings @@ -63,8 +63,14 @@ is loaded or autoloaded) and to increase the likelihood that all the potentially conflicting user bindings have already been added. -Setting this variable after the hook has already been called -has no effect. +To set this variable use either `setq' or the Custom interface. +Do not use the function `customize-set-variable' because doing +that would cause Magit to be loaded immediately when that form +is evaluated (this differs from `custom-set-variables', which +doesn't load the libraries that define the customized variables). + +Setting this variable to nil has no effect if that is done after +the key bindings have already been added. We recommend that you bind \"C-c g\" instead of \"C-c M-g\" to `magit-file-dispatch'. The former is a much better binding @@ -295,7 +301,7 @@ changes. \(git checkout REVISION). -\(fn REVISION)" t nil) +\(fn REVISION &optional ARGS)" t nil) (autoload 'magit-branch-create "magit-branch" "\ Create BRANCH at branch or revision START-POINT. @@ -305,7 +311,7 @@ Create BRANCH at branch or revision START-POINT. (autoload 'magit-branch-and-checkout "magit-branch" "\ Create and checkout BRANCH at branch or revision START-POINT. -\(fn BRANCH START-POINT)" t nil) +\(fn BRANCH START-POINT &optional ARGS)" t nil) (autoload 'magit-branch-or-checkout "magit-branch" "\ Hybrid between `magit-checkout' and `magit-branch-and-checkout'. @@ -558,6 +564,9 @@ With a prefix argument the target COMMIT has to be confirmed. Otherwise the commit at point may be used without confirmation depending on the value of option `magit-commit-squash-confirm'. +If you want to immediately add a message to the squash commit, +then use `magit-commit-augment' instead of this command. + \(fn &optional COMMIT ARGS)" t nil) (autoload 'magit-commit-augment "magit-commit" "\ @@ -582,13 +591,18 @@ Create a squash commit targeting COMMIT and instantly rebase. (autoload 'magit-commit-reshelve "magit-commit" "\ Change the committer date and possibly the author date of `HEAD'. -If you are the author of `HEAD', then both dates are changed, -otherwise only the committer date. The current time is used -as the initial minibuffer input and the original author (if -that is you) or committer date is available as the previous +The current time is used as the initial minibuffer input and the +original author or committer date is available as the previous history element. -\(fn DATE)" t nil) +Both the author and the committer dates are changes, unless one +of the following is true, in which case only the committer date +is updated: +- You are not the author of the commit that is being reshelved. +- The command was invoked with a prefix argument. +- Non-interactively if UPDATE-AUTHOR is nil. + +\(fn DATE UPDATE-AUTHOR &optional ARGS)" t nil) (autoload 'magit-commit-absorb-modules "magit-commit" "\ Spread modified modules across recent commits. @@ -935,7 +949,11 @@ on. This command is only intended for interactive use and should only be used on highly rearranged and unpublished history. -\(fn REV)" t nil) +If KEYID is non-nil, then use that to sign all reshelved commits. +Interactively use the value of the \"--gpg-sign\" option in the +list returned by `magit-rebase-arguments'. + +\(fn REV KEYID)" t nil) (autoload 'magit-pop-revision-stack "magit-extras" "\ Insert a representation of a revision into the current buffer. @@ -1136,8 +1154,8 @@ repository. Also stage the file. \(fn RULE)" t nil) (autoload 'magit-gitignore-in-subdir "magit-gitignore" "\ -Add the Git ignore RULE to a \".gitignore\" file. -Prompted the user for a directory and add the rule to the +Add the Git ignore RULE to a \".gitignore\" file in DIRECTORY. +Prompt the user for a directory and add the rule to the \".gitignore\" file in that directory. Since such files are tracked, they are shared with other clones of the repository. Also stage the file. @@ -1460,7 +1478,7 @@ Abort the current merge operation. ;;;### (autoloads nil "magit-mode" "magit-mode.el" (0 0 0 0)) ;;; Generated autoloads from magit-mode.el -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "magit-mode" '("disable-magit-save-buffers" "inhibit-magit-refresh" "magit-"))) +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "magit-mode" '("disable-magit-save-buffers" "magit-"))) ;;;*** @@ -1791,13 +1809,6 @@ With a prefix argument reset the working tree otherwise don't. (if (fboundp 'register-definition-prefixes) (register-definition-prefixes "magit-reset" '("magit-reset-"))) -;;;*** - -;;;### (autoloads nil "magit-section" "magit-section.el" (0 0 0 0)) -;;; Generated autoloads from magit-section.el - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "magit-section" '("isearch-clean-overlays@magit-mode" "magit-"))) - ;;;*** ;;;### (autoloads nil "magit-sequence" "magit-sequence.el" (0 0 0 diff --git a/elpa/magit-20210128.1702/magit-autorevert.el b/elpa/magit-20210802.1524/magit-autorevert.el similarity index 99% rename from elpa/magit-20210128.1702/magit-autorevert.el rename to elpa/magit-20210802.1524/magit-autorevert.el index 0c99d5f4..75e88d8e 100644 --- a/elpa/magit-20210128.1702/magit-autorevert.el +++ b/elpa/magit-20210802.1524/magit-autorevert.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) diff --git a/elpa/magit-20210128.1702/magit-bisect.el b/elpa/magit-20210802.1524/magit-bisect.el similarity index 95% rename from elpa/magit-20210128.1702/magit-bisect.el rename to elpa/magit-20210802.1524/magit-bisect.el index 8bb263c7..8efe1af3 100644 --- a/elpa/magit-20210128.1702/magit-bisect.el +++ b/elpa/magit-20210802.1524/magit-bisect.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) @@ -65,9 +67,9 @@ ("-p" "Follow only first parent of a merge" "--first-parent" :if (lambda () (version<= "2.29" (magit-git-version)))) (6 magit-bisect:--term-old - :if (lambda () (version<= "2.7" (magit-git-version)))) + :if (lambda () (version<= "2.7" (magit-git-version)))) (6 magit-bisect:--term-new - :if (lambda () (version<= "2.7" (magit-git-version))))] + :if (lambda () (version<= "2.7" (magit-git-version))))] ["Actions" ("B" "Start" magit-bisect-start) ("s" "Start script" magit-bisect-run)]] @@ -76,7 +78,7 @@ ("B" "Bad" magit-bisect-bad) ("g" "Good" magit-bisect-good) (6 "m" "Mark" magit-bisect-mark - :if (lambda () (version<= "2.7" (magit-git-version)))) + :if (lambda () (version<= "2.7" (magit-git-version)))) ("k" "Skip" magit-bisect-skip) ("r" "Reset" magit-bisect-reset) ("s" "Run script" magit-bisect-run)]) @@ -194,7 +196,14 @@ bisect run'." (magit-bisect-start-read-args)))) (cons (read-shell-command "Bisect shell command: ") args))) (when (and bad good) - (magit-bisect-start bad good args)) + ;; Avoid `magit-git-bisect' because it's asynchronous, but the + ;; next `git bisect run' call requires the bisect to be started. + (magit-with-toplevel + (magit-process-git + (list :file (magit-git-dir "BISECT_CMD_OUTPUT")) + (magit-process-git-arguments + (list "bisect" "start" bad good args))) + (magit-refresh))) (magit-git-bisect "run" (list shell-file-name shell-command-switch cmdline))) (defun magit-git-bisect (subcommand &optional args no-assert) diff --git a/elpa/magit-20210128.1702/magit-blame.el b/elpa/magit-20210802.1524/magit-blame.el similarity index 96% rename from elpa/magit-20210128.1702/magit-blame.el rename to elpa/magit-20210802.1524/magit-blame.el index e30c4b26..91e71a0c 100644 --- a/elpa/magit-20210128.1702/magit-blame.el +++ b/elpa/magit-20210802.1524/magit-blame.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) @@ -225,25 +227,25 @@ Also see option `magit-blame-styles'." ;; filename (orig-file))) -(defun magit-current-blame-chunk (&optional type) +(defun magit-current-blame-chunk (&optional type noerror) (or (and (not (and type (not (eq type magit-blame-type)))) (magit-blame-chunk-at (point))) (and type (let ((rev (or magit-buffer-refname magit-buffer-revision)) (file (magit-file-relative-name nil (not magit-buffer-file-name))) (line (format "%i,+1" (line-number-at-pos)))) - (unless file - (error "Buffer does not visit a tracked file")) - (with-temp-buffer - (magit-with-toplevel - (magit-git-insert - "blame" "--porcelain" - (if (memq magit-blame-type '(final removal)) - (cons "--reverse" (magit-blame-arguments)) - (magit-blame-arguments)) - "-L" line rev "--" file) - (goto-char (point-min)) - (car (magit-blame--parse-chunk type)))))))) + (cond (file (with-temp-buffer + (magit-with-toplevel + (magit-git-insert + "blame" "--porcelain" + (if (memq magit-blame-type '(final removal)) + (cons "--reverse" (magit-blame-arguments)) + (magit-blame-arguments)) + "-L" line rev "--" file) + (goto-char (point-min)) + (car (magit-blame--parse-chunk type))))) + (noerror nil) + (t (error "Buffer does not visit a tracked file"))))))) (defun magit-blame-chunk-at (pos) (--some (overlay-get it 'magit-blame-chunk) @@ -486,10 +488,10 @@ modes is toggled, then this mode also gets toggled automatically. (while (not done) (cond ((looking-at "^filename \\(.+\\)") (setq done t) - (setf orig-file (match-string 1))) + (setf orig-file (magit-decode-git-path (match-string 1)))) ((looking-at "^previous \\(.\\{40\\}\\) \\(.+\\)") (setf prev-rev (match-string 1)) - (setf prev-file (match-string 2))) + (setf prev-file (magit-decode-git-path (match-string 2)))) ((looking-at "^\\([^ ]+\\) \\(.+\\)") (push (cons (match-string 1) (match-string 2)) revinfo))) @@ -699,9 +701,9 @@ modes is toggled, then this mode also gets toggled automatically. (when (magit-blame--style-get 'show-message) (let ((message-log-max 0)) (if-let ((msg (cdr (assoc "summary" - (gethash (oref (magit-current-blame-chunk) - orig-rev) - magit-blame-cache))))) + (gethash (oref (magit-current-blame-chunk) + orig-rev) + magit-blame-cache))))) (progn (set-text-properties 0 (length msg) nil msg) (message msg)) (message "Commit data not available yet. Still blaming."))))) @@ -893,6 +895,7 @@ instead of the hash, like `kill-ring-save' would." ["Arguments" ("-w" "Ignore whitespace" "-w") ("-r" "Do not treat root commits as boundaries" "--root") + ("-P" "Follow only first parent" "--first-parent") (magit-blame:-M) (magit-blame:-C)] ["Actions" diff --git a/elpa/magit-20210128.1702/magit-bookmark.el b/elpa/magit-20210802.1524/magit-bookmark.el similarity index 93% rename from elpa/magit-20210128.1702/magit-bookmark.el rename to elpa/magit-20210802.1524/magit-bookmark.el index 91380a7e..22f022e6 100644 --- a/elpa/magit-20210128.1702/magit-bookmark.el +++ b/elpa/magit-20210802.1524/magit-bookmark.el @@ -10,6 +10,8 @@ ;; Inspired by an earlier implementation by Yuri Khan. +;; 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) @@ -40,7 +42,11 @@ Input values are the major-mode's `magit-bookmark-name' method, and the buffer-local values of the variables referenced in its `magit-bookmark-variables' property." (if (plist-member (symbol-plist major-mode) 'magit-bookmark-variables) - (let ((bookmark (bookmark-make-record-default 'no-file))) + ;; `bookmark-make-record-default's return value does not match + ;; (NAME . ALIST), even though it is used as the default value + ;; of `bookmark-make-record-function', which states that such + ;; functions must do that. See #4356. + (let ((bookmark (cons nil (bookmark-make-record-default 'no-file)))) (bookmark-prop-set bookmark 'handler 'magit--handle-bookmark) (bookmark-prop-set bookmark 'mode major-mode) (bookmark-prop-set bookmark 'filename (magit-toplevel)) @@ -84,6 +90,9 @@ with the variables' values as arguments, which were recorded by hidden) (magit-section-hide child) (magit-section-show child))))) + ;; Compatibility with `bookmark+' package. See #4356. + (when (bound-and-true-p bmkp-jump-display-function) + (funcall bmkp-jump-display-function (current-buffer))) nil)) (cl-defgeneric magit-bookmark-name () diff --git a/elpa/magit-20210128.1702/magit-branch.el b/elpa/magit-20210802.1524/magit-branch.el similarity index 92% rename from elpa/magit-20210128.1702/magit-branch.el rename to elpa/magit-20210802.1524/magit-branch.el index c6603248..1b5f0882 100644 --- a/elpa/magit-20210128.1702/magit-branch.el +++ b/elpa/magit-20210802.1524/magit-branch.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) @@ -112,7 +114,8 @@ should be used as the upstream. This option allows specifying the branch that should be used as the upstream when branching certain remote branches. The value is an alist of the form ((UPSTREAM . RULE)...). The first -matching element is used, the following elements are ignored. +element is used whose UPSTREAM exists and whose RULE matches +the name of the new branch. Subsequent elements are ignored. UPSTREAM is the branch to be used as the upstream for branches specified by RULE. It can be a local or a remote branch. @@ -126,7 +129,7 @@ part of the name of the branch that is being branched from. If you use a finite set of non-ephemeral branches across all your repositories, then you might use something like: - ((\"origin/master\" \"master\" \"next\" \"maint\")) + ((\"origin/master\" . (\"master\" \"next\" \"maint\"))) Or if the names of all your ephemeral branches contain a slash, at least in some repositories, then a good value could be: @@ -138,6 +141,16 @@ Of course you can also fine-tune: ((\"origin/maint\" . \"\\\\\\=`hotfix/\") (\"origin/master\" . \"\\\\\\=`feature/\")) +UPSTREAM can be a local branch: + + ((\"master\" . (\"master\" \"next\" \"maint\"))) + +Because the main branch is no longer almost always named \"master\" +you should also account for other common names: + + ((\"main\" . (\"main\" \"master\" \"next\" \"maint\")) + (\"master\" . (\"main\" \"master\" \"next\" \"maint\"))) + If you use remote branches as UPSTREAM, then you might also want to set `magit-branch-prefer-remote-upstream' to a non-nil value. However, I recommend that you use local branches as UPSTREAM." @@ -201,6 +214,10 @@ has to be used to view and change branch related variables." (transient-define-prefix magit-branch (branch) "Add, configure or remove a branch." :man-page "git-branch" + ["Arguments" + (7 "-r" "Recurse submodules when checking out an existing branch" + "--recurse-submodules" + :if (lambda () (version<= "2.13" (magit-git-version))))] ["Variables" :if (lambda () (and magit-branch-direct-configure @@ -232,18 +249,22 @@ has to be used to view and change branch related variables." (interactive (list (magit-get-current-branch))) (transient-setup 'magit-branch nil nil :scope branch)) +(defun magit-branch-arguments () + (transient-args 'magit-branch)) + ;;;###autoload -(defun magit-checkout (revision) +(defun magit-checkout (revision &optional args) "Checkout REVISION, updating the index and the working tree. If REVISION is a local branch, then that becomes the current branch. If it is something else, then `HEAD' becomes detached. Checkout fails if the working tree or the staging area contain changes. \n(git checkout REVISION)." - (interactive (list (magit-read-other-branch-or-commit "Checkout"))) + (interactive (list (magit-read-other-branch-or-commit "Checkout") + (magit-branch-arguments))) (when (string-match "\\`heads/\\(.+\\)" revision) (setq revision (match-string 1 revision))) - (magit-run-git "checkout" revision)) + (magit-run-git "checkout" args revision)) ;;;###autoload (defun magit-branch-create (branch start-point) @@ -254,12 +275,13 @@ changes. (magit-refresh)) ;;;###autoload -(defun magit-branch-and-checkout (branch start-point) +(defun magit-branch-and-checkout (branch start-point &optional args) "Create and checkout BRANCH at branch or revision START-POINT." - (interactive (magit-branch-read-args "Create and checkout branch")) + (interactive (append (magit-branch-read-args "Create and checkout branch") + (list (magit-branch-arguments)))) (if (string-match-p "^stash@{[0-9]+}$" start-point) (magit-run-git "stash" "branch" branch start-point) - (magit-call-git "checkout" "-b" branch start-point) + (magit-call-git "checkout" args "-b" branch start-point) (magit-branch-maybe-adjust-upstream branch start-point) (magit-refresh))) @@ -336,7 +358,7 @@ when using `magit-branch-and-checkout'." (t (list choice (magit-read-starting-point "Create" choice)))))) (if (not start-point) - (magit-checkout branch) + (magit-checkout branch (magit-branch-arguments)) (when (magit-anything-modified-p t) (user-error "Cannot checkout when there are uncommitted changes")) (magit-branch-and-checkout branch start-point) @@ -353,10 +375,13 @@ when using `magit-branch-and-checkout'." (magit-get-indirect-upstream-branch start-point)) (and (magit-remote-branch-p start-point) (let ((name (cdr (magit-split-branch-name start-point)))) - (car (--first (if (listp (cdr it)) - (not (member name (cdr it))) - (string-match-p (cdr it) name)) - magit-branch-adjust-remote-upstream-alist))))) + (-some (pcase-lambda (`(,upstream . ,rule)) + (and (magit-branch-p upstream) + (if (listp rule) + (not (member name rule)) + (string-match-p rule name)) + upstream)) + magit-branch-adjust-remote-upstream-alist)))) (magit-call-git "branch" (concat "--set-upstream-to=" it) branch))) ;;;###autoload @@ -495,7 +520,7 @@ that is being reset." (or (and (not (equal branch atpoint)) atpoint) (magit-get-upstream-branch branch))) current-prefix-arg))) - (let ((inhibit-magit-refresh t)) + (let ((magit-inhibit-refresh t)) (if (equal branch (magit-get-current-branch)) (if (and (magit-anything-modified-p) (not (yes-or-no-p @@ -559,16 +584,32 @@ defaulting to the branch at point." ((string-match "^refs/remotes/\\([^/]+\\)" (car refs)) (let* ((remote (match-string 1 (car refs))) (offset (1+ (length remote)))) - ;; Assume the branches actually still exists on the remote. - (magit-run-git-async - "push" - (and (or force magit-branch-delete-never-verify) "--no-verify") - remote - (--map (concat ":" (substring it offset)) branches)) - ;; 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)))) + (cond + ((magit-confirm 'delete-branch-on-remote + "Delete %s on the remote (not just locally)" + "Delete %i branches on the remote (not just locally)" + 'noabort branches) + ;; The ref may actually point at another rev on the remote, + ;; but this is better than nothing. + (dolist (ref refs) + (message "Delete %s (was %s)" ref + (magit-rev-parse "--short" ref))) + ;; Assume the branches actually still exist on the remote. + (magit-run-git-async + "push" + (and (or force magit-branch-delete-never-verify) "--no-verify") + remote + (--map (concat ":" (substring it offset)) branches)) + ;; 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))) + (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) (setq branches (delete (magit-get-current-branch) branches)) (mapc 'magit-branch-maybe-delete-pr-remote branches) @@ -684,15 +725,15 @@ the remote." (magit-call-git "branch" (if force "-M" "-m") old new) (when magit-branch-rename-push-target (let ((remote (magit-get-push-remote old)) - (old-specific (magit-get "branch" old "pushRemote")) - (new-specific (magit-get "branch" new "pushRemote"))) - (when (and old-specific (or force (not new-specific))) - ;; Keep the target setting branch specific, even if that is + (old-specified (magit-get "branch" old "pushRemote")) + (new-specified (magit-get "branch" new "pushRemote"))) + (when (and old-specified (or force (not new-specified))) + ;; Keep the target setting branch specified, even if that is ;; redundant. But if a branch by the same name existed before ;; and the rename isn't forced, then do not change a leftover ;; setting. Such a leftover setting may or may not conform to ;; what we expect here... - (magit-set old-specific "branch" new "pushRemote")) + (magit-set old-specified "branch" new "pushRemote")) (when (and (equal (magit-get-push-remote new) remote) ;; ...and if it does not, then we must abort. (not (eq magit-branch-rename-push-target 'local-only)) diff --git a/elpa/magit-20210128.1702/magit-clone.el b/elpa/magit-20210802.1524/magit-clone.el similarity index 96% rename from elpa/magit-20210128.1702/magit-clone.el rename to elpa/magit-20210802.1524/magit-clone.el index 3aee1a85..3b30e477 100644 --- a/elpa/magit-20210128.1702/magit-clone.el +++ b/elpa/magit-20210802.1524/magit-clone.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) @@ -193,11 +195,15 @@ Then show the status buffer for the new repository." (defun magit-clone-internal (repository directory args) (let* ((checkout (not (memq (car args) '("--bare" "--mirror")))) + (remote (or (transient-arg-value "--origin" args) + (magit-get "clone.defaultRemote") + "origin")) (set-push-default (and checkout (or (eq magit-clone-set-remote.pushDefault t) (and magit-clone-set-remote.pushDefault - (y-or-n-p "Set `remote.pushDefault' to \"origin\"? ")))))) + (y-or-n-p (format "Set `remote.pushDefault' to %S? " + remote))))))) (run-hooks 'magit-credential-hook) (setq directory (file-name-as-directory (expand-file-name directory))) (when (file-exists-p directory) @@ -225,9 +231,9 @@ Then show the status buffer for the new repository." (when checkout (let ((default-directory directory)) (when set-push-default - (setf (magit-get "remote.pushDefault") "origin")) + (setf (magit-get "remote.pushDefault") remote)) (unless magit-clone-set-remote-head - (magit-remote-unset-head "origin")))) + (magit-remote-unset-head remote)))) (with-current-buffer (process-get process 'command-buf) (magit-status-setup-buffer directory))))))) diff --git a/elpa/magit-20210128.1702/magit-commit.el b/elpa/magit-20210802.1524/magit-commit.el similarity index 89% rename from elpa/magit-20210128.1702/magit-commit.el rename to elpa/magit-20210802.1524/magit-commit.el index 5e50aec2..51f64057 100644 --- a/elpa/magit-20210128.1702/magit-commit.el +++ b/elpa/magit-20210802.1524/magit-commit.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) @@ -144,28 +146,46 @@ Also see `git-commit-post-finish-hook'." :shortarg "-S" :argument "--gpg-sign=" :allow-empty t - :reader 'magit-read-gpg-secret-key) + :reader 'magit-read-gpg-signing-key) (defvar magit-gpg-secret-key-hist nil) -(defun magit-read-gpg-secret-key (prompt &optional initial-input history) +(defun magit-read-gpg-secret-key + (prompt &optional initial-input history predicate) (require 'epa) - (let* ((keys (mapcar - (lambda (obj) - (let ((key (epg-sub-key-id (car (epg-key-sub-key-list obj)))) - (author - (when-let ((id-obj (car (epg-key-user-id-list obj)))) - (let ((id-str (epg-user-id-string id-obj))) - (if (stringp id-str) - id-str - (epg-decode-dn id-obj)))))) - (propertize key 'display (concat key " " author)))) + (let* ((keys (mapcan + (lambda (cert) + (and (or (not predicate) + (funcall predicate cert)) + (let* ((key (car (epg-key-sub-key-list cert))) + (fpr (epg-sub-key-fingerprint key)) + (id (epg-sub-key-id key)) + (author + (when-let ((id-obj + (car (epg-key-user-id-list cert)))) + (let ((id-str (epg-user-id-string id-obj))) + (if (stringp id-str) + id-str + (epg-decode-dn id-obj)))))) + (list + (propertize fpr 'display + (concat (substring fpr 0 (- (length id))) + (propertize id 'face 'highlight) + " " author)))))) (epg-list-keys (epg-make-context epa-protocol) nil t))) (choice (completing-read prompt keys nil nil nil history nil initial-input))) (set-text-properties 0 (length choice) nil choice) choice)) +(defun magit-read-gpg-signing-key (prompt &optional initial-input history) + (magit-read-gpg-secret-key + prompt initial-input history + (lambda (cert) + (cl-some (lambda (key) + (memq 'sign (epg-sub-key-capability key))) + (epg-key-sub-key-list cert))))) + (transient-define-argument magit-commit:--reuse-message () :description "Reuse commit message" :class 'transient-option @@ -263,7 +283,10 @@ depending on the value of option `magit-commit-squash-confirm'." With a prefix argument the target COMMIT has to be confirmed. Otherwise the commit at point may be used without confirmation -depending on the value of option `magit-commit-squash-confirm'." +depending on the value of option `magit-commit-squash-confirm'. + +If you want to immediately add a message to the squash commit, +then use `magit-commit-augment' instead of this command." (interactive (list (magit-commit-at-point) (magit-commit-arguments))) (magit-commit-squash-internal "--squash" commit args)) @@ -295,7 +318,7 @@ depending on the value of option `magit-commit-squash-confirm'." (defun magit-commit-squash-internal (option commit &optional args rebase edit confirmed) - (when-let ((args (magit-commit-assert args t))) + (when-let ((args (magit-commit-assert args (not edit)))) (when commit (when (and rebase (not (magit-rev-ancestor-p commit "HEAD"))) (magit-read-char-case @@ -359,9 +382,9 @@ depending on the value of option `magit-commit-squash-confirm'." (or (member "--amend" args) (member "--allow-empty" args) (member "--reset-author" args) - (member "--author" args) (member "--signoff" args) - (cl-find-if (lambda (a) (string-match-p "\\`--date=" a)) args)))) + (transient-arg-value "--author=" args) + (transient-arg-value "--date=" args)))) (or args (list "--"))) ((and (magit-rebase-in-progress-p) (not (magit-anything-unstaged-p)) @@ -390,29 +413,37 @@ depending on the value of option `magit-commit-squash-confirm'." (defvar magit--reshelve-history nil) ;;;###autoload -(defun magit-commit-reshelve (date) +(defun magit-commit-reshelve (date update-author &optional args) "Change the committer date and possibly the author date of `HEAD'. -If you are the author of `HEAD', then both dates are changed, -otherwise only the committer date. The current time is used -as the initial minibuffer input and the original author (if -that is you) or committer date is available as the previous -history element." +The current time is used as the initial minibuffer input and the +original author or committer date is available as the previous +history element. + +Both the author and the committer dates are changes, unless one +of the following is true, in which case only the committer date +is updated: +- You are not the author of the commit that is being reshelved. +- The command was invoked with a prefix argument. +- Non-interactively if UPDATE-AUTHOR is nil." (interactive - (let ((author-p (magit-rev-author-p "HEAD"))) - (push (magit-rev-format (if author-p "%ad" "%cd") "HEAD" + (let ((update-author (and (magit-rev-author-p "HEAD") + (not current-prefix-arg)))) + (push (magit-rev-format (if update-author "%ad" "%cd") "HEAD" (concat "--date=format:%F %T %z")) magit--reshelve-history) - (list (read-string (if author-p + (list (read-string (if update-author "Change author and committer dates to: " "Change committer date to: ") (cons (format-time-string "%F %T %z") 17) - 'magit--reshelve-history)))) + 'magit--reshelve-history) + update-author + (magit-commit-arguments)))) (let ((process-environment process-environment)) (push (concat "GIT_COMMITTER_DATE=" date) process-environment) (magit-run-git "commit" "--amend" "--no-edit" - (and (magit-rev-author-p "HEAD") - (concat "--date=" date))))) + (and update-author (concat "--date=" date)) + args))) ;;;###autoload (defun magit-commit-absorb-modules (phase commit) diff --git a/elpa/magit-20210128.1702/magit-core.el b/elpa/magit-20210802.1524/magit-core.el similarity index 98% rename from elpa/magit-20210128.1702/magit-core.el rename to elpa/magit-20210802.1524/magit-core.el index aac74643..3d19d6c3 100644 --- a/elpa/magit-20210128.1702/magit-core.el +++ b/elpa/magit-20210802.1524/magit-core.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) diff --git a/elpa/magit-20210128.1702/magit-diff.el b/elpa/magit-20210802.1524/magit-diff.el similarity index 95% rename from elpa/magit-20210128.1702/magit-diff.el rename to elpa/magit-20210802.1524/magit-diff.el index 88f2effb..004cb173 100644 --- a/elpa/magit-20210128.1702/magit-diff.el +++ b/elpa/magit-20210802.1524/magit-diff.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) @@ -832,15 +834,15 @@ and `:slant'." ;;; Section Classes (defclass magit-file-section (magit-section) - ((keymap :initform magit-file-section-map) + ((keymap :initform 'magit-file-section-map) (source :initform nil) (header :initform nil))) (defclass magit-module-section (magit-file-section) - ((keymap :initform magit-hunk-section-map))) + ((keymap :initform 'magit-hunk-section-map))) (defclass magit-hunk-section (magit-section) - ((keymap :initform magit-hunk-section-map) + ((keymap :initform 'magit-hunk-section-map) (refined :initform nil) (combined :initform nil) (from-range :initform nil) @@ -876,6 +878,7 @@ and `:slant'." ("-x" "Disallow external diff drivers" "--no-ext-diff") ("-s" "Show stats" "--stat") ("=g" "Show signature" "--show-signature") + (5 "-R" "Reverse sides" "-R") (5 magit-diff:--color-moved) (5 magit-diff:--color-moved-ws)] ["Actions" @@ -911,6 +914,8 @@ and `:slant'." :if-derived magit-diff-mode) ("=g" "Show signature" "--show-signature" :if-derived magit-diff-mode) + (5 "-R" "Reverse sides" "-R" + :if-derived magit-diff-mode) (5 magit-diff:--color-moved) (5 magit-diff:--color-moved-ws)] [["Refresh" @@ -1106,6 +1111,9 @@ If no DWIM context is found, nil is returned." (or current "HEAD") atpoint)))) (commit (cons 'commit (oref it value))) + ([file commit] (cons 'commit (oref (oref it parent) value))) + ([hunk file commit] + (cons 'commit (oref (oref (oref it parent) parent) value))) (stash (cons 'stash (oref it value))) (pullreq (forge--pullreq-range (oref it value) t)))))) @@ -1282,9 +1290,7 @@ If there is no revision at point or with a prefix argument prompt for a revision." (interactive (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 + (atpoint (or mcommit (thing-at-point 'git-revision t) (magit-branch-or-commit-at-point))) (`(,args ,files) (magit-show-commit--arguments))) @@ -1319,11 +1325,12 @@ for a revision." (let (hunk (hunks (oref diff children))) (cl-block nil (while (setq hunk (pop hunks)) - (pcase-let* ((`(,beg ,len) (oref hunk to-range)) - (end (+ beg len))) - (cond ((> beg line) (cl-return (list diff nil))) - ((<= beg line end) (cl-return (list hunk t))) - ((null hunks) (cl-return (list hunk nil)))))))))) + (when-let ((range (oref hunk to-range))) + (pcase-let* ((`(,beg ,len) range) + (end (+ beg len))) + (cond ((> beg line) (cl-return (list diff nil))) + ((<= beg line end) (cl-return (list hunk t))) + ((null hunks) (cl-return (list hunk nil))))))))))) (defun magit-diff--goto-position (file line column &optional parent) (when-let ((pos (magit-diff--locate-hunk file line parent))) @@ -1501,8 +1508,8 @@ The visited version depends on what changes the diff is about. In the file-visiting buffer also go to the line that corresponds to the line that point is on in the diff. -Note that this command only works if point is inside a diff. In -other cases `magit-find-file' (which see) had to be used." +Note that this command only works if point is inside a diff. +In other cases `magit-find-file' (which see) has to be used." (interactive (list (magit-file-at-point t t) current-prefix-arg)) (magit-diff-visit-file--internal file nil (if other-window @@ -1907,10 +1914,14 @@ Staging and applying changes is documented in info node (if (equal magit-buffer-typearg "--no-index") (apply #'format "Differences between %s and %s" magit-buffer-diff-files) (concat (if magit-buffer-range - (if (string-match-p "\\(\\.\\.\\|\\^-\\)" - magit-buffer-range) - (format "Changes in %s" magit-buffer-range) - (format "Changes from %s to working tree" magit-buffer-range)) + (cond + ((string-match-p "\\(\\.\\.\\|\\^-\\)" + magit-buffer-range) + (format "Changes in %s" magit-buffer-range)) + ((member "-R" magit-buffer-diff-args) + (format "Changes from working tree to %s" magit-buffer-range)) + (t + (format "Changes from %s to working tree" magit-buffer-range))) (if (equal magit-buffer-typearg "--cached") "Staged changes" "Unstaged changes")) @@ -2022,7 +2033,7 @@ Staging and applying changes is documented in info node (pcase-let ((`(,cmd . ,args) (-flatten args)) (magit-git-global-arguments - (remove "--literal-pathspecs" magit-git-global-arguments))) + (remove "--literal-pathspecs" magit-git-global-arguments))) ;; As of Git 2.19.0, we need to generate diffs with ;; --ita-visible-in-index so that `magit-stage' can work with ;; intent-to-add files (see #4026). Cache the result for each @@ -2084,10 +2095,25 @@ section or a child thereof." (defun magit-diff-wash-signature () (when (looking-at "^gpg: ") - (magit-insert-section (signature) - (while (looking-at "^gpg: ") - (forward-line)) - (insert "\n")))) + (let (title end) + (save-excursion + (while (looking-at "^gpg: ") + (cond + ((looking-at "^gpg: Good signature from") + (setq title (propertize + (buffer-substring (point) (line-end-position)) + 'face 'magit-signature-good))) + ((looking-at "^gpg: Can't check signature") + (setq title (propertize + (buffer-substring (point) (line-end-position)) + 'face '(italic bold))))) + (forward-line)) + (setq end (point-marker))) + (magit-insert-section (signature magit-buffer-revision title) + (when title + (magit-insert-heading title)) + (goto-char end) + (insert "\n"))))) (defun magit-diff-wash-diffstat () (let (heading (beg (point))) @@ -2164,7 +2190,7 @@ section or a child thereof." ((looking-at magit-diff-conflict-headline-re) (let ((long-status (match-string 0)) (status "BUG") - file orig base modes) + file orig base) (if (equal long-status "merged") (progn (setq status long-status) (setq long-status nil)) @@ -2189,52 +2215,78 @@ section or a child thereof." (when orig (setq orig (magit-decode-git-path orig))) (when file (setq file (magit-decode-git-path file))) (magit-diff-insert-file-section - (or file base) orig status modes nil long-status))) - ((looking-at - "^diff --\\(?:\\(git\\) \\(?:\\(.+?\\) \\2\\)?\\|\\(cc\\|combined\\) \\(.+\\)\\)") + (or file base) orig status nil nil nil long-status))) + ;; The files on this line may be ambiguous due to whitespace. + ;; That's okay. We can get their names from subsequent headers. + ((looking-at "^diff --\ +\\(?:\\(?1:git\\) \\(?:\\(?2:.+?\\) \\2\\)?\ +\\|\\(?:cc\\|combined\\) \\(?3:.+\\)\\)") (let ((status (cond ((equal (match-string 1) "git") "modified") ((derived-mode-p 'magit-revision-mode) "resolved") (t "unmerged"))) - (file (or (match-string 2) (match-string 4))) - (beg (point)) - orig header modes) - (save-excursion - (forward-line 1) - (setq header (buffer-substring - beg (if (re-search-forward magit-diff-headline-re nil t) - (match-beginning 0) - (point-max))))) + (orig nil) + (file (or (match-string 2) (match-string 3))) + (header (list (buffer-substring-no-properties + (line-beginning-position) (1+ (line-end-position))))) + (modes nil) + (rename nil)) (magit-delete-line) (while (not (or (eobp) (looking-at magit-diff-headline-re))) - (if (looking-at "^old mode \\([^\n]+\\)\nnew mode \\([^\n]+\\)\n") - (progn (setq modes (match-string 0)) - (magit-delete-match)) - (cond - ((looking-at "^--- \\([^/].*?\\)\t?$") ; i.e. not /dev/null - (setq orig (match-string 1))) - ((looking-at "^\\+\\+\\+ \\([^/].*?\\)\t?$") - (setq file (match-string 1))) - ((looking-at "^\\(copy\\|rename\\) from \\(.+\\)$") - (setq orig (match-string 2))) - ((looking-at "^\\(copy\\|rename\\) to \\(.+\\)$") - (setq file (match-string 2)) - (setq status (if (equal (match-string 1) "copy") "new file" "renamed"))) - ((looking-at "^\\(new file\\|deleted\\)") - (setq status (match-string 1)))) - (magit-delete-line))) + (cond + ((looking-at "old mode \\(?:[^\n]+\\)\nnew mode \\(?:[^\n]+\\)\n") + (setq modes (match-string 0))) + ((looking-at "deleted file .+\n") + (setq status "deleted")) + ((looking-at "new file .+\n") + (setq status "new file")) + ((looking-at "rename from \\(.+\\)\nrename to \\(.+\\)\n") + (setq rename (match-string 0)) + (setq orig (match-string 1)) + (setq file (match-string 2)) + (setq status "renamed")) + ((looking-at "copy from \\(.+\\)\ncopy to \\(.+\\)\n") + (setq orig (match-string 1)) + (setq file (match-string 2)) + (setq status "new file")) + ((looking-at "similarity index .+\n")) + ((looking-at "dissimilarity index .+\n")) + ((looking-at "index .+\n")) + ((looking-at "--- \\(.+?\\)\t?\n") + (unless (equal (match-string 1) "/dev/null") + (setq orig (match-string 1)))) + ((looking-at "\\+\\+\\+ \\(.+?\\)\t?\n") + (unless (equal (match-string 1) "/dev/null") + (setq file (match-string 1)))) + ((looking-at "Binary files .+ and .+ differ\n")) + ;; TODO Use all combined diff extended headers. + ((looking-at "mode .+\n")) + (t + (error "BUG: Unknown extended header: %S" + (buffer-substring (point) (line-end-position))))) + ;; These headers are treated as some sort of special hunk. + (unless (or (string-prefix-p "old mode" (match-string 0)) + (string-prefix-p "rename" (match-string 0))) + (push (match-string 0) header)) + (magit-delete-match)) + (setq header (mapconcat #'identity (nreverse header) "")) (when orig (setq orig (magit-decode-git-path orig))) (setq file (magit-decode-git-path file)) - ;; KLUDGE `git-log' ignores `--no-prefix' when `-L' is used. - (when (and (derived-mode-p 'magit-log-mode) - (--first (string-match-p "\\`-L" it) magit-buffer-log-args)) + ;; KLUDGE `git-diff' ignores `--no-prefix' for new files and renames at + ;; least. And `git-log' ignores `--no-prefix' when `-L' is used. + (when (or (and file orig + (string-prefix-p "a/" orig) + (string-prefix-p "b/" file)) + (and (derived-mode-p 'magit-log-mode) + (--first (string-match-p "\\`-L" it) + magit-buffer-log-args))) (setq file (substring file 2)) (when orig (setq orig (substring orig 2)))) - (magit-diff-insert-file-section file orig status modes header))))) + (magit-diff-insert-file-section file orig status modes rename header))))) (defun magit-diff-insert-file-section - (file orig status modes header &optional long-status) + (file orig status modes rename header &optional long-status) (magit-insert-section section (file file (or (equal status "deleted") (derived-mode-p 'magit-status-mode))) @@ -2250,9 +2302,13 @@ section or a child thereof." (oset section source orig)) (oset section header header) (when modes - (magit-insert-section (hunk) + (magit-insert-section (hunk '(chmod)) (insert modes) (magit-insert-heading))) + (when rename + (magit-insert-section (hunk '(rename)) + (insert rename) + (magit-insert-heading))) (magit-wash-sequence #'magit-diff-wash-hunk))) (defun magit-diff-wash-submodule () @@ -2391,15 +2447,15 @@ Staging and applying changes is documented in info node (magit-buffer-diff-files-suspended nil))) (defun magit-revision-refresh-buffer () + (setq magit-buffer-revision-hash (magit-rev-parse magit-buffer-revision)) (magit-set-header-line-format - (concat (capitalize (magit-object-type magit-buffer-revision)) + (concat (magit-object-type magit-buffer-revision-hash) " " magit-buffer-revision (pcase (length magit-buffer-diff-files) (0) (1 (concat " limited to file " (car magit-buffer-diff-files))) (_ (concat " limited to files " (mapconcat #'identity magit-buffer-diff-files ", ")))))) - (setq magit-buffer-revision-hash (magit-rev-parse magit-buffer-revision)) (magit-insert-section (commitbuf) (magit-run-section-hook 'magit-revision-sections-hook))) @@ -2448,8 +2504,7 @@ or a ref which is not a branch, then it inserts nothing." (re-search-forward "-----END PGP SIGNATURE-----") (delete-region beg (point))) (insert ?\n) - (process-file magit-git-executable nil t nil - "verify-tag" magit-buffer-revision)) + (magit-process-git t "verify-tag" magit-buffer-revision)) (goto-char (point-max))) (insert ?\n)))) @@ -2850,7 +2905,7 @@ Do not confuse this with `magit-diff-scope' (which see)." (oref section children)) (magit-section-match [* file commit] section)) 'committed - 'undefined)) + 'undefined)) (t 'undefined)))) (cl-defun magit-diff-scope (&optional (section nil ssection) strict) @@ -3277,11 +3332,15 @@ last (visual) lines of the region." ;;; Diff Extract -(defun magit-diff-file-header (section) +(defun magit-diff-file-header (section &optional no-rename) (when (magit-hunk-section-p section) (setq section (oref section parent))) - (when (magit-file-section-p section) - (oref section header))) + (and (magit-file-section-p section) + (let ((header (oref section header))) + (if no-rename + (replace-regexp-in-string + "^--- \\(.+\\)" (oref section value) header t t 1) + header)))) (defun magit-diff-hunk-region-header (section) (let ((patch (magit-diff-hunk-region-patch section))) diff --git a/elpa/magit-20210128.1702/magit-ediff.el b/elpa/magit-20210802.1524/magit-ediff.el similarity index 72% rename from elpa/magit-20210128.1702/magit-ediff.el rename to elpa/magit-20210802.1524/magit-ediff.el index 208ac843..58c47f5f 100644 --- a/elpa/magit-20210128.1702/magit-ediff.el +++ b/elpa/magit-20210802.1524/magit-ediff.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) @@ -99,6 +101,12 @@ tree at the time of stashing." :group 'magit-ediff :type 'boolean) +(defcustom magit-ediff-use-indirect-buffers nil + "Whether to use indirect buffers." + :package-version '(magit . "3.1.0") + :group 'magit-ediff + :type 'boolean) + ;;; Commands (defvar magit-ediff-previous-winconf nil) @@ -155,6 +163,45 @@ conflicts, including those already resolved by Git, use (let ((magit-ediff-previous-winconf smerge-ediff-windows)) (run-hooks 'magit-ediff-quit-hook))))))) +(defmacro magit-ediff-buffers (quit &rest spec) + (declare (indent 1)) + (let ((fn (if (= (length spec) 3) 'ediff-buffers3 'ediff-buffers)) + (char ?@) + get make kill) + (pcase-dolist (`(,g ,m) spec) + (let ((b (intern (format "buf%c" (cl-incf char))))) + (push `(,b ,g) get) + (push `(if ,b + (if magit-ediff-use-indirect-buffers + (prog1 + (make-indirect-buffer + ,b (generate-new-buffer-name (buffer-name ,b)) t) + (setq ,b nil)) + ,b) + ,m) + make) + (push `(unless ,b + (ediff-kill-buffer-carefully + ,(intern (format "ediff-buffer-%c" char)))) + kill))) + (setq get (nreverse get)) + (setq make (nreverse make)) + (setq kill (nreverse kill)) + `(magit-with-toplevel + (let ((conf (current-window-configuration)) + ,@get) + (,fn + ,@make + (list (lambda () + (setq-local + ediff-quit-hook + (list ,@(and quit (list quit)) + (lambda () + ,@kill + (let ((magit-ediff-previous-winconf conf)) + (run-hooks 'magit-ediff-quit-hook))))))) + ',fn))))) + ;;;###autoload (defun magit-ediff-stage (file) "Stage and unstage changes to FILE using Ediff. @@ -164,43 +211,34 @@ FILE has to be relative to the top directory of the repository." (list (magit-completing-read "Selectively stage file" files nil t nil nil (car (member (magit-current-file) files)))))) (magit-with-toplevel - (let* ((conf (current-window-configuration)) - (bufA (magit-get-revision-buffer "HEAD" file)) - (bufB (magit-get-revision-buffer "{index}" file)) - (bufBrw (and bufB (with-current-buffer bufB (not buffer-read-only)))) - (bufC (get-file-buffer file)) - (fileBufC (or bufC (find-file-noselect file))) + (let* ((bufA (magit-get-revision-buffer "HEAD" file)) + (bufB (magit-get-revision-buffer "{index}" file)) + (lockB (and bufB (buffer-local-value 'buffer-read-only bufB))) + (bufC (get-file-buffer file)) + ;; Use the same encoding for all three buffers or we + ;; may end up changing the file in an unintended way. + (bufC* (or bufC (find-file-noselect file))) (coding-system-for-read - (with-current-buffer fileBufC buffer-file-coding-system))) - (ediff-buffers3 - (or bufA (magit-find-file-noselect "HEAD" file)) - (with-current-buffer (magit-find-file-index-noselect file t) - (setq buffer-read-only nil) - (current-buffer)) - fileBufC - `((lambda () - (setq-local - ediff-quit-hook - (lambda () - (and (buffer-live-p ediff-buffer-B) - (buffer-modified-p ediff-buffer-B) - (with-current-buffer ediff-buffer-B - (magit-update-index))) - (and (buffer-live-p ediff-buffer-C) - (buffer-modified-p ediff-buffer-C) - (with-current-buffer ediff-buffer-C - (when (y-or-n-p - (format "Save file %s? " buffer-file-name)) - (save-buffer)))) - ,@(unless bufA '((ediff-kill-buffer-carefully ediff-buffer-A))) - ,@(if bufB - (unless bufBrw '((with-current-buffer ediff-buffer-B - (setq buffer-read-only t)))) - '((ediff-kill-buffer-carefully ediff-buffer-B))) - ,@(unless bufC '((ediff-kill-buffer-carefully ediff-buffer-C))) - (let ((magit-ediff-previous-winconf ,conf)) - (run-hooks 'magit-ediff-quit-hook)))))) - 'ediff-buffers3)))) + (buffer-local-value 'buffer-file-coding-system bufC*)) + (bufA* (magit-find-file-noselect-1 "HEAD" file t)) + (bufB* (magit-find-file-index-noselect file t))) + (setf (buffer-local-value 'buffer-read-only bufB*) nil) + (magit-ediff-buffers + (lambda () + (when (buffer-live-p ediff-buffer-B) + (when lockB + (setf (buffer-local-value 'buffer-read-only bufB) t)) + (when (buffer-modified-p ediff-buffer-B) + (with-current-buffer ediff-buffer-B + (magit-update-index)))) + (when (and (buffer-live-p ediff-buffer-C) + (buffer-modified-p ediff-buffer-C)) + (with-current-buffer ediff-buffer-C + (when (y-or-n-p (format "Save file %s? " buffer-file-name)) + (save-buffer))))) + (bufA bufA*) + (bufB bufB*) + (bufC bufC*))))) ;;;###autoload (defun magit-ediff-compare (revA revB fileA fileB) @@ -220,30 +258,11 @@ range)." nil current-prefix-arg))) (nconc (list revA revB) (magit-ediff-read-files revA revB)))) - (magit-with-toplevel - (let ((conf (current-window-configuration)) - (bufA (if revA - (magit-get-revision-buffer revA fileA) - (get-file-buffer fileA))) - (bufB (if revB - (magit-get-revision-buffer revB fileB) - (get-file-buffer fileB)))) - (ediff-buffers - (or bufA (if revA - (magit-find-file-noselect revA fileA) - (find-file-noselect fileA))) - (or bufB (if revB - (magit-find-file-noselect revB fileB) - (find-file-noselect fileB))) - `((lambda () - (setq-local - ediff-quit-hook - (lambda () - ,@(unless bufA '((ediff-kill-buffer-carefully ediff-buffer-A))) - ,@(unless bufB '((ediff-kill-buffer-carefully ediff-buffer-B))) - (let ((magit-ediff-previous-winconf ,conf)) - (run-hooks 'magit-ediff-quit-hook)))))) - 'ediff-revision)))) + (magit-ediff-buffers nil + ((if revA (magit-get-revision-buffer revA fileA) (get-file-buffer fileA)) + (if revA (magit-find-file-noselect revA fileA) (find-file-noselect fileA))) + ((if revB (magit-get-revision-buffer revB fileB) (get-file-buffer fileB)) + (if revB (magit-find-file-noselect revB fileB) (find-file-noselect fileB))))) (defun magit-ediff-compare--read-revisions (&optional arg mbase) (let ((input (or arg (magit-diff-read-range-or-commit @@ -358,21 +377,11 @@ FILE must be relative to the top directory of the repository." (list (magit-read-file-choice "Show staged changes for file" (magit-staged-files) "No staged files"))) - (let ((conf (current-window-configuration)) - (bufA (magit-get-revision-buffer "HEAD" file)) - (bufB (get-buffer (concat file ".~{index}~")))) - (ediff-buffers - (or bufA (magit-find-file-noselect "HEAD" file)) - (or bufB (magit-find-file-index-noselect file t)) - `((lambda () - (setq-local - ediff-quit-hook - (lambda () - ,@(unless bufA '((ediff-kill-buffer-carefully ediff-buffer-A))) - ,@(unless bufB '((ediff-kill-buffer-carefully ediff-buffer-B))) - (let ((magit-ediff-previous-winconf ,conf)) - (run-hooks 'magit-ediff-quit-hook)))))) - 'ediff-buffers))) + (magit-ediff-buffers nil + ((magit-get-revision-buffer "HEAD" file) + (magit-find-file-noselect "HEAD" file)) + ((get-buffer (concat file ".~{index}~")) + (magit-find-file-index-noselect file t)))) ;;;###autoload (defun magit-ediff-show-unstaged (file) @@ -386,22 +395,11 @@ FILE must be relative to the top directory of the repository." (list (magit-read-file-choice "Show unstaged changes for file" (magit-unstaged-files) "No unstaged files"))) - (magit-with-toplevel - (let ((conf (current-window-configuration)) - (bufA (get-buffer (concat file ".~{index}~"))) - (bufB (get-file-buffer file))) - (ediff-buffers - (or bufA (magit-find-file-index-noselect file t)) - (or bufB (find-file-noselect file)) - `((lambda () - (setq-local - ediff-quit-hook - (lambda () - ,@(unless bufA '((ediff-kill-buffer-carefully ediff-buffer-A))) - ,@(unless bufB '((ediff-kill-buffer-carefully ediff-buffer-B))) - (let ((magit-ediff-previous-winconf ,conf)) - (run-hooks 'magit-ediff-quit-hook)))))) - 'ediff-buffers)))) + (magit-ediff-buffers nil + ((get-buffer (concat file ".~{index}~")) + (magit-find-file-index-noselect file t)) + ((get-file-buffer file) + (find-file-noselect file)))) ;;;###autoload (defun magit-ediff-show-working-tree (file) @@ -411,22 +409,11 @@ FILE must be relative to the top directory of the repository." (list (magit-read-file-choice "Show changes in file" (magit-changed-files "HEAD") "No changed files"))) - (magit-with-toplevel - (let ((conf (current-window-configuration)) - (bufA (magit-get-revision-buffer "HEAD" file)) - (bufB (get-file-buffer file))) - (ediff-buffers - (or bufA (magit-find-file-noselect "HEAD" file)) - (or bufB (find-file-noselect file)) - `((lambda () - (setq-local - ediff-quit-hook - (lambda () - ,@(unless bufA '((ediff-kill-buffer-carefully ediff-buffer-A))) - ,@(unless bufB '((ediff-kill-buffer-carefully ediff-buffer-B))) - (let ((magit-ediff-previous-winconf ,conf)) - (run-hooks 'magit-ediff-quit-hook)))))) - 'ediff-buffers)))) + (magit-ediff-buffers nil + ((magit-get-revision-buffer "HEAD" file) + (magit-find-file-noselect "HEAD" file)) + ((get-file-buffer file) + (find-file-noselect file)))) ;;;###autoload (defun magit-ediff-show-commit (commit) @@ -452,27 +439,13 @@ stash that were staged." (fileB fileC)) (if (and magit-ediff-show-stash-with-index (member fileA (magit-changed-files revB revA))) - (let ((conf (current-window-configuration)) - (bufA (magit-get-revision-buffer revA fileA)) - (bufB (magit-get-revision-buffer revB fileB)) - (bufC (magit-get-revision-buffer revC fileC))) - (ediff-buffers3 - (or bufA (magit-find-file-noselect revA fileA)) - (or bufB (magit-find-file-noselect revB fileB)) - (or bufC (magit-find-file-noselect revC fileC)) - `((lambda () - (setq-local - ediff-quit-hook - (lambda () - ,@(unless bufA - '((ediff-kill-buffer-carefully ediff-buffer-A))) - ,@(unless bufB - '((ediff-kill-buffer-carefully ediff-buffer-B))) - ,@(unless bufC - '((ediff-kill-buffer-carefully ediff-buffer-C))) - (let ((magit-ediff-previous-winconf ,conf)) - (run-hooks 'magit-ediff-quit-hook)))))) - 'ediff-buffers3)) + (magit-ediff-buffers nil + ((magit-get-revision-buffer revA fileA) + (magit-find-file-noselect revA fileA)) + ((magit-get-revision-buffer revB fileB) + (magit-find-file-noselect revB fileB)) + ((magit-get-revision-buffer revC fileC) + (magit-find-file-noselect revC fileC))) (magit-ediff-compare revA revC fileA fileC)))) (defun magit-ediff-cleanup-auxiliary-buffers () diff --git a/elpa/magit-20210128.1702/magit-extras.el b/elpa/magit-20210802.1524/magit-extras.el similarity index 93% rename from elpa/magit-20210128.1702/magit-extras.el rename to elpa/magit-20210802.1524/magit-extras.el index 1204e151..a7f1cbe9 100644 --- a/elpa/magit-20210128.1702/magit-extras.el +++ b/elpa/magit-20210802.1524/magit-extras.el @@ -5,6 +5,11 @@ ;; 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 + +;; 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) @@ -60,8 +65,7 @@ (defun magit-run-git-gui () "Run `git gui' for the current git repository." (interactive) - (magit-with-toplevel - (magit-process-file magit-git-executable nil 0 nil "gui"))) + (magit-with-toplevel (magit-process-git 0 "gui"))) ;;;###autoload (defun magit-run-git-gui-blame (commit filename &optional linenum) @@ -83,10 +87,10 @@ blame to center around the line point is on." (magit-file-relative-name buffer-file-name))) (line-number-at-pos))))) (magit-with-toplevel - (apply #'magit-process-file magit-git-executable nil 0 nil "gui" "blame" - `(,@(and linenum (list (format "--line=%d" linenum))) - ,commit - ,filename)))) + (magit-process-git 0 "gui" "blame" + (and linenum (list (format "--line=%d" linenum))) + commit + filename))) ;;;###autoload (defun magit-run-gitk () @@ -141,13 +145,23 @@ like pretty much every other keymap: (interactive) (magit-status-setup-buffer (project-root (project-current t)))) +(defvar magit-bind-magit-project-status t + "Whether to bind \"m\" to `magit-project-status' in `project-prefix-map'. +If so, then an entry is added to `project-switch-commands' as +well. If you want to use another key, then you must set this +to nil before loading Magit to prevent \"m\" from being bound.") + (with-eval-after-load 'project ;; Only more recent versions of project.el have `project-prefix-map' and ;; `project-switch-commands', though project.el is available in Emacs 25. - (when (boundp 'project-prefix-map) - (define-key project-prefix-map "m" #'magit-project-status)) - (when (boundp 'project-switch-commands) - (add-to-list 'project-switch-commands '(?m "Magit" magit-status)))) + (when (and magit-bind-magit-project-status + (boundp 'project-prefix-map) + ;; Only modify if it hasn't already been modified. + (equal project-switch-commands + (eval (car (get 'project-switch-commands 'standard-value)) + t))) + (define-key project-prefix-map "m" #'magit-project-status) + (add-to-list 'project-switch-commands '(magit-project-status "Magit") t))) ;;;###autoload (defun magit-dired-jump (&optional other-window) @@ -412,7 +426,7 @@ Otherwise the author dates are also changed." :type 'boolean) ;;;###autoload -(defun magit-reshelve-since (rev) +(defun magit-reshelve-since (rev keyid) "Change the author and committer dates of the commits since REV. Ask the user for the first reachable commit whose dates should @@ -422,8 +436,14 @@ values. The next commit will be created one minute later and so on. This command is only intended for interactive use and should only -be used on highly rearranged and unpublished history." - (interactive (list nil)) +be used on highly rearranged and unpublished history. + +If KEYID is non-nil, then use that to sign all reshelved commits. +Interactively use the value of the \"--gpg-sign\" option in the +list returned by `magit-rebase-arguments'." + (interactive (list nil + (transient-arg-value "--gpg-sign=" + (magit-rebase-arguments)))) (let* ((current (or (magit-get-current-branch) (user-error "Refusing to reshelve detached head"))) (backup (concat "refs/original/refs/heads/" current))) @@ -433,7 +453,9 @@ be used on highly rearranged and unpublished history." (not (magit-y-or-n-p (format "Backup ref %s already exists. Override? " backup)))) (user-error "Abort")) - (magit-log-select 'magit-reshelve-since + (magit-log-select + (lambda (rev) + (magit-reshelve-since rev keyid)) "Type %p on a commit to reshelve it and the commits above it,")) (t (cl-flet ((adjust (time offset) @@ -473,7 +495,11 @@ be used on highly rearranged and unpublished history." (format "export GIT_COMMITTER_DATE=\"%s\";;" date)) (cl-incf date 60))) (magit-git-lines "rev-list" "--reverse" range) - " ")) + " ")) + (and keyid + (list "--commit-filter" + (format "git commit-tree --gpg-sign=%s \"$@\";" + keyid))) range "--")) (set-process-sentinel magit-this-process @@ -490,7 +516,9 @@ be used on highly rearranged and unpublished history." (defvar magit-revision-stack nil) (defcustom magit-pop-revision-stack-format - '("[%N: %h] " "%N: %H\n %s\n" "\\[\\([0-9]+\\)[]:]") + '("[%N: %h] " + "%N: %cs %H\n %s\n" + "\\[\\([0-9]+\\)[]:]") "Control how `magit-pop-revision-stack' inserts a revision. The command `magit-pop-revision-stack' inserts a representation @@ -521,7 +549,7 @@ The expansion of POINT-FORMAT is inserted at point, and the expansion of EOB-FORMAT is inserted at the end of the buffer (if the buffer ends with a comment, then it is inserted right before that)." - :package-version '(magit . "2.3.0") + :package-version '(magit . "3.2.0") :group 'magit-commands :type '(list (choice (string :tag "Insert at point format") (cons (string :tag "Insert at point format") diff --git a/elpa/magit-20210128.1702/magit-fetch.el b/elpa/magit-20210802.1524/magit-fetch.el similarity index 99% rename from elpa/magit-20210128.1702/magit-fetch.el rename to elpa/magit-20210802.1524/magit-fetch.el index 557749ee..e4006150 100644 --- a/elpa/magit-20210128.1702/magit-fetch.el +++ b/elpa/magit-20210802.1524/magit-fetch.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) diff --git a/elpa/magit-20210128.1702/magit-files.el b/elpa/magit-20210802.1524/magit-files.el similarity index 95% rename from elpa/magit-20210128.1702/magit-files.el rename to elpa/magit-20210802.1524/magit-files.el index 70b8e95c..160de383 100644 --- a/elpa/magit-20210128.1702/magit-files.el +++ b/elpa/magit-20210802.1524/magit-files.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) @@ -203,21 +205,25 @@ is done using `magit-find-index-noselect'." (unless (equal magit-buffer-refname "{index}") (user-error "%s isn't visiting the index" file)) (if (y-or-n-p (format "Update index with contents of %s" (buffer-name))) - (let ((index (make-temp-file "index")) + (let ((index (make-temp-name (magit-git-dir "magit-update-index-"))) (buffer (current-buffer))) (when magit-wip-before-change-mode (magit-wip-commit-before-change (list file) " before un-/stage")) - (let ((coding-system-for-write buffer-file-coding-system)) - (with-temp-file index - (insert-buffer-substring buffer))) - (magit-with-toplevel - (magit-call-git "update-index" "--cacheinfo" - (substring (magit-git-string "ls-files" "-s" file) - 0 6) - (magit-git-string "hash-object" "-t" "blob" "-w" - (concat "--path=" file) - "--" index) - file)) + (unwind-protect + (progn + (let ((coding-system-for-write buffer-file-coding-system)) + (with-temp-file index + (insert-buffer-substring buffer))) + (magit-with-toplevel + (magit-call-git + "update-index" "--cacheinfo" + (substring (magit-git-string "ls-files" "-s" file) + 0 6) + (magit-git-string "hash-object" "-t" "blob" "-w" + (concat "--path=" file) + "--" (magit-convert-filename-for-git index)) + file))) + (ignore-errors (delete-file index))) (set-buffer-modified-p nil) (when magit-wip-after-apply-mode (magit-wip-commit-after-apply (list file) " after un-/stage"))) @@ -294,7 +300,8 @@ to `magit-dispatch'." ("g" "Status" magit-status-here)] [("L" "Log..." magit-log) ("l" "Log" magit-log-buffer-file) - ("t" "Trace" magit-log-trace-definition)] + ("t" "Trace" magit-log-trace-definition) + (7 "M" "Merged" magit-log-merged)] [("B" "Blame..." magit-blame) ("b" "Blame" magit-blame-addition) ("r" "...removal" magit-blame-removal) @@ -311,7 +318,7 @@ to `magit-dispatch'." (5 "C-c c" "Checkout file" magit-file-checkout)]] (interactive) (transient-setup - (if (or buffer-file-name magit-buffer-file-name) + (if (magit-file-relative-name) 'magit-file-dispatch 'magit-dispatch))) diff --git a/elpa/magit-20210128.1702/magit-git.el b/elpa/magit-20210802.1524/magit-git.el similarity index 93% rename from elpa/magit-20210128.1702/magit-git.el rename to elpa/magit-20210802.1524/magit-git.el index a6d68aeb..68f9ff1f 100644 --- a/elpa/magit-20210128.1702/magit-git.el +++ b/elpa/magit-20210802.1524/magit-git.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) @@ -52,6 +54,7 @@ (declare-function magit-call-git "magit-process" (&rest args)) (declare-function magit-process-buffer "magit-process" (&optional nodisplay)) (declare-function magit-process-file "magit-process" (&rest args)) +(declare-function magit-process-git "magit-process" (destination &rest args)) (declare-function magit-process-insert-section "magit-process" (pwd program args &optional errcode errlog)) (defvar magit-this-error) @@ -60,7 +63,12 @@ ;; From later in `magit-git'. (defvar magit-tramp-process-environment nil) +;; From `magit-blame'. +(declare-function magit-current-blame-chunk "magit-blame" + (&optional type noerror)) + (eval-when-compile + (cl-pushnew 'orig-rev eieio--known-slot-names) (cl-pushnew 'number eieio--known-slot-names)) ;;; Git implementations @@ -68,12 +76,12 @@ (defvar magit-inhibit-libgit nil "Whether to inhibit the use of libgit.") -(defvar magit--libgit-available-p eieio-unbound +(defvar magit--libgit-available-p 'unknown "Whether libgit is available. Use the function by the same name instead of this variable.") (defun magit--libgit-available-p () - (if (eq magit--libgit-available-p eieio-unbound) + (if (eq magit--libgit-available-p 'unknown) (setq magit--libgit-available-p (and module-file-suffix (let ((libgit (locate-library "libgit"))) @@ -157,8 +165,19 @@ successfully.") (setcdr hack-entry path-hack) (push (cons core-exe path-hack) magit-git-w32-path-hack)) core-exe)))) + (and (eq system-type 'darwin) + (executable-find "git")) "git") - "The Git executable used by Magit." + "The Git executable used by Magit on the local host. +On remote machines `magit-remote-git-executable' is used instead." + :package-version '(magit . "3.2.0") + :group 'magit-process + :type 'string) + +(defcustom magit-remote-git-executable "git" + "The Git executable used by Magit on remote machines. +On the local host `magit-git-executable' is used instead." + :package-version '(magit . "3.2.0") :group 'magit-process :type 'string) @@ -221,6 +240,20 @@ that change the upstream and many that create new branches." :group 'magit-commands :type 'boolean) +(defcustom magit-list-refs-namespaces + '("refs/heads" + "refs/remotes" + "refs/tags" + "refs/pullreqs") + "List of ref namespaces considered when reading a ref. + +This controls the order of refs returned by `magit-list-refs', +which is called by functions like `magit-list-branch-names' to +generate the collection of refs." + :package-version '(magit . "3.1.0") + :group 'magit-commands + :type '(repeat string)) + (defcustom magit-list-refs-sortby nil "How to sort the ref collection in the prompt. @@ -304,6 +337,14 @@ as for that macro." (setq-local process-environment ,p) ,@body)))) +(defsubst magit-git-executable () + "Return value of `magit-git-executable' or `magit-remote-git-executable'. +The variable is chosen depending on whether `default-directory' +is remote." + (if (file-remote-p default-directory) + magit-remote-git-executable + magit-git-executable)) + (defun magit-process-git-arguments (args) "Prepare ARGS for a function that invokes Git. @@ -326,8 +367,7 @@ to do the following. (defun magit-git-exit-code (&rest args) "Execute Git with ARGS, returning its exit code." - (apply #'magit-process-file magit-git-executable nil nil nil - (magit-process-git-arguments args))) + (magit-process-git nil args)) (defun magit-git-success (&rest args) "Execute Git with ARGS, returning t if its exit code is 0." @@ -347,8 +387,7 @@ This is an experimental replacement for `magit-git-string', and still subject to major changes." (magit--with-refresh-cache (cons default-directory args) (magit--with-temp-process-buffer - (and (zerop (apply #'magit-process-file magit-git-executable nil t nil - (magit-process-git-arguments args))) + (and (zerop (magit-process-git t args)) (not (bobp)) (progn (goto-char (point-min)) @@ -368,8 +407,7 @@ still subject to major changes. Also see `magit-git-string-p'." (list default-directory 'magit-git-string-ng args) (magit--with-temp-process-buffer (let* ((args (magit-process-git-arguments args)) - (status (apply #'magit-process-file magit-git-executable - nil t nil args))) + (status (magit-process-git t args))) (if (zerop status) (and (not (bobp)) (progn @@ -395,8 +433,7 @@ ignore `magit-git-debug'." (setq args (-flatten args)) (magit--with-refresh-cache (cons default-directory args) (magit--with-temp-process-buffer - (apply #'magit-process-file magit-git-executable nil (list t nil) nil - (magit-process-git-arguments args)) + (magit-process-git (list t nil) args) (unless (bobp) (goto-char (point-min)) (buffer-substring-no-properties (point) (line-end-position)))))) @@ -406,8 +443,7 @@ ignore `magit-git-debug'." (setq args (-flatten args)) (magit--with-refresh-cache (cons default-directory args) (magit--with-temp-process-buffer - (apply #'magit-process-file magit-git-executable nil (list t nil) nil - (magit-process-git-arguments args)) + (magit-process-git (list t nil) args) (buffer-substring-no-properties (point-min) (point-max))))) (define-error 'magit-invalid-git-boolean "Not a Git boolean") @@ -419,7 +455,7 @@ signal `magit-invalid-git-boolean'." (pcase (magit-git-output args) ((or "true" "true\n") t) ((or "false" "false\n") nil) - (output (signal 'magit-invalid-git-boolean output)))) + (output (signal 'magit-invalid-git-boolean (list output))))) (defun magit-git-false (&rest args) "Execute Git with ARGS, returning t if it prints \"false\". @@ -428,7 +464,22 @@ signal `magit-invalid-git-boolean'." (pcase (magit-git-output args) ((or "true" "true\n") nil) ((or "false" "false\n") t) - (output (signal 'magit-invalid-git-boolean output)))) + (output (signal 'magit-invalid-git-boolean (list output))))) + +(defun magit-git-config-p (variable &optional default) + "Return the boolean value of the Git variable VARIABLE. +VARIABLE has to be specified as a string. Return DEFAULT (which +defaults to nil) if VARIABLE is unset. If VARIABLE's value isn't +a boolean, then raise an error." + (let ((args (list "config" "--bool" "--default" (if default "true" "false") + variable))) + (magit--with-refresh-cache (cons default-directory args) + (magit--with-temp-process-buffer + (let ((status (magit-process-git t args)) + (output (buffer-substring (point-min) (1- (point-max))))) + (if (zerop status) + (equal output "true") + (signal 'magit-invalid-git-boolean (list output)))))))) (defun magit-git-insert (&rest args) "Execute Git with ARGS, inserting its output at point. @@ -441,8 +492,7 @@ add a section in the respective process buffer." (progn (setq log (make-temp-file "magit-stderr")) (delete-file log) - (let ((exit (apply #'magit-process-file magit-git-executable - nil (list t log) nil args))) + (let ((exit (magit-process-git (list t log) args))) (when (> exit 0) (let ((msg "Git failed")) (when (file-exists-p log) @@ -460,8 +510,7 @@ add a section in the respective process buffer." (message "%s" msg))) exit)) (ignore-errors (delete-file log)))) - (apply #'magit-process-file magit-git-executable - nil (list t nil) nil args))) + (magit-process-git (list t nil) args))) (defun magit--locate-error-message () (goto-char (point-max)) @@ -536,8 +585,8 @@ call function WASHER with ARGS as its sole argument." (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)) + (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")) @@ -563,11 +612,13 @@ call function WASHER with ARGS as its sole argument." (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." + "Return the boolean value of the Git variable specified by KEYS. +Also see `magit-git-config-p'." (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")))) + (equal (if magit--refresh-cache + (car (last (magit-config-get-from-cached-list key))) + (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." @@ -746,13 +797,27 @@ returning the truename." (magit--not-inside-repository-error))))) (define-error 'magit-outside-git-repo "Not inside Git repository") +(define-error 'magit-corrupt-git-config "Corrupt Git configuration") (define-error 'magit-git-executable-not-found "Git executable cannot be found (see https://magit.vc/goto/e6a78ed2)") +(defun magit--assert-usable-git () + (if (not (executable-find (magit-git-executable))) + (signal 'magit-git-executable-not-found (magit-git-executable)) + (let ((magit-git-debug + (lambda (err) + (signal 'magit-corrupt-git-config + (format "%s: %s" default-directory err))))) + ;; This should always succeed unless there's a corrupt config + ;; (or at least a similarly severe failing state). Note that + ;; git-config's --default is avoided because it's not available + ;; until Git 2.18. + (magit-git-string "config" "--get-color" "" "reset")) + nil)) + (defun magit--not-inside-repository-error () - (if (executable-find magit-git-executable) - (signal 'magit-outside-git-repo default-directory) - (signal 'magit-git-executable-not-found magit-git-executable))) + (magit--assert-usable-git) + (signal 'magit-outside-git-repo default-directory)) (defun magit-inside-gitdir-p (&optional noerror) "Return t if `default-directory' is below the repository directory. @@ -1185,9 +1250,11 @@ Git." (substring it 8)))) (defun magit-name-tag (rev &optional lax) - (--when-let (magit-rev-name rev "refs/tags/*") - (and (or lax (not (string-match-p "[~^]" it))) - (substring it 5)))) + (when-let ((name (magit-rev-name rev "refs/tags/*"))) + (when (string-suffix-p "^0" name) + (setq name (substring name 0 -2))) + (and (or lax (not (string-match-p "[~^]" name))) + (substring name 5)))) (defun magit-ref-abbrev (refname) "Return an unambiguous abbreviation of REFNAME." @@ -1241,7 +1308,7 @@ to, or to some other symbolic-ref that points to the same ref." (magit-ref-equal a b))))) (defun magit-headish () - "Return \"HEAD\" or if that doesn't exist the hash of the empty tree." + "Return the `HEAD' or if that doesn't exist the hash of the empty tree." (if (magit-no-commit-p) (magit-git-string "mktree") "HEAD")) @@ -1283,15 +1350,16 @@ to, or to some other symbolic-ref that points to the same ref." (defun magit-commit-at-point () (or (magit-section-value-if 'commit) + (thing-at-point 'git-revision t) + (when-let ((chunk (magit-current-blame-chunk 'addition t))) + (oref chunk orig-rev)) (and (derived-mode-p 'magit-stash-mode 'magit-merge-preview-mode 'magit-revision-mode) magit-buffer-revision))) (defun magit-branch-or-commit-at-point () - (or (and magit-buffer-file-name - magit-buffer-refname) - (magit-section-case + (or (magit-section-case (branch (magit-ref-maybe-qualify (oref it value))) (commit (or (magit--painted-branch-at-point) (let ((rev (oref it value))) @@ -1303,6 +1371,10 @@ to, or to some other symbolic-ref that points to the same ref." (magit-ref-p (format "refs/pullreqs/%s" (oref (oref it value) number)))))) (thing-at-point 'git-revision t) + (when-let ((chunk (magit-current-blame-chunk 'addition t))) + (oref chunk orig-rev)) + (and magit-buffer-file-name + magit-buffer-refname) (and (derived-mode-p 'magit-stash-mode 'magit-merge-preview-mode 'magit-revision-mode) @@ -1439,7 +1511,7 @@ according to the branch type." (when-let ((remotes (magit-list-remotes)) (remote (if (= (length remotes) 1) (car remotes) - (car (member "origin" remotes))))) + (magit-primary-remote)))) (magit--propertize-face remote 'magit-branch-remote)))) (defun magit-get-push-remote (&optional branch) @@ -1474,9 +1546,34 @@ according to the branch type." (or (magit-get-remote branch) (when-let ((main (magit-main-branch))) (magit-get-remote main)) - (let ((remotes (magit-list-remotes))) - (or (car (member "origin" remotes)) - (car remotes))))) + (magit-primary-remote) + (car (magit-list-remotes)))) + +(defvar magit-primary-remote-names + '("upstream" "origin")) + +(defun magit-primary-remote () + "Return the primary remote. + +The primary remote is the remote that tracks the repository that +other repositories are forked from. It often is called \"origin\" +but because many people name their own fork \"origin\", using that +term would be ambiguous. Likewise we avoid the term \"upstream\" +because a branch's @{upstream} branch may be a local branch or a +branch from a remote other than the primary remote. + +If a remote exists whose name matches `magit.primaryRemote', then +that is considered the primary remote. If no remote by that name +exists, then remotes in `magit-primary-remote-names' are tried in +order and the first remote from that list that actually exists in +the current repository is considered its primary remote." + (let ((remotes (magit-list-remotes))) + (seq-find (lambda (name) + (member name remotes)) + (delete-dups + (delq nil + (cons (magit-get "magit.primaryRemote") + magit-primary-remote-names)))))) (defun magit-branch-merged-p (branch &optional target) "Return non-nil if BRANCH is merged into its upstream and TARGET. @@ -1568,9 +1665,6 @@ where COMMITS is the number of commits in TAG but not in REV." (list it (car (magit-rev-diff-count it rev))) it)))))) -(defvar magit-list-refs-namespaces - '("refs/heads" "refs/remotes" "refs/tags" "refs/pull")) - (defun magit-list-refs (&optional namespaces format sortby) "Return list of references. @@ -1579,7 +1673,7 @@ rather than those from `magit-list-refs-namespaces'. FORMAT is passed to the `--format' flag of `git for-each-ref' and defaults to \"%(refname)\". If the format is \"%(refname)\" -or \"%(refname:short)\", then drop the symbolic-ref \"HEAD\". +or \"%(refname:short)\", then drop the symbolic-ref `HEAD'. SORTBY is a key or list of keys to pass to the `--sort' flag of `git for-each-ref'. When nil, use `magit-list-refs-sortby'" @@ -1630,7 +1724,7 @@ SORTBY is a key or list of keys to pass to the `--sort' flag of (defun magit-list-branches-pointing-at (commit) (let ((re (format "\\`%s refs/\\(heads\\|remotes\\)/\\(.*\\)\\'" - (magit-rev-verify commit)))) + (magit-rev-verify commit)))) (--keep (and (string-match re it) (let ((name (match-string 2 it))) (and (not (string-suffix-p "HEAD" name)) @@ -1788,10 +1882,10 @@ PATH has to be relative to the super-repository." (defun magit-main-branch () "Return the main branch. -If a branch exists whose name that matches `init.defaultBranch' -then that is considered the main branch. If no branch by that -name exists, then the branch names in `magit-main-branch-names' -are tried in order. The first matching branch that actually +If a branch exists whose name matches `init.defaultBranch', then +that is considered the main branch. If no branch by that name +exists, then the branch names in `magit-main-branch-names' are +tried in order. The first branch from that list that actually exists in the current repository is considered its main branch." (let ((branches (magit-list-local-branch-names))) (seq-find (lambda (name) @@ -1855,7 +1949,7 @@ Return a list of two integers: (A>B B>A)." (magit--with-temp-process-buffer (magit-process-file shell-file-name nil '(t nil) nil shell-command-switch - (let ((exec (shell-quote-argument magit-git-executable))) + (let ((exec (shell-quote-argument (magit-git-executable)))) (format "%s diff-tree -u %s | %s patch-id" exec rev exec))) (car (split-string (buffer-string))))) @@ -2107,7 +2201,10 @@ and this option only controls what face is used.") (re-search-forward (format "\\=[^%s]*" c) nil t)))) (bounds-of-thing-at-point 'git-revision))) (let ((text (buffer-substring-no-properties (car it) (cdr it)))) - (and (magit-commit-p text) text)))) + (and (>= (length text) 7) + (string-match-p "[a-z]" text) + (magit-commit-p text) + text)))) ;;; Completion @@ -2139,10 +2236,11 @@ and this option only controls what face is used.") (magit-get-current-branch)))) (defun magit-read-range (prompt &optional default) - (magit-completing-read-multiple prompt - (magit-list-refnames) - "\\.\\.\\.?" - default 'magit-revision-history)) + (let ((crm-separator "\\.\\.\\.?")) + (magit-completing-read-multiple* + (concat prompt ": ") + (magit-list-refnames) + nil nil nil 'magit-revision-history default nil t))) (defun magit-read-remote-branch (prompt &optional remote default local-branch require-match) @@ -2181,7 +2279,7 @@ and this option only controls what face is used.") (or (magit-completing-read prompt choices nil nil nil 'magit-revision-history (or (magit-local-branch-at-point) commit)) - (user-error "Nothing selected")))) + (user-error "Nothing selected")))) (defun magit-read-local-branch-or-ref (prompt &optional secondary-default) (magit-completing-read prompt (nconc (magit-list-local-branch-names) diff --git a/elpa/magit-20210128.1702/magit-gitignore.el b/elpa/magit-20210802.1524/magit-gitignore.el similarity index 96% rename from elpa/magit-20210128.1702/magit-gitignore.el rename to elpa/magit-20210802.1524/magit-gitignore.el index adbacb0c..da4101e2 100644 --- a/elpa/magit-20210128.1702/magit-gitignore.el +++ b/elpa/magit-20210802.1524/magit-gitignore.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) @@ -68,8 +70,8 @@ repository. Also stage the file." ;;;###autoload (defun magit-gitignore-in-subdir (rule directory) - "Add the Git ignore RULE to a \".gitignore\" file. -Prompted the user for a directory and add the rule to the + "Add the Git ignore RULE to a \".gitignore\" file in DIRECTORY. +Prompt the user for a directory and add the rule to the \".gitignore\" file in that directory. Since such files are tracked, they are shared with other clones of the repository. Also stage the file." @@ -78,7 +80,7 @@ Also stage the file." (magit-with-toplevel (let ((file (expand-file-name ".gitignore" directory))) (magit--gitignore rule file) - (magit-run-git "add" file)))) + (magit-run-git "add" (magit-convert-filename-for-git file))))) ;;;###autoload (defun magit-gitignore-in-gitdir (rule) diff --git a/elpa/magit-20210128.1702/magit-imenu.el b/elpa/magit-20210802.1524/magit-imenu.el similarity index 99% rename from elpa/magit-20210128.1702/magit-imenu.el rename to elpa/magit-20210802.1524/magit-imenu.el index 2eddf3cf..774d302d 100644 --- a/elpa/magit-20210128.1702/magit-imenu.el +++ b/elpa/magit-20210802.1524/magit-imenu.el @@ -8,6 +8,8 @@ ;; Author: Damien Cassou ;; Maintainer: Jonas Bernoulli +;; 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) diff --git a/elpa/magit-20210128.1702/magit-log.el b/elpa/magit-20210802.1524/magit-log.el similarity index 95% rename from elpa/magit-20210128.1702/magit-log.el rename to elpa/magit-20210802.1524/magit-log.el index 42820926..887232ca 100644 --- a/elpa/magit-20210128.1702/magit-log.el +++ b/elpa/magit-20210802.1524/magit-log.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) @@ -75,11 +77,11 @@ :options '("--follow" "--grep" "-G" "-S" "-L")) (defcustom magit-log-revision-headers-format "\ -%+b +%+b%+N Author: %aN <%aE> Committer: %cN <%cE>" "Additional format string used with the `++header' argument." - :package-version '(magit . "2.3.0") + :package-version '(magit . "3.2.0") :group 'magit-log :type 'string) @@ -407,7 +409,8 @@ the upstream isn't ahead of the current branch) show." (7 "=s" "Limit to commits since" "--since=" transient-read-date) (7 "=u" "Limit to commits until" "--until=" transient-read-date) (magit-log:--grep) - (7 "-I" "Invert search pattern" "--invert-grep") + (7 "-i" "Search case-insensitive" ("-i" "--regexp-ignore-case")) + (7 "-I" "Invert search pattern" "--invert-grep") (magit-log:-G) ;2 (magit-log:-S) ;2 (magit-log:-L) ;2 @@ -468,7 +471,8 @@ the upstream isn't ahead of the current branch) show." (magit-log:-n) (magit:--author) (magit-log:--grep) - (7 "-I" "Invert search pattern" "--invert-grep") + (7 "-i" "Search case-insensitive" ("-i" "--regexp-ignore-case")) + (7 "-I" "Invert search pattern" "--invert-grep") (magit-log:-G) (magit-log:-S) (magit-log:-L)] @@ -591,16 +595,17 @@ the upstream isn't ahead of the current branch) show." (defun magit-log-read-revs (&optional use-current) (or (and use-current (--when-let (magit-get-current-branch) (list it))) - (let ((collection (magit-list-refnames nil t))) - (split-string - (magit-completing-read-multiple "Log rev,s" collection - "\\(\\.\\.\\.?\\|[, ]\\)" - (or (magit-branch-or-commit-at-point) - (unless use-current - (magit-get-previous-branch))) - 'magit-revision-history - magit-log-read-revs-map) - "[, ]" t)))) + (let ((crm-separator "\\(\\.\\.\\.?\\|[, ]\\)") + (crm-local-completion-map magit-log-read-revs-map)) + (split-string (magit-completing-read-multiple* + "Log rev,s: " + (magit-list-refnames nil t) + nil nil nil 'magit-revision-history + (or (magit-branch-or-commit-at-point) + (unless use-current + (magit-get-previous-branch))) + nil t) + "[, ]" t)))) (defun magit-log-read-pattern (option) "Read a string from the user to pass as parameter to OPTION." @@ -765,7 +770,7 @@ commits instead. This command requires git-when-merged, which is available from https://github.com/mhagger/git-when-merged." (interactive - (append (let ((commit (magit-read-branch-or-commit "Commit"))) + (append (let ((commit (magit-read-branch-or-commit "Log merge of commit"))) (list commit (magit-read-other-branch "Merged into" commit))) (magit-log-arguments))) @@ -775,11 +780,9 @@ https://github.com/mhagger/git-when-merged." (let (exit m) (with-temp-buffer (save-excursion - (setq exit (magit-process-file - magit-git-executable nil t nil - "when-merged" "-c" - "--abbrev" (number-to-string (magit-abbrev-length)) - commit branch))) + (setq exit (magit-process-git t "when-merged" "-c" + (magit-abbrev-arg) + commit branch))) (setq m (buffer-substring-no-properties (point) (line-end-position)))) (if (zerop exit) (magit-log-setup-buffer (list (format "%s^1..%s" m m)) @@ -873,6 +876,26 @@ is displayed in the current frame." "\\[magit-log-double-commit-limit] first")))) (user-error "Parent %s does not exist" parent-rev)))))) +(defun magit-log-move-to-revision (rev) + "Read a revision and move to it in current log buffer. + +If the chosen reference or revision isn't being displayed in +the current log buffer, then inform the user about that and do +nothing else. + +If invoked outside any log buffer, then display the log buffer +of the current repository first; creating it if necessary." + (interactive (list (magit-read-branch-or-commit "In log, jump to"))) + (with-current-buffer + (cond ((derived-mode-p 'magit-log-mode) + (current-buffer)) + ((when-let ((buf (magit-get-mode-buffer 'magit-log-mode))) + (pop-to-buffer-same-window buf))) + (t + (apply #'magit-log-all-branches (magit-log-arguments)))) + (unless (magit-log-goto-commit-section (magit-rev-abbrev rev)) + (user-error "%s isn't visible in the current log buffer" rev)))) + ;;;; Shortlog Commands ;;;###autoload (autoload 'magit-shortlog "magit-log" nil t) @@ -893,11 +916,15 @@ is displayed in the current frame." ("r" "range" magit-shortlog-range)]) (defun magit-git-shortlog (rev args) - (with-current-buffer (get-buffer-create "*magit-shortlog*") - (erase-buffer) - (save-excursion - (magit-git-insert "shortlog" args rev)) - (switch-to-buffer-other-window (current-buffer)))) + (let ((dir default-directory)) + (with-current-buffer (get-buffer-create "*magit-shortlog*") + (setq default-directory dir) + (setq buffer-read-only t) + (let ((inhibit-read-only t)) + (erase-buffer) + (save-excursion + (magit-git-insert "shortlog" args rev)) + (switch-to-buffer-other-window (current-buffer)))))) ;;;###autoload (defun magit-shortlog-since (rev args) @@ -927,6 +954,7 @@ is displayed in the current frame." (define-key map "\C-c\C-b" 'magit-go-backward) (define-key map "\C-c\C-f" 'magit-go-forward) (define-key map "\C-c\C-n" 'magit-log-move-to-parent) + (define-key map "j" 'magit-log-move-to-revision) (define-key map "=" 'magit-log-toggle-commit-limit) (define-key map "+" 'magit-log-double-commit-limit) (define-key map "-" 'magit-log-half-commit-limit) @@ -1209,6 +1237,17 @@ Do not add this to a hook variable." (`stash (oset section type 'stash)) (`module (oset section type 'module-commit)) (`bisect-log (setq hash (magit-rev-parse "--short" hash)))) + (setq hash (propertize hash 'font-lock-face + (pcase (and gpg (aref gpg 0)) + (?G 'magit-signature-good) + (?B 'magit-signature-bad) + (?U 'magit-signature-untrusted) + (?X 'magit-signature-expired) + (?Y 'magit-signature-expired-key) + (?R 'magit-signature-revoked) + (?E 'magit-signature-error) + (?N 'magit-hash) + (_ 'magit-hash)))) (when cherry (when (and (derived-mode-p 'magit-refs-mode) magit-refs-show-commit-count) @@ -1225,11 +1264,11 @@ Do not add this to a hook variable." 'magit-cherry-unmatched))) (insert ?\s)) (when align - (insert (propertize hash 'font-lock-face 'magit-hash) ?\s)) + (insert hash ?\s)) (when graph (insert graph)) (unless align - (insert (propertize hash 'font-lock-face 'magit-hash) ?\s)) + (insert hash ?\s)) (when (and refs (not magit-log-show-refname-after-summary)) (insert (magit-format-ref-labels refs) ?\s)) (when (eq style 'reflog) @@ -1238,16 +1277,6 @@ Do not add this to a hook variable." (insert (magit-reflog-format-subject (substring refsub 0 (if (string-match-p ":" refsub) -2 -1)))))) (when msg - (when gpg - (setq msg (propertize msg 'font-lock-face - (pcase (aref gpg 0) - (?G 'magit-signature-good) - (?B 'magit-signature-bad) - (?U 'magit-signature-untrusted) - (?X 'magit-signature-expired) - (?Y 'magit-signature-expired-key) - (?R 'magit-signature-revoked) - (?E 'magit-signature-error))))) (insert (funcall magit-log-format-message-function hash msg))) (when (and refs magit-log-show-refname-after-summary) (insert ?\s) @@ -1361,9 +1390,8 @@ If there is no revision buffer in the same frame, then do nothing." (setq magit--update-revision-buffer (list commit buffer)) (run-with-idle-timer magit-update-other-window-delay nil - (let ((args (with-current-buffer buffer - (let ((magit-direct-use-buffer-arguments 'selected)) - (magit-show-commit--arguments))))) + (let ((args (let ((magit-direct-use-buffer-arguments 'selected)) + (magit-show-commit--arguments)))) (lambda () (pcase-let ((`(,rev ,buf) magit--update-revision-buffer)) (setq magit--update-revision-buffer nil) @@ -1443,7 +1471,8 @@ The shortstat style is experimental and rather slow." (truncate-string-to-width (or author "") details-width - nil ?\s (make-string 1 magit-ellipsis)) + nil ?\s + (if (char-displayable-p ?…) "…" ">")) 'magit-log-author) " ")) (magit--propertize-face @@ -1598,11 +1627,12 @@ commit as argument." (funcall fun rev))) (defun magit-log-select-quit () - "Abort selecting a commit, don't act on any commit." + "Abort selecting a commit, don't act on any commit. +Call `magit-log-select-quit-function' if set." (interactive) - (magit-mode-bury-buffer 'kill) - (when magit-log-select-quit-function - (funcall magit-log-select-quit-function))) + (let ((fun magit-log-select-quit-function)) + (magit-mode-bury-buffer 'kill) + (when fun (funcall fun)))) ;;; Cherry Mode diff --git a/elpa/magit-20210128.1702/magit-margin.el b/elpa/magit-20210802.1524/magit-margin.el similarity index 99% rename from elpa/magit-20210128.1702/magit-margin.el rename to elpa/magit-20210802.1524/magit-margin.el index f01d63e0..2889238d 100644 --- a/elpa/magit-20210128.1702/magit-margin.el +++ b/elpa/magit-20210802.1524/magit-margin.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) diff --git a/elpa/magit-20210128.1702/magit-merge.el b/elpa/magit-20210802.1524/magit-merge.el similarity index 99% rename from elpa/magit-20210128.1702/magit-merge.el rename to elpa/magit-20210802.1524/magit-merge.el index 90c3a300..a50ca3dd 100644 --- a/elpa/magit-20210128.1702/magit-merge.el +++ b/elpa/magit-20210802.1524/magit-merge.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) @@ -56,7 +58,7 @@ [("p" "Preview merge" magit-merge-preview) "" ("s" "Squash merge" magit-merge-squash) - ("i" "Merge into" magit-merge-into)]] + ("i" "Dissolve" magit-merge-into)]] ["Actions" :if magit-merge-in-progress-p ("m" "Commit merge" magit-commit-create) diff --git a/elpa/magit-20210128.1702/magit-mode.el b/elpa/magit-20210802.1524/magit-mode.el similarity index 96% rename from elpa/magit-20210128.1702/magit-mode.el rename to elpa/magit-20210802.1524/magit-mode.el index 96ec6321..efa1614e 100644 --- a/elpa/magit-20210128.1702/magit-mode.el +++ b/elpa/magit-20210802.1524/magit-mode.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) @@ -195,9 +197,9 @@ support additional %-sequences." :group 'magit-buffers :type 'boolean) -(defcustom magit-bury-buffer-function 'magit-restore-window-configuration +(defcustom magit-bury-buffer-function 'magit-mode-quit-window "The function used to bury or kill the current Magit buffer." - :package-version '(magit . "2.3.0") + :package-version '(magit . "3.2.0") :group 'magit-buffers :type '(radio (function-item quit-window) (function-item magit-mode-quit-window) @@ -468,8 +470,8 @@ which visits the thing at point using `browse-url'." ["Cherry pick" magit-cherry-pick t] ["Revert commit" magit-revert t] "---" - ["Ignore globally" magit-gitignore-globally t] - ["Ignore locally" magit-gitignore-locally t] + ["Ignore at toplevel" magit-gitignore-in-topdir t] + ["Ignore in subdirectory" magit-gitignore-in-subdir t] ["Discard" magit-discard t] ["Reset head and index" magit-reset-mixed t] ["Stash" magit-stash-both t] @@ -511,6 +513,7 @@ Magit is documented in info node `(magit)'." (hack-dir-local-variables-non-file-buffer) (face-remap-add-relative 'header-line 'magit-header-line) (setq mode-line-process (magit-repository-local-get 'mode-line-process)) + (setq-local revert-buffer-function 'magit-refresh-buffer) (setq-local bookmark-make-record-function 'magit--make-bookmark) (setq-local isearch-filter-predicate 'magit-section--open-temporarily)) @@ -820,11 +823,11 @@ into thinking a buffer belongs to a repo that it doesn't.") If no such buffer exists then return nil. Multiple buffers with the same major-mode may exist for a repository but only one can -exist that hasn't been looked to its value. Return that buffer +exist that hasn't been locked to its value. Return that buffer \(or nil if there is no such buffer) unless VALUE is non-nil, in -which case return the buffer that has been looked to that value. +which case return the buffer that has been locked to that value. -If FRAME nil or omitted, then consider all buffers. Otherwise +If FRAME is nil or omitted, then consider all buffers. Otherwise only consider buffers that are displayed in some live window on some frame. If `all', then consider all buffers on all frames. @@ -992,7 +995,7 @@ window." ;;; Refresh Buffers -(defvar inhibit-magit-refresh nil) +(defvar magit-inhibit-refresh nil) (defun magit-refresh () "Refresh some buffers belonging to the current repository. @@ -1002,7 +1005,7 @@ Refresh the current buffer if its major mode derives from Run hooks `magit-pre-refresh-hook' and `magit-post-refresh-hook'." (interactive) - (unless inhibit-magit-refresh + (unless magit-inhibit-refresh (unwind-protect (let ((start (current-time)) (magit--refresh-cache (or magit--refresh-cache @@ -1054,7 +1057,7 @@ Run hooks `magit-pre-refresh-hook' and `magit-post-refresh-hook'." (defvar-local magit-refresh-start-time nil) -(defun magit-refresh-buffer () +(defun magit-refresh-buffer (&rest _ignore) "Refresh the current Magit buffer." (setq magit-refresh-start-time (current-time)) (let ((refresh (intern (format "%s-refresh-buffer" @@ -1064,15 +1067,20 @@ Run hooks `magit-pre-refresh-hook' and `magit-post-refresh-hook'." (when magit-refresh-verbose (message "Refreshing buffer `%s'..." (buffer-name))) (let* ((buffer (current-buffer)) - (windows - (--mapcat (with-selected-window it - (with-current-buffer buffer - (when-let ((section (magit-current-section))) - (list - (nconc (list it section) - (magit-refresh-get-relative-position)))))) - (or (get-buffer-window-list buffer nil t) - (list (selected-window)))))) + (windows (cl-mapcan + (lambda (window) + (with-selected-window window + (with-current-buffer buffer + (when-let ((section (magit-current-section))) + `(( ,window + ,section + ,@(magit-refresh-get-relative-position))))))) + ;; If it qualifies, then the selected window + ;; comes first, but we want to handle it last + ;; so that its `magit-section-movement-hook' + ;; run can override the effects of other runs. + (or (nreverse (get-buffer-window-list buffer nil t)) + (list (selected-window)))))) (deactivate-mark) (setq magit-section-highlight-overlays nil) (setq magit-section-highlighted-section nil) @@ -1084,9 +1092,12 @@ Run hooks `magit-pre-refresh-hook' and `magit-post-refresh-hook'." (save-excursion (apply refresh (with-no-warnings magit-refresh-args)))) (pcase-dolist (`(,window . ,args) windows) - (with-selected-window window + (if (eq buffer (window-buffer window)) + (with-selected-window window + (apply #'magit-section-goto-successor args)) (with-current-buffer buffer - (apply #'magit-section-goto-successor args)))) + (let ((magit-section-movement-hook nil)) + (apply #'magit-section-goto-successor args))))) (run-hooks 'magit-refresh-buffer-hook) (magit-section-update-highlight) (set-buffer-modified-p nil)) @@ -1409,7 +1420,7 @@ repository's Magit buffers." (dolist (buffer (magit-mode-get-buffers)) (with-current-buffer buffer (setq magit-section-visibility-cache nil))) - (setq magit--libgit-available-p eieio-unbound)) + (setq magit--libgit-available-p 'unknown)) ;;; Utilities diff --git a/elpa/magit-20210128.1702/magit-notes.el b/elpa/magit-20210802.1524/magit-notes.el similarity index 94% rename from elpa/magit-20210128.1702/magit-notes.el rename to elpa/magit-20210802.1524/magit-notes.el index aaddf7a7..a541b032 100644 --- a/elpa/magit-20210128.1702/magit-notes.el +++ b/elpa/magit-20210802.1524/magit-notes.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) @@ -93,7 +95,7 @@ :prompt "Set global notes.displayRef") (transient-define-argument magit-notes:--ref () - :description "Merge strategy" + :description "Manipulate ref" :class 'transient-option :key "-r" :argument "--ref=" @@ -174,7 +176,7 @@ Also see `magit-notes-merge'." it (concat "refs/notes/" it)))) -(defun magit-notes-read-refs (prompt) +(defun magit-notes-read-refs (prompt &optional _initial-input _history) (mapcar (lambda (ref) (if (string-prefix-p "refs/" ref) ref @@ -190,10 +192,10 @@ Also see `magit-notes-merge'." ",")))) (defun magit-notes-read-args (prompt) - (list (magit-read-branch-or-commit prompt (magit-stash-at-point)) - (--when-let (--first (string-match "^--ref=\\(.+\\)" it) - (transient-args 'magit-notes)) - (match-string 1 it)))) + (list (magit-read-branch-or-commit prompt (magit-stash-at-point)) + (--when-let (--first (string-match "^--ref=\\(.+\\)" it) + (transient-args 'magit-notes)) + (match-string 1 it)))) ;;; _ (provide 'magit-notes) diff --git a/elpa/magit-20210128.1702/magit-obsolete.el b/elpa/magit-20210802.1524/magit-obsolete.el similarity index 96% rename from elpa/magit-20210128.1702/magit-obsolete.el rename to elpa/magit-20210802.1524/magit-obsolete.el index de73c4aa..f49f149b 100644 --- a/elpa/magit-20210128.1702/magit-obsolete.el +++ b/elpa/magit-20210802.1524/magit-obsolete.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) @@ -52,6 +54,9 @@ (define-obsolete-variable-alias 'magit-disable-line-numbers 'magit-section-disable-line-numbers "Magit 3.0.0") +(define-obsolete-variable-alias 'inhibit-magit-refresh + 'magit-inhibit-refresh "Magit 3.0.0") + (defun magit--magit-popup-warning () (display-warning 'magit "\ Magit no longer uses Magit-Popup. diff --git a/elpa/magit-20210128.1702/magit-patch.el b/elpa/magit-20210802.1524/magit-patch.el similarity index 99% rename from elpa/magit-20210128.1702/magit-patch.el rename to elpa/magit-20210802.1524/magit-patch.el index 105dec7e..c49e104b 100644 --- a/elpa/magit-20210128.1702/magit-patch.el +++ b/elpa/magit-20210802.1524/magit-patch.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) diff --git a/elpa/magit-20210802.1524/magit-pkg.el b/elpa/magit-20210802.1524/magit-pkg.el new file mode 100644 index 00000000..9c98e797 --- /dev/null +++ b/elpa/magit-20210802.1524/magit-pkg.el @@ -0,0 +1,18 @@ +(define-package "magit" "20210802.1524" "A Git porcelain inside Emacs." + '((emacs "25.1") + (dash "20210330") + (git-commit "20210801") + (magit-section "20210801") + (transient "20210701") + (with-editor "20210524")) + :commit "7b46191dedba053f1c44d5f13d4283860e26cbd6" :authors + '(("Marius Vollmer" . "marius.vollmer@gmail.com") + ("Jonas Bernoulli" . "jonas@bernoul.li")) + :maintainer + '("Jonas Bernoulli" . "jonas@bernoul.li") + :keywords + '("git" "tools" "vc") + :url "https://github.com/magit/magit") +;; Local Variables: +;; no-byte-compile: t +;; End: diff --git a/elpa/magit-20210128.1702/magit-process.el b/elpa/magit-20210802.1524/magit-process.el similarity index 93% rename from elpa/magit-20210128.1702/magit-process.el rename to elpa/magit-20210802.1524/magit-process.el index 034d82ec..7fef19fd 100644 --- a/elpa/magit-20210128.1702/magit-process.el +++ b/elpa/magit-20210802.1524/magit-process.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) @@ -171,11 +173,12 @@ itself from the hook, to avoid further futile attempts." "Please enter the passphrase for the ssh key" "Please enter the passphrase to unlock the OpenPGP secret key" "^.*'s password: ?$" + "^Token: $" ; For git-credential-manager-core (#4318). "^Yubikey for .*: ?$" "^Enter PIN for .*: ?$") "List of regexps matching password prompts of Git and its subprocesses. Also see `magit-process-find-password-functions'." - :package-version '(magit . "2.8.0") + :package-version '(magit . "3.0.0") :group 'magit-process :type '(repeat (regexp))) @@ -350,7 +353,7 @@ then raise an error." (defun magit-run-git (&rest args) "Call Git synchronously in a separate process, and refresh. -Option `magit-git-executable' specifies the Git executable and +Function `magit-git-executable' specifies the Git executable and option `magit-git-global-arguments' specifies constant arguments. The arguments ARGS specify arguments to Git, they are flattened before use. @@ -372,7 +375,7 @@ Process output goes into a new section in the buffer returned by (defun magit-call-git (&rest args) "Call Git synchronously in a separate process. -Option `magit-git-executable' specifies the Git executable and +Function `magit-git-executable' specifies the Git executable and option `magit-git-global-arguments' specifies constant arguments. The arguments ARGS specify arguments to Git, they are flattened before use. @@ -381,7 +384,8 @@ Process output goes into a new section in the buffer returned by `magit-process-buffer'." (run-hooks 'magit-pre-call-git-hook) (let ((default-process-coding-system (magit--process-coding-system))) - (apply #'magit-call-process magit-git-executable + (apply #'magit-call-process + (magit-git-executable) (magit-process-git-arguments args)))) (defun magit-call-process (program &rest args) @@ -395,6 +399,17 @@ Process output goes into a new section in the buffer returned by (apply #'magit-process-file program nil process-buf nil args)) process-buf (current-buffer) default-directory section))) +(defun magit-process-git (destination &rest args) + "Call Git synchronously in a separate process, returning its exit code. +DESTINATION specifies how to handle the output, like for +`call-process', except that file handlers are supported. +Enable Cygwin's \"noglob\" option during the call and +ensure unix eol conversion." + (apply #'magit-process-file + (magit-git-executable) + nil destination nil + (magit-process-git-arguments args))) + (defun magit-process-file (process &optional infile buffer display &rest args) "Process files synchronously in a separate process. Identical to `process-file' but temporarily enable Cygwin's @@ -435,7 +450,7 @@ The current buffer's content is used as the process's standard input. The buffer is assumed to be temporary and thus OK to modify. -Option `magit-git-executable' specifies the Git executable and +Function `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." @@ -456,11 +471,11 @@ flattened before use." (default-process-coding-system (magit--process-coding-system)) (flat-args (magit-process-git-arguments args)) (`(,process-buf . ,section) - (magit-process-setup magit-git-executable flat-args)) + (magit-process-setup (magit-git-executable) flat-args)) (inhibit-read-only t)) (magit-process-finish (apply #'call-process-region (point-min) (point-max) - magit-git-executable nil process-buf nil flat-args) + (magit-git-executable) nil process-buf nil flat-args) process-buf nil default-directory section)))) ;;; Asynchronous Processes @@ -476,7 +491,7 @@ current when this function was called (if it is a Magit buffer and still alive), as well as the respective Magit status buffer. See `magit-start-process' for more information." - (message "Running %s %s" magit-git-executable + (message "Running %s %s" (magit-git-executable) (let ((m (mapconcat #'identity (-flatten args) " "))) (remove-list-of-text-properties 0 (length m) '(face) m) m)) @@ -524,7 +539,7 @@ If INPUT is non-nil, it has to be a buffer or the name of an existing buffer. The buffer content becomes the processes standard input. -Option `magit-git-executable' specifies the Git executable and +Function `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. @@ -536,7 +551,7 @@ and still alive), as well as the respective Magit status buffer. 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 + (apply #'magit-start-process (magit-git-executable) input (magit-process-git-arguments args)))) (defun magit-start-process (program &optional input &rest args) @@ -576,11 +591,11 @@ Magit status buffer." (when (eq system-type 'windows-nt) ;; On w32, git expects UTF-8 encoded input, ignore any user ;; configuration telling us otherwise. - (set-process-coding-system process 'utf-8-unix)) + (set-process-coding-system process nil 'utf-8-unix)) (process-put process 'section section) (process-put process 'command-buf (current-buffer)) (process-put process 'default-dir default-directory) - (when inhibit-magit-refresh + (when magit-inhibit-refresh (process-put process 'inhibit-refresh t)) (oset section process process) (with-current-buffer process-buf @@ -607,7 +622,7 @@ Magit status buffer." (default-process-coding-system (magit--process-coding-system))) (apply #'start-file-process "git" process-buf - magit-git-executable args)))) + (magit-git-executable) args)))) (process-put process 'command-buf command-buf) (process-put process 'parsed (point)) (setq magit-this-process process) @@ -648,12 +663,15 @@ Magit status buffer." (defun magit-process--format-arguments (program args) (cond - ((and args (equal program magit-git-executable)) + ((and args (equal program (magit-git-executable))) (setq args (-split-at (length magit-git-global-arguments) args)) (concat (propertize (file-name-nondirectory program) 'font-lock-face 'magit-section-heading) " " - (propertize (char-to-string magit-ellipsis) + (propertize (if (stringp magit-ellipsis) + magit-ellipsis + ;; For backward compatibility. + (char-to-string magit-ellipsis)) 'font-lock-face 'magit-section-heading 'help-echo (mapconcat #'identity (car args) " ")) " " @@ -786,13 +804,38 @@ To use this function add it to the appropriate hook 'magit-process-password-auth-source) KEY typically derives from a prompt such as: - Password for 'https://tarsius@bitbucket.org' + Password for 'https://yourname@github.com' in which case it would be the string - tarsius@bitbucket.org + yourname@github.com which matches the ~/.authinfo.gpg entry - machine bitbucket.org login tarsius password 12345 + machine github.com login yourname password 12345 or iff that is undefined, for backward compatibility - machine tarsius@bitbucket.org password 12345" + machine yourname@github.com password 12345 + +On github.com you should not use your password but a +personal access token, see [1]. For information about +the peculiarities of other forges, please consult the +respective documentation. + +After manually editing ~/.authinfo.gpg you must reset +the cache using + M-x auth-source-forget-all-cached RET + +The above will save you from having to repeatedly type +your token or password, but you might still repeatedly +be asked for your username. To prevent that, change an +URL like + https://github.com/foo/bar.git +to + https://yourname@github.com/foo/bar.git + +Instead of changing all such URLs manually, they can +be translated on the fly by doing this once + git config --global \ + url.https://yourname@github.com.insteadOf \ + https://github.com + +[1]: https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token." (require 'auth-source) (and (string-match "\\`\\(.+\\)@\\([^@]+\\)\\'" key) (let* ((user (match-string 1 key)) @@ -806,6 +849,20 @@ or iff that is undefined, for backward compatibility (funcall secret) secret)))) +(defun magit-process-git-credential-manager-core (process string) + "Authenticate using `git-credential-manager-core'. + +To use this function add it to the appropriate hook + (add-hook 'magit-process-prompt-functions + 'magit-process-git-credential-manager-core)" + (and (string-match "^option (enter for default): $" string) + (progn + (magit-process-buffer) + (let ((option (format "%c\n" + (read-char-choice "Option: " '(?\r ?\j ?1 ?2))))) + (insert-before-markers-and-inherit option) + (process-send-string process option))))) + (defun magit-process-password-prompt (process string) "Find a password based on prompt STRING and send it to git. Use `magit-process-password-prompt-regexps' to find a known @@ -875,7 +932,7 @@ as argument." (condition-case nil (start-process "git-credential-cache--daemon" " *git-credential-cache--daemon*" - magit-git-executable + (magit-git-executable) "credential-cache--daemon" magit-credential-cache-daemon-socket) ;; Some Git implementations (e.g. Windows) won't have @@ -918,7 +975,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) + (when (equal program (magit-git-executable)) (setq args (nthcdr (length magit-git-global-arguments) args))) (let ((str (concat " " (propertize (concat (file-name-nondirectory program) @@ -967,8 +1024,8 @@ If STR is supplied, it replaces the `mode-line-process' text." ;; The following closure captures the repokey value, and is ;; added to `pre-command-hook'. (cl-labels ((enable-magit-process-unset-mode-line - () ;; Remove ourself from the hook variable, so - ;; that we only run once. + () ;;; Remove ourself from the hook variable, so + ;;; that we only run once. (remove-hook 'pre-command-hook #'enable-magit-process-unset-mode-line) ;; Clear the inhibit flag for the repository in diff --git a/elpa/magit-20210128.1702/magit-pull.el b/elpa/magit-20210802.1524/magit-pull.el similarity index 99% rename from elpa/magit-20210128.1702/magit-pull.el rename to elpa/magit-20210802.1524/magit-pull.el index ad530724..333cb3ed 100644 --- a/elpa/magit-20210128.1702/magit-pull.el +++ b/elpa/magit-20210802.1524/magit-pull.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) diff --git a/elpa/magit-20210128.1702/magit-push.el b/elpa/magit-20210802.1524/magit-push.el similarity index 95% rename from elpa/magit-20210128.1702/magit-push.el rename to elpa/magit-20210802.1524/magit-push.el index ae1ec4b7..aae8d8ce 100644 --- a/elpa/magit-20210128.1702/magit-push.el +++ b/elpa/magit-20210802.1524/magit-push.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) @@ -88,8 +90,10 @@ argument the push-remote can be changed before pushed to it." (magit--select-push-remote "push there"))) (when changed (magit-confirm 'set-and-push - (format "Really use \"%s\" as push-remote and push \"%s\" there" - remote branch))) + (replace-regexp-in-string + "%" "%%" + (format "Really use \"%s\" as push-remote and push \"%s\" there" + remote branch)))) (run-hooks 'magit-credential-hook) (magit-run-git-async "push" "-v" args remote (format "refs/heads/%s:refs/heads/%s" @@ -148,8 +152,10 @@ the upstream." ;; is what the user wants to happen. (setq merge (concat "refs/heads/" merge))) (magit-confirm 'set-and-push - (format "Really use \"%s\" as upstream and push \"%s\" there" - upstream branch))) + (replace-regexp-in-string + "%" "%%" + (format "Really use \"%s\" as upstream and push \"%s\" there" + upstream branch)))) (cl-pushnew "--set-upstream" args :test #'equal)) (run-hooks 'magit-credential-hook) (magit-run-git-async "push" "-v" args remote (concat branch ":" merge)))) @@ -215,11 +221,10 @@ 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-completing-read-multiple* + "Push refspec,s: " + (cons "HEAD" (magit-list-local-branch-names)) + nil nil nil 'magit-push-refspecs-history) (magit-push-arguments))) (run-hooks 'magit-credential-hook) (magit-run-git-async "push" "-v" args remote refspecs)) @@ -292,7 +297,7 @@ what this command will do. For example: (let ((default (magit-get "push.default"))) (unless (equal default "nothing") (or (when-let ((remote (or (magit-get-remote) - (magit-remote-p "origin"))) + (magit-primary-remote))) (refspec (magit-get "remote" remote "push"))) (format "%s using %s" (magit--propertize-face remote 'magit-branch-remote) diff --git a/elpa/magit-20210128.1702/magit-reflog.el b/elpa/magit-20210802.1524/magit-reflog.el similarity index 99% rename from elpa/magit-20210128.1702/magit-reflog.el rename to elpa/magit-20210802.1524/magit-reflog.el index 427322c4..384cfa40 100644 --- a/elpa/magit-20210128.1702/magit-reflog.el +++ b/elpa/magit-20210802.1524/magit-reflog.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) diff --git a/elpa/magit-20210128.1702/magit-refs.el b/elpa/magit-20210802.1524/magit-refs.el similarity index 97% rename from elpa/magit-20210128.1702/magit-refs.el rename to elpa/magit-20210802.1524/magit-refs.el index 90b08a6e..13ceec79 100644 --- a/elpa/magit-20210128.1702/magit-refs.el +++ b/elpa/magit-20210802.1524/magit-refs.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) @@ -525,9 +527,12 @@ line is inserted at all." (magit-insert-heading (magit-refs--format-focus-column tag 'tag) (propertize tag 'font-lock-face 'magit-tag) - (make-string (max 1 (- magit-refs-primary-column-width - (length tag))) - ?\s) + (make-string + (max 1 (- (if (consp magit-refs-primary-column-width) + (car magit-refs-primary-column-width) + magit-refs-primary-column-width) + (length tag))) + ?\s) (and msg (magit-log-propertize-keywords nil msg))) (when (and magit-refs-margin-for-tags (magit-buffer-margin-p)) (magit-refs--format-margin tag)) @@ -566,9 +571,12 @@ line is inserted at all." (magit-refs--format-focus-column branch) (magit-refs--propertize-branch abbrev ref (and headp 'magit-branch-remote-head)) - (make-string (max 1 (- magit-refs-primary-column-width - (length abbrev))) - ?\s) + (make-string + (max 1 (- (if (consp magit-refs-primary-column-width) + (car magit-refs-primary-column-width) + magit-refs-primary-column-width) + (length abbrev))) + ?\s) (and msg (magit-log-propertize-keywords nil msg)))) (when (magit-buffer-margin-p) (magit-refs--format-margin branch)) diff --git a/elpa/magit-20210128.1702/magit-remote.el b/elpa/magit-20210802.1524/magit-remote.el similarity index 99% rename from elpa/magit-20210128.1702/magit-remote.el rename to elpa/magit-20210802.1524/magit-remote.el index 057c904b..a2dd42cb 100644 --- a/elpa/magit-20210128.1702/magit-remote.el +++ b/elpa/magit-20210802.1524/magit-remote.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) diff --git a/elpa/magit-20210128.1702/magit-repos.el b/elpa/magit-20210802.1524/magit-repos.el similarity index 73% rename from elpa/magit-20210128.1702/magit-repos.el rename to elpa/magit-20210802.1524/magit-repos.el index db438084..271b80a7 100644 --- a/elpa/magit-20210128.1702/magit-repos.el +++ b/elpa/magit-20210802.1524/magit-repos.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) @@ -86,10 +88,16 @@ and with `default-directory' bound to the toplevel of its working tree. It has to return a string to be inserted or nil. PROPS is an alist that supports the keys `:right-align' and `:pad-right'. Some entries also use `:help-echo', but `tabulated-list' does not -actually support that yet." +actually support that yet. + +You may wish to display a range of numeric columns using just one +character per column and without any padding between columns, in +which case you should use an appropriat HEADER, set WIDTH to 1, +and set `:pad-right' to 0. \"+\" is substituted for numbers higher +than 9." :package-version '(magit . "2.12.0") :group 'magit-repolist - :type `(repeat (list :tag "Column" + :type '(repeat (list :tag "Column" (string :tag "Header Label") (integer :tag "Column Width") (function :tag "Inserter Function") @@ -116,6 +124,18 @@ as the value of `magit-repolist-column-flag'." :type '(alist :key-type (function :tag "Predicate Function") :value-type (string :tag "Flag"))) +(defcustom magit-repolist-sort-key '("Path" . nil) + "Initial sort key for buffer created by `magit-list-repositories'. +If nil, no additional sorting is performed. Otherwise, this +should be a cons cell (NAME . FLIP). NAME is a string matching +one of the column names in `magit-repolist-columns'. FLIP, if +non-nil, means to invert the resulting sort." + :package-version '(magit . "3.2.0") + :group 'magit-repolist + :type '(choice (const nil) + (cons (string :tag "Column name") + (boolean :tag "Flip order")))) + ;;; List Repositories ;;;; Command ;;;###autoload @@ -125,14 +145,7 @@ as the value of `magit-repolist-column-flag'." Use the options `magit-repository-directories' to control which repositories are displayed." (interactive) - (if magit-repository-directories - (with-current-buffer (get-buffer-create "*Magit Repositories*") - (magit-repolist-mode) - (magit-repolist-refresh) - (tabulated-list-print) - (switch-to-buffer (current-buffer))) - (message "You need to customize `magit-repository-directories' %s" - "before you can list repositories"))) + (magit-repolist-setup (default-value 'magit-repolist-columns))) ;;;; Mode @@ -154,46 +167,67 @@ repositories are displayed." "Major mode for browsing a list of Git repositories." (setq-local x-stretch-cursor nil) (setq tabulated-list-padding 0) - (setq tabulated-list-sort-key - (cons (or (car (assoc "Path" magit-repolist-columns)) - (caar magit-repolist-columns)) - nil)) - (setq tabulated-list-format - (vconcat (mapcar (pcase-lambda (`(,title ,width ,_fn ,props)) - (nconc (list title width t) - (-flatten props))) - magit-repolist-columns))) - (tabulated-list-init-header) (add-hook 'tabulated-list-revert-hook 'magit-repolist-refresh nil t) (setq imenu-prev-index-position-function 'magit-imenu--repolist-prev-index-position-function) (setq imenu-extract-index-name-function 'magit-imenu--repolist-extract-index-name-function)) +(defun magit-repolist-setup (columns) + (unless magit-repository-directories + (user-error "You need to customize `magit-repository-directories' %s" + "before you can list repositories")) + (with-current-buffer (get-buffer-create "*Magit Repositories*") + (magit-repolist-mode) + (setq-local magit-repolist-columns columns) + (magit-repolist-refresh) + (switch-to-buffer (current-buffer)))) + (defun magit-repolist-refresh () + (unless tabulated-list-sort-key + (setq tabulated-list-sort-key + (pcase-let ((`(,column . ,flip) magit-repolist-sort-key)) + (cons (or (car (assoc column magit-repolist-columns)) + (caar magit-repolist-columns)) + flip)))) + (setq tabulated-list-format + (vconcat (mapcar (pcase-lambda (`(,title ,width ,_fn ,props)) + (nconc (list title width t) + (-flatten props))) + magit-repolist-columns))) (setq tabulated-list-entries (mapcar (pcase-lambda (`(,id . ,path)) (let ((default-directory path)) (list path - (vconcat (--map (or (funcall (nth 2 it) id) "") - magit-repolist-columns))))) + (vconcat + (mapcar (pcase-lambda (`(,title ,width ,fn ,props)) + (or (funcall fn `((:id ,id) + (:title ,title) + (:width ,width) + ,@props)) + "")) + magit-repolist-columns))))) (magit-list-repos-uniquify (--map (cons (file-name-nondirectory (directory-file-name it)) it) - (magit-list-repos)))))) + (magit-list-repos))))) + (message "Listing repositories...") + (tabulated-list-init-header) + (tabulated-list-print) + (message "Listing repositories...done")) ;;;; Columns -(defun magit-repolist-column-ident (id) +(defun magit-repolist-column-ident (spec) "Insert the identification of the repository. Usually this is just its basename." - id) + (cadr (assq :id spec))) -(defun magit-repolist-column-path (_id) +(defun magit-repolist-column-path (_) "Insert the absolute path of the repository." (abbreviate-file-name default-directory)) -(defun magit-repolist-column-version (_id) +(defun magit-repolist-column-version (_) "Insert a description of the repository's `HEAD' revision." (when-let ((v (or (magit-git-string "describe" "--tags" "--dirty") ;; If there are no tags, use the date in MELPA format. @@ -206,15 +240,15 @@ Usually this is just its basename." (concat " " v) v)))) -(defun magit-repolist-column-branch (_id) +(defun magit-repolist-column-branch (_) "Insert the current branch." (magit-get-current-branch)) -(defun magit-repolist-column-upstream (_id) +(defun magit-repolist-column-upstream (_) "Insert the upstream branch of the current branch." (magit-get-upstream-branch)) -(defun magit-repolist-column-flag (_id) +(defun magit-repolist-column-flag (_) "Insert a flag as specified by `magit-repolist-column-flag-alist'. By default this indicates whether there are uncommitted changes. @@ -226,43 +260,50 @@ Only one letter is shown, the first that applies." (and (funcall fun) flag)) magit-repolist-column-flag-alist)) -(defun magit-repolist-column-unpulled-from-upstream (_id) +(defun magit-repolist-column-flags (_) + "Insert all flags as specified by `magit-repolist-column-flag-alist'. +This is an alternative to function `magit-repolist-column-flag', +which only lists the first one found." + (mapconcat (pcase-lambda (`(,fun . ,flag)) + (if (funcall fun) flag " ")) + magit-repolist-column-flag-alist + "")) + +(defun magit-repolist-column-unpulled-from-upstream (spec) "Insert number of upstream commits not in the current branch." (--when-let (magit-get-upstream-branch) - (let ((n (cadr (magit-rev-diff-count "HEAD" it)))) - (magit--propertize-face - (number-to-string n) (if (> n 0) 'bold 'shadow))))) + (magit-repolist-insert-count (cadr (magit-rev-diff-count "HEAD" it)) spec))) -(defun magit-repolist-column-unpulled-from-pushremote (_id) +(defun magit-repolist-column-unpulled-from-pushremote (spec) "Insert number of commits in the push branch but not the current branch." (--when-let (magit-get-push-branch nil t) - (let ((n (cadr (magit-rev-diff-count "HEAD" it)))) - (magit--propertize-face - (number-to-string n) (if (> n 0) 'bold 'shadow))))) + (magit-repolist-insert-count (cadr (magit-rev-diff-count "HEAD" it)) spec))) -(defun magit-repolist-column-unpushed-to-upstream (_id) +(defun magit-repolist-column-unpushed-to-upstream (spec) "Insert number of commits in the current branch but not its upstream." (--when-let (magit-get-upstream-branch) - (let ((n (car (magit-rev-diff-count "HEAD" it)))) - (magit--propertize-face - (number-to-string n) (if (> n 0) 'bold 'shadow))))) + (magit-repolist-insert-count (car (magit-rev-diff-count "HEAD" it)) spec))) -(defun magit-repolist-column-unpushed-to-pushremote (_id) +(defun magit-repolist-column-unpushed-to-pushremote (spec) "Insert number of commits in the current branch but not its push branch." (--when-let (magit-get-push-branch nil t) - (let ((n (car (magit-rev-diff-count "HEAD" it)))) - (magit--propertize-face - (number-to-string n) (if (> n 0) 'bold 'shadow))))) + (magit-repolist-insert-count (car (magit-rev-diff-count "HEAD" it)) spec))) -(defun magit-repolist-column-branches (_id) +(defun magit-repolist-column-branches (spec) "Insert number of branches." - (let ((n (length (magit-list-local-branches)))) - (magit--propertize-face (number-to-string n) (if (> n 1) 'bold 'shadow)))) + (magit-repolist-insert-count (length (magit-list-local-branches)) + `((:normal-count 1) ,@spec))) -(defun magit-repolist-column-stashes (_id) +(defun magit-repolist-column-stashes (spec) "Insert number of stashes." - (let ((n (length (magit-list-stashes)))) - (magit--propertize-face (number-to-string n) (if (> n 0) 'bold 'shadow)))) + (magit-repolist-insert-count (length (magit-list-stashes)) spec)) + +(defun magit-repolist-insert-count (n spec) + (magit--propertize-face + (if (and (> n 9) (= (cadr (assq :width spec)) 1)) + "+" + (number-to-string n)) + (if (> n (or (cadr (assq :normal-count spec)) 0)) 'bold 'shadow))) ;;; Read Repository diff --git a/elpa/magit-20210128.1702/magit-reset.el b/elpa/magit-20210802.1524/magit-reset.el similarity index 99% rename from elpa/magit-20210128.1702/magit-reset.el rename to elpa/magit-20210802.1524/magit-reset.el index 5a6e5389..830e27e6 100644 --- a/elpa/magit-20210128.1702/magit-reset.el +++ b/elpa/magit-20210802.1524/magit-reset.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) diff --git a/elpa/magit-20210128.1702/magit-sequence.el b/elpa/magit-20210802.1524/magit-sequence.el similarity index 97% rename from elpa/magit-20210128.1702/magit-sequence.el rename to elpa/magit-20210802.1524/magit-sequence.el index e96a15c6..79407594 100644 --- a/elpa/magit-20210128.1702/magit-sequence.el +++ b/elpa/magit-20210802.1524/magit-sequence.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) @@ -146,7 +148,8 @@ This discards all changes made since the sequence started." ["Apply here" ("A" "Pick" magit-cherry-copy) ("a" "Apply" magit-cherry-apply) - ("h" "Harvest" magit-cherry-harvest)] + ("h" "Harvest" magit-cherry-harvest) + ("m" "Squash" magit-merge-squash)] ["Apply elsewhere" ("d" "Donate" magit-cherry-donate) ("n" "Spinout" magit-cherry-spinout) @@ -171,22 +174,22 @@ This discards all changes made since the sequence started." (defun magit--cherry-move-read-args (verb away fn) (declare (indent defun)) - (let ((commits (or (nreverse (magit-region-values 'commit)) - (list (funcall (if away - 'magit-read-branch-or-commit - 'magit-read-other-branch-or-commit) - (format "%s cherry" (capitalize verb)))))) - (current (magit-get-current-branch))) - (unless current - (user-error "Cannot %s cherries while HEAD is detached" verb)) - (let ((reachable (magit-rev-ancestor-p (car commits) current)) - (msg "Cannot %s cherries that %s reachable from HEAD")) - (pcase (list away reachable) - (`(nil t) (user-error msg verb "are")) - (`(t nil) (user-error msg verb "are not")))) - `(,commits - ,@(funcall fn commits) - ,(transient-args 'magit-cherry-pick)))) + (let ((commits (or (nreverse (magit-region-values 'commit)) + (list (funcall (if away + 'magit-read-branch-or-commit + 'magit-read-other-branch-or-commit) + (format "%s cherry" (capitalize verb)))))) + (current (magit-get-current-branch))) + (unless current + (user-error "Cannot %s cherries while HEAD is detached" verb)) + (let ((reachable (magit-rev-ancestor-p (car commits) current)) + (msg "Cannot %s cherries that %s reachable from HEAD")) + (pcase (list away reachable) + (`(nil t) (user-error msg verb "are")) + (`(t nil) (user-error msg verb "are not")))) + `(,commits + ,@(funcall fn commits) + ,(transient-args 'magit-cherry-pick)))) (defun magit--cherry-spinoff-read-args (verb) (magit--cherry-move-read-args verb t @@ -1039,12 +1042,12 @@ status buffer (i.e. the reverse of how they will be applied)." (t (list "done" rev 'magit-sequence-done))))) (magit-sequence-insert-commit "onto" onto - (if (equal onto head) - 'magit-sequence-head - 'magit-sequence-onto)))) + (if (equal onto head) + 'magit-sequence-head + 'magit-sequence-onto)))) (defun magit-sequence-insert-commit (type hash face) - (magit-insert-section (commit hash) + (magit-insert-section (commit hash) (magit-insert-heading (propertize type 'font-lock-face face) "\s" (magit-format-rev-summary hash) "\n"))) diff --git a/elpa/magit-20210128.1702/magit-stash.el b/elpa/magit-20210802.1524/magit-stash.el similarity index 98% rename from elpa/magit-20210128.1702/magit-stash.el rename to elpa/magit-20210802.1524/magit-stash.el index 2bba0e38..3ff6858f 100644 --- a/elpa/magit-20210128.1702/magit-stash.el +++ b/elpa/magit-20210802.1524/magit-stash.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) @@ -239,13 +241,7 @@ When the region is active offer to drop all contained stashes." (message "Deleted refs/%s (was %s)" stash (magit-rev-parse "--short" stash)) (magit-call-git "rev-parse" stash) - (magit-call-git "reflog" "delete" "--updateref" "--rewrite" stash)) - (when-let ((ref (and (string-match "\\(.+\\)@{[0-9]+}$" stash) - (match-string 1 stash)))) - (unless (string-match "^refs/" ref) - (setq ref (concat "refs/" ref))) - (unless (magit-rev-verify (concat ref "@{0}")) - (magit-run-git "update-ref" "-d" ref))) + (magit-call-git "stash" "drop" stash)) (magit-refresh)) ;;;###autoload @@ -270,7 +266,7 @@ The branch is created using `magit-branch-and-checkout', using the current branch or `HEAD' as the start-point." (interactive (list (magit-read-stash "Branch stash") (magit-read-string-ns "Branch name"))) - (let ((inhibit-magit-refresh t)) + (let ((magit-inhibit-refresh t)) (magit-branch-and-checkout branch (or (magit-get-current-branch) "HEAD"))) (magit-stash-apply stash)) diff --git a/elpa/magit-20210128.1702/magit-status.el b/elpa/magit-20210802.1524/magit-status.el similarity index 97% rename from elpa/magit-20210128.1702/magit-status.el rename to elpa/magit-20210802.1524/magit-status.el index 99ab8f68..a7cad428 100644 --- a/elpa/magit-20210128.1702/magit-status.el +++ b/elpa/magit-20210802.1524/magit-status.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) @@ -266,8 +268,9 @@ prefix arguments: (interactive (let ((magit--refresh-cache (list (cons 0 0)))) (list (and (or current-prefix-arg (not (magit-toplevel))) - (magit-read-repository - (>= (prefix-numeric-value current-prefix-arg) 16))) + (progn (magit--assert-usable-git) + (magit-read-repository + (>= (prefix-numeric-value current-prefix-arg) 16)))) magit--refresh-cache))) (let ((magit--refresh-cache (or cache (list (cons 0 0))))) (if directory @@ -321,25 +324,14 @@ Magit requires Git >= %s, but on %s the version is %s. If multiple Git versions are installed on the host, then the problem might be that TRAMP uses the wrong executable. -First check the value of `magit-git-executable'. Its value is -used when running git locally as well as when running it on a -remote host. The default value is \"git\", except on Windows -where an absolute path is used for performance reasons. - -If the value already is just \"git\" but TRAMP never-the-less -doesn't use the correct executable, then consult the info node -`(tramp)Remote programs'.\n" magit--minimal-git remote version) :error)) +Check the value of `magit-remote-git-executable' and consult +the info node `(tramp)Remote programs'. +" magit--minimal-git remote version) :error)) (display-warning 'magit (format "\ Magit cannot find Git on %s. -First check the value of `magit-git-executable'. Its value is -used when running git locally as well as when running it on a -remote host. The default value is \"git\", except on Windows -where an absolute path is used for performance reasons. - -If the value already is just \"git\" but TRAMP never-the-less -doesn't find the executable, then consult the info node -`(tramp)Remote programs'.\n" remote) :error))))) +Check the value of `magit-remote-git-executable' and consult +the info node `(tramp)Remote programs'." remote) :error))))) ;;; Mode diff --git a/elpa/magit-20210128.1702/magit-submodule.el b/elpa/magit-20210802.1524/magit-submodule.el similarity index 92% rename from elpa/magit-20210128.1702/magit-submodule.el rename to elpa/magit-20210802.1524/magit-submodule.el index 832011f1..9458f645 100644 --- a/elpa/magit-20210128.1702/magit-submodule.el +++ b/elpa/magit-20210802.1524/magit-submodule.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) @@ -81,9 +83,15 @@ of the column. FORMAT is a function that is called with one argument, the repository identification (usually its basename), and with `default-directory' bound to the toplevel of its working tree. It has to return a string to be inserted or nil. PROPS is -an alist that supports the keys `:right-align' and `:pad-right'." +an alist that supports the keys `:right-align' and `:pad-right'. + +You may wish to display a range of numeric columns using just one +character per column and without any padding between columns, in +which case you should use an appropriat HEADER, set WIDTH to 1, +and set `:pad-right' to 0. \"+\" is substituted for numbers higher +than 9." :package-version '(magit . "2.8.0") - :group 'magit-repolist-mode + :group 'magit-repolist :type `(repeat (list :tag "Column" (string :tag "Header Label") (integer :tag "Column Width") @@ -95,6 +103,18 @@ an alist that supports the keys `:right-align' and `:pad-right'." (symbol)) (sexp :tag "Value")))))) +(defcustom magit-submodule-list-sort-key '("Path" . nil) + "Initial sort key for buffer created by `magit-list-submodules'. +If nil, no additional sorting is performed. Otherwise, this +should be a cons cell (NAME . FLIP). NAME is a string matching +one of the column names in `magit-submodule-list-columns'. FLIP, +if non-nil, means to invert the resulting sort." + :package-version '(magit . "3.2.0") + :group 'magit-repolist + :type '(choice (const nil) + (cons (string :tag "Column name") + (boolean :tag "Flip order")))) + (defcustom magit-submodule-remove-trash-gitdirs nil "Whether `magit-submodule-remove' offers to trash module gitdirs. @@ -582,13 +602,7 @@ 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 - (or (magit-get-mode-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)) + (magit-submodule-list-setup magit-submodule-list-columns)) (defvar magit-submodule-list-mode-map (let ((map (make-sparse-keymap))) @@ -599,22 +613,35 @@ These sections can be expanded to show the respective commits." (define-derived-mode magit-submodule-list-mode tabulated-list-mode "Modules" "Major mode for browsing a list of Git submodules." :group 'magit-repolist-mode - (setq-local x-stretch-cursor nil) - (setq tabulated-list-padding 0) - (setq tabulated-list-sort-key (cons "Path" nil)) - (setq tabulated-list-format - (vconcat (mapcar (pcase-lambda (`(,title ,width ,_fn ,props)) - (nconc (list title width t) - (-flatten props))) - magit-submodule-list-columns))) - (tabulated-list-init-header) + (setq-local x-stretch-cursor nil) + (setq tabulated-list-padding 0) (add-hook 'tabulated-list-revert-hook 'magit-submodule-list-refresh nil t) (setq imenu-prev-index-position-function #'magit-imenu--submodule-prev-index-position-function) (setq imenu-extract-index-name-function #'magit-imenu--submodule-extract-index-name-function)) +(defun magit-submodule-list-setup (columns) + (magit-display-buffer + (or (magit-get-mode-buffer 'magit-submodule-list-mode) + (magit-with-toplevel + (magit-generate-new-buffer 'magit-submodule-list-mode)))) + (magit-submodule-list-mode) + (setq-local magit-repolist-columns columns) + (magit-submodule-list-refresh)) + (defun magit-submodule-list-refresh () + (unless tabulated-list-sort-key + (setq tabulated-list-sort-key + (pcase-let ((`(,column . ,flip) magit-submodule-list-sort-key)) + (cons (or (car (assoc column magit-submodule-list-columns)) + (caar magit-submodule-list-columns)) + flip)))) + (setq tabulated-list-format + (vconcat (mapcar (pcase-lambda (`(,title ,width ,_fn ,props)) + (nconc (list title width t) + (-flatten props))) + magit-repolist-columns))) (setq tabulated-list-entries (-keep (lambda (module) (let ((default-directory @@ -622,13 +649,22 @@ These sections can be expanded to show the respective commits." (and (file-exists-p ".git") (list module (vconcat - (--map (or (funcall (nth 2 it) module) "") - magit-submodule-list-columns)))))) - (magit-list-module-paths)))) + (mapcar (pcase-lambda (`(,title ,width ,fn ,props)) + (or (funcall fn `((:path ,module) + (:title ,title) + (:width ,width) + ,@props)) + "")) + magit-repolist-columns)))))) + (magit-list-module-paths))) + (message "Listing submodules...") + (tabulated-list-init-header) + (tabulated-list-print) + (message "Listing submodules...done")) -(defun magit-modulelist-column-path (path) +(defun magit-modulelist-column-path (spec) "Insert the relative path of the submodule." - path) + (cadr (assq :path spec))) ;;; Utilities diff --git a/elpa/magit-20210128.1702/magit-subtree.el b/elpa/magit-20210802.1524/magit-subtree.el similarity index 99% rename from elpa/magit-20210128.1702/magit-subtree.el rename to elpa/magit-20210802.1524/magit-subtree.el index 05f44672..34e9451e 100644 --- a/elpa/magit-20210128.1702/magit-subtree.el +++ b/elpa/magit-20210802.1524/magit-subtree.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) diff --git a/elpa/magit-20210128.1702/magit-tag.el b/elpa/magit-20210802.1524/magit-tag.el similarity index 99% rename from elpa/magit-20210128.1702/magit-tag.el rename to elpa/magit-20210802.1524/magit-tag.el index dbec9393..d19abbe7 100644 --- a/elpa/magit-20210128.1702/magit-tag.el +++ b/elpa/magit-20210802.1524/magit-tag.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) @@ -56,7 +58,7 @@ :class 'transient-option :shortarg "-u" :argument "--local-user=" - :reader 'magit-read-gpg-secret-key + :reader 'magit-read-gpg-signing-key :history-key 'magit:--gpg-sign) ;;;###autoload diff --git a/elpa/magit-20210128.1702/magit-transient.el b/elpa/magit-20210802.1524/magit-transient.el similarity index 99% rename from elpa/magit-20210128.1702/magit-transient.el rename to elpa/magit-20210802.1524/magit-transient.el index 8016182b..d03694b0 100644 --- a/elpa/magit-20210128.1702/magit-transient.el +++ b/elpa/magit-20210802.1524/magit-transient.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) @@ -196,4 +198,3 @@ ;;; _ (provide 'magit-transient) ;;; magit-transient.el ends here - diff --git a/elpa/magit-20210128.1702/magit-utils.el b/elpa/magit-20210802.1524/magit-utils.el similarity index 87% rename from elpa/magit-20210128.1702/magit-utils.el rename to elpa/magit-20210802.1524/magit-utils.el index 3b5dac45..bfd2827d 100644 --- a/elpa/magit-20210128.1702/magit-utils.el +++ b/elpa/magit-20210802.1524/magit-utils.el @@ -11,6 +11,8 @@ ;; Contains code from GNU Emacs https://www.gnu.org/software/emacs, ;; released under the GNU General Public License version 3 or later. +;; 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) @@ -108,7 +110,8 @@ alphabetical order, depending on your version of Ivy." (forge-edit-topic-note nil t) (forge-pull-pullreq nil t) (forge-visit-issue nil t) - (forge-visit-pullreq nil t)) + (forge-visit-pullreq nil t) + (forge-visit-topic nil t)) "When not to offer alternatives and ask for confirmation. Many commands by default ask the user to select from a list of @@ -161,6 +164,7 @@ The value has the form ((COMMAND nil|PROMPT DEFAULT)...). (const abort-merge) (const merge-dirty) (const delete-unmerged-branch) + (const delete-branch-on-remote) (const delete-pr-remote) (const drop-stashes) (const set-and-push) @@ -241,6 +245,13 @@ References: choice (or selecting another branch), but when a branch has not been merged yet, also make sure the user is aware of that. + `delete-branch-on-remote' Deleting a \"remote branch\" may mean + deleting the (local) \"remote-tracking\" branch only, or also + removing it from the remote itself. The latter often makes more + sense because otherwise simply fetching from the remote would + restore the remote-tracking branch, but doing that can be + surprising and hard to recover from, so we ask. + `delete-pr-remote' When deleting a branch that was created from a pull-request and if no other branches still exist on that remote, then `magit-branch-delete' offers to delete the remote @@ -271,11 +282,11 @@ Edit published history: editing commits that have already been pushed to one of the branches listed in `magit-published-branches'. - `amend-published' Affects most commands that amend to \"HEAD\". + `amend-published' Affects most commands that amend to `HEAD'. `rebase-published' Affects commands that perform interactive rebases. This includes commands from the commit popup that - modify a commit other than \"HEAD\", namely the various fixup + modify a commit other than `HEAD', namely the various fixup and squash variants. `edit-published' Affects the commands `magit-edit-line-commit' @@ -379,14 +390,21 @@ Messages which can currently be suppressed using this option are: :group 'magit-miscellaneous :type '(repeat string)) -(defcustom magit-ellipsis ?… - "Character used to abbreviate text. +(defcustom magit-ellipsis (if (char-displayable-p ?…) "…" "...") + "String used to abbreviate text in process buffers. -Currently this is used to abbreviate author names in the margin -and in process buffers to elide `magit-git-global-arguments'." - :package-version '(magit . "2.1.0") +Currently this is only used to elide `magit-git-global-arguments' +in process buffers. In the future it may be used in other places +as well, but not the following: + +- Author names in the log margin are always abbreviated using + \"…\" or if that is not displayable, then \">\". + +- Whether collapsed sections are indicated using ellipsis is + controlled by `magit-section-visibility-indicator'." + :package-version '(magit . "3.0.0") :group 'magit-miscellaneous - :type 'character) + :type 'string) (defcustom magit-update-other-window-delay 0.2 "Delay before automatically updating the other window. @@ -516,21 +534,27 @@ acts similarly to `completing-read', except for the following: (complete-with-action action collection string pred)))) (defun magit-builtin-completing-read - (prompt choices &optional predicate require-match initial-input hist def) + (prompt choices &optional predicate require-match initial-input hist def) "Magit wrapper for standard `completing-read' function." + (unless (or (bound-and-true-p helm-mode) + (bound-and-true-p ivy-mode) + (bound-and-true-p vertico-mode) + (bound-and-true-p selectrum-mode)) + (setq prompt (magit-prompt-with-default prompt def))) (unless (or (bound-and-true-p helm-mode) (bound-and-true-p ivy-mode)) - (setq prompt (magit-prompt-with-default prompt def)) (setq choices (magit--completion-table choices))) - (cl-letf (((symbol-function 'completion-pcm--all-completions) - #'magit-completion-pcm--all-completions)) + (cl-letf (((symbol-function 'completion-pcm--all-completions))) + (when (< emacs-major-version 26) + (fset 'completion-pcm--all-completions + 'magit-completion-pcm--all-completions)) (let ((ivy-sort-functions-alist nil)) (completing-read prompt choices predicate require-match initial-input hist def)))) (defun magit-completing-read-multiple - (prompt choices &optional sep default hist keymap) + (prompt choices &optional sep default hist keymap) "Read multiple items from CHOICES, separated by SEP. Set up the `crm' variables needed to read multiple values with @@ -543,6 +567,7 @@ When KEYMAP is nil, it defaults to `crm-local-completion-map'. Unlike `completing-read-multiple', the return value is not split into a list." + (declare (obsolete magit-completing-read-multiple* "Magit 3.1.0")) (let* ((crm-separator (or sep crm-default-separator)) (crm-completion-table (magit--completion-table choices)) (choose-completion-string-functions @@ -553,8 +578,10 @@ into a list." (helm-crm-default-separator nil) (ivy-sort-matches-functions-alist nil) (input - (cl-letf (((symbol-function 'completion-pcm--all-completions) - #'magit-completion-pcm--all-completions)) + (cl-letf (((symbol-function 'completion-pcm--all-completions))) + (when (< emacs-major-version 26) + (fset 'completion-pcm--all-completions + 'magit-completion-pcm--all-completions)) (read-from-minibuffer (concat prompt (and default (format " (%s)" default)) ": ") nil (or keymap crm-local-completion-map) @@ -566,40 +593,70 @@ into a list." (defun magit-completing-read-multiple* (prompt table &optional predicate require-match initial-input - hist def inherit-input-method) + hist def inherit-input-method + no-split) "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) - (ivy-sort-matches-functions-alist 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))) +TABLE and take an additional argument NO-SPLIT, which causes +the user input to be returned as a single unmodified string. +Also work around various incompatible features of various +third-party completion frameworks." + (cl-letf* + (;; To implement NO-SPLIT we have to manipulate the respective + ;; `split-string' invocation. We cannot simply advice it to + ;; return the input string because `SELECTRUM' would choke on + ;; that string. Use a variable to pass along the raw user + ;; input string. aa5f098ab + (input nil) + (split-string (symbol-function 'split-string)) + ((symbol-function 'split-string) + (lambda (string &optional separators omit-nulls trim) + (when (and no-split + (equal separators crm-separator) + (equal omit-nulls t)) + (setq input string)) + (funcall split-string string separators omit-nulls trim))) + ;; In Emacs 25 this function has a bug, so we use a copy of the + ;; version from Emacs 26. bef9c7aa3 + ((symbol-function 'completion-pcm--all-completions) + (if (< emacs-major-version 26) + 'magit-completion-pcm--all-completions + (symbol-function 'completion-pcm--all-completions))) + ;; Prevent `BUILT-IN' completion from messing up our existing + ;; order of the completion candidates. aa5f098ab + (table (magit--completion-table table)) + ;; Prevent `IVY' from messing up our existing order. c7af78726 + (ivy-sort-matches-functions-alist nil) + ;; Prevent `HELM' from messing up our existing order. 6fcf994bd + (helm-completion-in-region-default-sort-fn nil) + ;; Prevent `HELM' from automatically appending the separator, + ;; which is counterproductive when NO-SPLIT is non-nil and/or + ;; when reading commit ranges. 798aff564 + (helm-crm-default-separator + (if no-split nil (bound-and-true-p helm-crm-default-separator))) + (values + (if (and no-split + (advice-member-p 'consult-completing-read-multiple + 'completing-read-multiple)) + ;; Our NO-SPLIT hack is not compatible with `CONSULT's + ;; implemenation so fall back to the original function. + ;; #4437 + (unwind-protect + (progn + (advice-remove 'completing-read-multiple + 'consult-completing-read-multiple) + (completing-read-multiple + prompt table predicate require-match initial-input + hist def inherit-input-method)) + (advice-add 'completing-read-multiple :override + 'consult-completing-read-multiple)) + (completing-read-multiple + prompt table predicate require-match initial-input + hist def inherit-input-method)))) + (if no-split input values))) (defun magit-ido-completing-read - (prompt choices &optional predicate require-match initial-input hist def) + (prompt choices &optional predicate require-match initial-input hist def) "Ido-based `completing-read' almost-replacement. Unfortunately `ido-completing-read' is not suitable as a @@ -788,11 +845,10 @@ See info node `(magit)Debugging Tools' for more information." "with-editor" ;; Obviously `magit' itself is needed too. "magit" - ;; While this is part of the Magit repository, - ;; it is distributed as a separate package. + ;; While these are part of the Magit repository, + ;; they are distributed as separate packages. + "magit-section" "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"))) @@ -814,7 +870,11 @@ as STRING." (i 0)) `(let ((,s ,string)) (let ,(save-match-data - (--map (list it (list 'match-string (cl-incf i) s)) varlist)) + (cl-mapcan (lambda (sym) + (cl-incf i) + (and (not (eq (aref (symbol-name sym) 0) ?_)) + (list (list sym (list 'match-string i s))))) + varlist)) ,@body)))) (defun magit-delete-line () @@ -1003,27 +1063,26 @@ and https://github.com/magit/magit/issues/2295." (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 -(defun magit-completion-pcm--all-completions (prefix pattern table pred) - (if (completion-pcm--pattern-trivial-p pattern) - (all-completions (concat prefix (car pattern)) table pred) - (let* ((regex (completion-pcm--pattern->regex pattern)) - (case-fold-search completion-ignore-case) - (completion-regexp-list (cons regex completion-regexp-list)) - (compl (all-completions - (concat prefix - (if (stringp (car pattern)) (car pattern) "")) - table pred))) - (if (not (functionp table)) - compl - (let ((poss ())) - (dolist (c compl) - (when (string-match-p regex c) (push c poss))) - ;; This `nreverse' call is the only code change made to the - ;; `completion-pcm--all-completions' that shipped with Emacs 25.1. - (nreverse poss)))))) +(when (< emacs-major-version 26) + ;; In Emacs 25 `completion-pcm--all-completions' reverses the + ;; completion list. This is the version from Emacs 26, which + ;; fixes that issue. bug#24676 + (defun magit-completion-pcm--all-completions (prefix pattern table pred) + (if (completion-pcm--pattern-trivial-p pattern) + (all-completions (concat prefix (car pattern)) table pred) + (let* ((regex (completion-pcm--pattern->regex pattern)) + (case-fold-search completion-ignore-case) + (completion-regexp-list (cons regex completion-regexp-list)) + (compl (all-completions + (concat prefix + (if (stringp (car pattern)) (car pattern) "")) + table pred))) + (if (not (functionp table)) + compl + (let ((poss ())) + (dolist (c compl) + (when (string-match-p regex c) (push c poss))) + (nreverse poss))))))) (defun magit-which-function () "Return current function name based on point. @@ -1142,67 +1201,6 @@ See ." (setq filename target)))) (file-chase-links filename)) -;;; Bitmaps - -(when (fboundp 'define-fringe-bitmap) - (define-fringe-bitmap 'magit-fringe-bitmap+ - [#b00000000 - #b00011000 - #b00011000 - #b01111110 - #b01111110 - #b00011000 - #b00011000 - #b00000000]) - (define-fringe-bitmap 'magit-fringe-bitmap- - [#b00000000 - #b00000000 - #b00000000 - #b01111110 - #b01111110 - #b00000000 - #b00000000 - #b00000000]) - - (define-fringe-bitmap 'magit-fringe-bitmap> - [#b01100000 - #b00110000 - #b00011000 - #b00001100 - #b00011000 - #b00110000 - #b01100000 - #b00000000]) - (define-fringe-bitmap 'magit-fringe-bitmapv - [#b00000000 - #b10000010 - #b11000110 - #b01101100 - #b00111000 - #b00010000 - #b00000000 - #b00000000]) - - (define-fringe-bitmap 'magit-fringe-bitmap-bold> - [#b11100000 - #b01110000 - #b00111000 - #b00011100 - #b00011100 - #b00111000 - #b01110000 - #b11100000]) - (define-fringe-bitmap 'magit-fringe-bitmap-boldv - [#b10000001 - #b11000011 - #b11100111 - #b01111110 - #b00111100 - #b00011000 - #b00000000 - #b00000000]) - ) - ;;; Miscellaneous (defun magit-message (format-string &rest args) diff --git a/elpa/magit-20210128.1702/magit-wip.el b/elpa/magit-20210802.1524/magit-wip.el similarity index 99% rename from elpa/magit-20210128.1702/magit-wip.el rename to elpa/magit-20210802.1524/magit-wip.el index 8eb26caa..2820cab8 100644 --- a/elpa/magit-20210128.1702/magit-wip.el +++ b/elpa/magit-20210802.1524/magit-wip.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) diff --git a/elpa/magit-20210128.1702/magit-worktree.el b/elpa/magit-20210802.1524/magit-worktree.el similarity index 99% rename from elpa/magit-20210128.1702/magit-worktree.el rename to elpa/magit-20210802.1524/magit-worktree.el index 0d95e5d3..47f71b6f 100644 --- a/elpa/magit-20210128.1702/magit-worktree.el +++ b/elpa/magit-20210802.1524/magit-worktree.el @@ -8,6 +8,8 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli +;; 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) diff --git a/elpa/magit-20210128.1702/magit.el b/elpa/magit-20210802.1524/magit.el similarity index 92% rename from elpa/magit-20210128.1702/magit.el rename to elpa/magit-20210802.1524/magit.el index e00678f8..c58e490f 100644 --- a/elpa/magit-20210128.1702/magit.el +++ b/elpa/magit-20210802.1524/magit.el @@ -6,20 +6,20 @@ ;; lists all contributors. If not, see http://magit.vc/authors. ;; Author: Marius Vollmer +;; Jonas Bernoulli ;; Maintainer: Jonas Bernoulli -;; Kyle Meyer -;; Noam Postavsky +;; Kyle Meyer +;; Noam Postavsky ;; Former-Maintainers: -;; Nicolas Dudebout -;; Peter J. Weisberg -;; Phil Jackson -;; Rémi Vanicat -;; Yann Hodique +;; Nicolas Dudebout +;; Peter J. Weisberg +;; Phil Jackson +;; Rémi Vanicat +;; Yann Hodique ;; Keywords: git tools vc ;; Homepage: https://github.com/magit/magit - -;; Magit requires at least GNU Emacs 25.1 and Git 2.2.0. +;; 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 @@ -34,16 +34,20 @@ ;; You should have received a copy of the GNU General Public License ;; along with Magit. If not, see http://www.gnu.org/licenses. +;; Magit requires at least GNU Emacs 25.1 and Git 2.2.0. + ;;; Commentary: -;; Magit is an interface to the version control system Git, -;; implemented as an Emacs package. Magit aspires to be a complete -;; Git porcelain. While we cannot (yet) claim, that Magit wraps and -;; improves upon each and every Git command, it is complete enough to -;; allow even experienced Git users 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. +;; Magit is a text-based Git user interface that puts an unmatched focus +;; on streamlining workflows. Commands are invoked using short mnemonic +;; key sequences that take the cursor’s position in the highly actionable +;; interface into account to provide context-sensitive behavior. + +;; With Magit you can do nearly everything that you can do when using Git +;; on the command-line, but at greater speed and while taking advantage +;; of advanced features that previously seemed too daunting to use on a +;; daily basis. Many users will find that by using Magit they can become +;; more effective Git user. ;;; Code: @@ -175,7 +179,7 @@ and/or `magit-branch-remote-head'." :group 'magit-faces) (defface magit-signature-untrusted - '((t :foreground "cyan")) + '((t :foreground "medium aquamarine")) "Face for good untrusted signatures." :group 'magit-faces) @@ -195,7 +199,7 @@ and/or `magit-branch-remote-head'." :group 'magit-faces) (defface magit-signature-error - '((t :foreground "firebrick3")) + '((t :foreground "light blue")) "Face for signatures that cannot be checked (e.g. missing key)." :group 'magit-faces) @@ -233,7 +237,7 @@ C-x g magit-status C-x M-g magit-dispatch C-c M-g magit-file-dispatch -These bindings may be added when `after-init-hook' is called. +These bindings may be added when `after-init-hook' is run. Each binding is added if and only if at that time no other key is bound to the same command and no other command is bound to the same key. In other words we try to avoid adding bindings @@ -247,8 +251,14 @@ is loaded or autoloaded) and to increase the likelihood that all the potentially conflicting user bindings have already been added. -Setting this variable after the hook has already been called -has no effect. +To set this variable use either `setq' or the Custom interface. +Do not use the function `customize-set-variable' because doing +that would cause Magit to be loaded immediately when that form +is evaluated (this differs from `custom-set-variables', which +doesn't load the libraries that define the customized variables). + +Setting this variable to nil has no effect if that is done after +the key bindings have already been added. We recommend that you bind \"C-c g\" instead of \"C-c M-g\" to `magit-file-dispatch'. The former is a much better binding @@ -295,6 +305,7 @@ Also see info node `(magit)Commands for Buffers Visiting Files'." ("E" "Ediff" magit-ediff)] [("f" "Fetch" magit-fetch) ("F" "Pull" magit-pull) + ("I" "Init" magit-init) ("l" "Log" magit-log) ("L" "Log (change)" magit-log-refresh) ("m" "Merge" magit-merge) @@ -545,11 +556,14 @@ and Emacs to it." (defun magit-debug-git-executable () "Display a buffer with information about `magit-git-executable'. +Also include information about `magit-remote-git-executable'. See info node `(magit)Debugging Tools' for more information." (interactive) (with-current-buffer (get-buffer-create "*magit-git-debug*") (pop-to-buffer (current-buffer)) (erase-buffer) + (insert (format "magit-remote-git-executable: %S\n" + magit-remote-git-executable)) (insert (concat (format "magit-git-executable: %S" magit-git-executable) (and (not (file-name-absolute-p magit-git-executable)) @@ -658,8 +672,8 @@ For X11 something like ~/.xinitrc should work.\n" (require 'magit-imenu) (require 'magit-bookmark))) -(eval-after-load 'bookmark - '(require 'magit-bookmark)) +(with-eval-after-load 'bookmark + (require 'magit-bookmark)) (if after-init-time (progn (magit-startup-asserts) diff --git a/elpa/magit-20210802.1524/magit.info b/elpa/magit-20210802.1524/magit.info new file mode 100644 index 00000000..3e48d878 --- /dev/null +++ b/elpa/magit-20210802.1524/magit.info @@ -0,0 +1,201 @@ +This is magit.info, produced by makeinfo version 6.7 from magit.texi. + + Copyright (C) 2015-2021 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: 302197 + +Tag Table: +(Indirect) +Node: Top754 +Node: Introduction6588 +Node: Installation11311 +Node: Installing from Melpa11641 +Node: Installing from the Git Repository12714 +Node: Post-Installation Tasks15446 +Node: Getting Started16731 +Node: Interface Concepts21971 +Node: Modes and Buffers22332 +Node: Switching Buffers24081 +Node: Naming Buffers28832 +Node: Quitting Windows32139 +Node: Automatic Refreshing of Magit Buffers33885 +Node: Automatic Saving of File-Visiting Buffers36779 +Node: Automatic Reverting of File-Visiting Buffers37964 +Node: Risk of Reverting Automatically42959 +Node: Sections45341 +Node: Section Movement46267 +Node: Section Visibility51177 +Node: Section Hooks57254 +Node: Section Types and Values59661 +Node: Section Options60964 +Node: Transient Commands61436 +Node: Transient Arguments and Buffer Variables62673 +Node: Completion Confirmation and the Selection69691 +Node: Action Confirmation70135 +Node: Completion and Confirmation77988 +Node: The Selection81174 +Node: The hunk-internal region84073 +Node: Support for Completion Frameworks85162 +Node: Additional Completion Options90069 +Node: Running Git90668 +Node: Viewing Git Output90941 +Node: Git Process Status92074 +Node: Running Git Manually93039 +Node: Git Executable95509 +Node: Global Git Arguments98511 +Node: Inspecting99317 +Node: Status Buffer100474 +Node: Status Sections104464 +Node: Status Header Sections110016 +Node: Status Module Sections112646 +Node: Status Options115151 +Node: Repository List116620 +Node: Logging119962 +Node: Refreshing Logs122523 +Node: Log Buffer123969 +Node: Log Margin128222 +Node: Select from Log131401 +Node: Reflog133626 +Node: Cherries135283 +Node: Diffing137131 +Node: Refreshing Diffs140210 +Node: Commands Available in Diffs143789 +Node: Diff Options146325 +Node: Revision Buffer151806 +Node: Ediffing155136 +Node: References Buffer158784 +Node: References Sections169304 +Node: Bisecting170165 +Node: Visiting Files and Blobs172517 +Node: General-Purpose Visit Commands172987 +Node: Visiting Files and Blobs from a Diff173943 +Node: Blaming177402 +Node: Manipulating183743 +Node: Creating Repository184085 +Node: Cloning Repository184640 +Node: Staging and Unstaging190045 +Node: Staging from File-Visiting Buffers194128 +Node: Applying195296 +Node: Committing197189 +Node: Initiating a Commit197772 +Node: Editing Commit Messages201707 +Node: Using the Revision Stack204510 +Node: Commit Pseudo Headers207561 +Node: Commit Mode and Hooks208897 +Node: Commit Message Conventions211835 +Node: Branching213963 +Node: The Two Remotes214189 +Node: Branch Commands216842 +Node: Branch Git Variables229553 +Node: Auxiliary Branch Commands234944 +Node: Merging236062 +Node: Resolving Conflicts240070 +Node: Rebasing245071 +Node: Editing Rebase Sequences249930 +Node: Information About In-Progress Rebase254258 +Ref: Information About In-Progress Rebase-Footnote-1263140 +Node: Cherry Picking263736 +Node: Reverting268067 +Node: Resetting269516 +Node: Stashing271382 +Node: Transferring276083 +Node: Remotes276305 +Node: Remote Commands276457 +Node: Remote Git Variables280538 +Node: Fetching281817 +Node: Pulling284304 +Node: Pushing285350 +Node: Plain Patches289688 +Node: Maildir Patches291179 +Node: Miscellaneous292693 +Node: Tagging293007 +Node: Notes294925 +Node: Submodules297297 +Node: Listing Submodules297515 +Node: Submodule Transient298921 +Node: Subtree302197 +Node: Worktree304173 +Node: Common Commands305278 +Node: Wip Modes307401 +Node: Wip Graph312332 +Node: Legacy Wip Modes314646 +Node: Commands for Buffers Visiting Files317541 +Node: Minor Mode for Buffers Visiting Blobs323163 +Node: Customizing323974 +Node: Per-Repository Configuration325570 +Node: Essential Settings327825 +Node: Safety328170 +Node: Performance329931 +Ref: Log Performance332960 +Ref: Diff Performance334270 +Ref: Refs Buffer Performance335611 +Ref: Committing Performance336186 +Node: Microsoft Windows Performance337099 +Node: MacOS Performance338290 +Ref: MacOS Performance-Footnote-1338995 +Node: Default Bindings339077 +Node: Plumbing341319 +Node: Calling Git342148 +Node: Getting a Value from Git343673 +Node: Calling Git for Effect347414 +Node: Section Plumbing353320 +Node: Creating Sections353548 +Node: Section Selection357448 +Node: Matching Sections359247 +Node: Refreshing Buffers365220 +Node: Conventions368368 +Node: Theming Faces368560 +Node: FAQ376675 +Node: FAQ - How to ...?377117 +Node: How to pronounce Magit?377530 +Node: How to show git's output?378332 +Node: How to install the gitman info manual?379118 +Node: How to show diffs for gpg-encrypted files?380088 +Node: How does branching and pushing work?380684 +Node: Can Magit be used as ediff-version-control-package?381047 +Node: Should I disable VC?383065 +Node: FAQ - Issues and Errors383683 +Node: Magit is slow384684 +Node: I changed several thousand files at once and now Magit is unusable384898 +Node: I am having problems committing385627 +Node: I am using MS Windows and cannot push with Magit386108 +Node: I am using OS X and SOMETHING works in shell but not in Magit386725 +Node: Expanding a file to show the diff causes it to disappear387556 +Node: Point is wrong in the COMMIT_EDITMSG buffer388137 +Node: The mode-line information isn't always up-to-date389183 +Node: A branch and tag sharing the same name breaks SOMETHING390246 +Node: My Git hooks work on the command-line but not inside Magit391132 +Node: git-commit-mode isn't used when committing from the command-line391978 +Node: Point ends up inside invisible text when jumping to a file-visiting buffer394249 +Node: I am unable to stage when using Tramp from MS Windows395109 +Node: I am no longer able to save popup defaults396016 +Node: Debugging Tools396976 +Node: Keystroke Index399155 +Node: Command Index433334 +Node: Function Index470546 +Node: Variable Index486959 + +End Tag Table + + +Local Variables: +coding: utf-8 +End: diff --git a/elpa/magit-20210128.1702/magit.info-1 b/elpa/magit-20210802.1524/magit.info-1 similarity index 98% rename from elpa/magit-20210128.1702/magit.info-1 rename to elpa/magit-20210802.1524/magit.info-1 index 7431b26a..04089936 100644 --- a/elpa/magit-20210128.1702/magit.info-1 +++ b/elpa/magit-20210802.1524/magit.info-1 @@ -1,4 +1,4 @@ -This is magit.info, produced by makeinfo version 6.5 from magit.texi. +This is magit.info, produced by makeinfo version 6.7 from magit.texi. Copyright (C) 2015-2021 Jonas Bernoulli @@ -31,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.90.1 (v2.90.1-1157-g10a931f15+1). +This manual is for Magit version 3.2.0. Copyright (C) 2015-2021 Jonas Bernoulli @@ -319,6 +319,8 @@ FAQ - Issues and Errors * My Git hooks work on the command-line but not inside Magit:: * git-commit-mode isn't used when committing from the command-line:: * Point ends up inside invisible text when jumping to a file-visiting buffer:: +* I am unable to stage when using Tramp from MS Windows:: +* I am no longer able to save popup defaults:: @@ -974,7 +976,8 @@ are refreshed. The status buffer can be automatically refreshed whenever a buffer is saved to a file inside the respective repository by adding a hook, like so: - (add-hook 'after-save-hook 'magit-after-save-refresh-status t) + (with-eval-after-load 'magit-mode + (add-hook 'after-save-hook 'magit-after-save-refresh-status t)) Automatically refreshing Magit buffers ensures that the displayed information is up-to-date most of the time but can lead to a noticeable @@ -1910,13 +1913,13 @@ telling Magit to ask fewer questions. • Publishing: - ‘set-and-push’ When pushing to the upstream or the push-remote - and that isn’t actually configured yet, then the user can - first set the target. If s/he confirms the default too - quickly, then s/he might end up pushing to the wrong branch - and if the remote repository is configured to disallow fixing - such mistakes, then that can be quite embarrassing and - annoying. + • ‘set-and-push’ When pushing to the upstream or the + push-remote and that isn’t actually configured yet, then + the user can first set the target. If s/he confirms the + default too quickly, then s/he might end up pushing to + the wrong branch and if the remote repository is + configured to disallow fixing such mistakes, then that + can be quite embarrassing and annoying. • Edit published history: @@ -2375,48 +2378,65 @@ File: magit.info, Node: Git Executable, Next: Global Git Arguments, Prev: Run 4.6.4 Git Executable -------------------- -Except on MS Windows, Magit defaults to running Git without specifying -the path to the git executable. Instead the first executable found by -Emacs on ‘exec-path’ is used (whose value in turn is set based on the -value of the environment variable ‘$PATH’ when Emacs was started). +When Magit calls Git, then it may do so using the absolute path to the +‘git’ executable, or using just its name. - This has the advantage that it continues to work even when using -Tramp to connect to a remote machine on which the executable is found in -a different place. The downside is that if you have multiple versions -of Git installed, then you might end up using another version than the -one you think you are using. + When running ‘git’ locally and the ‘system-type’ is ‘windows-nt’ (any +Windows version) or ‘darwin’ (macOS) then ‘magit-git-executable’ is set +to an absolute path when Magit is loaded. -‘M-x magit-version’ (‘magit-version’) - - This command shows the currently used versions of Magit, Git, and - Emacs in the echo area. Non-interactively this just returns the - Magit version. + On Windows it is necessary to use an absolute path because Git comes +with several wrapper scripts for the actual ‘git’ binary, which are also +placed on ‘$PATH’, and using one of these wrappers instead of the binary +would degrade performance horribly. For some macOS users using just the +name of the executable also performs horribly, so we avoid doing that on +that platform as well. On other platforms, using just the name seems to +work just fine. - When the ‘system-type’ is ‘windows-nt’, then ‘magit-git-executable’ -is set to an absolute path when Magit is first loaded. This is -necessary because Git on that platform comes with several wrapper -scripts for the actual git binary, which are also placed on ‘$PATH’, and -using one of these wrappers instead of the binary would degrade -performance horribly. - - If Magit doesn’t find the correct executable then you *can* work -around that by setting ‘magit-git-executable’ to an absolute path. But -note that doing so is a kludge. It is better to make sure the order in -the environment variable ‘$PATH’ is correct, and that Emacs is started -with that environment in effect. The command -‘magit-debug-git-executable’ can be useful to find out where Emacs is -searching for git. If you have to connect from Windows to a non-Windows -machine, then you must change the value to "git". + Using an absolute path when running ‘git’ on a remote machine over +Tramp, would be problematic to use an absolute path that is suitable on +the local machine, so a separate option is used to control the name or +path that is used on remote machines. -- User Option: magit-git-executable - The git executable used by Magit, either the full path to the - executable or the string "git" to let Emacs find the executable - itself, using the standard mechanism for doing such things. + The ‘git’ executable used by Magit on the local host. This should + be either the absolute path to the executable, or the string "git" + to let Emacs find the executable itself, using the standard + mechanism for doing such things. + + -- User Option: magit-remote-git-executable + + The ‘git’ executable used by Magit on remote machines over Tramp. + Normally this should be just the string "git". + + If Emacs is unable to find the correct executable, then you can work +around that by explicitly setting the value of one of these two options. +Doing that should be considered a kludge; it is better to make sure that +the order in ‘exec-path’ or ‘tramp-remote-path’ is correct. + + Note that ‘exec-path’ is set based on the value of the ‘PATH’ +environment variable that is in effect when Emacs is started. If you +set ‘PATH’ in your shell’s init files, then that only has an effect on +Emacs if you start it from that shell (because the environment of a +process is only passed to its child processes, not to arbitrary other +processes). If that is not how you start Emacs, then the +‘exec-path-from-shell’ package can help; though honestly I consider that +a kludge too. + + The command ‘magit-debug-git-executable’ can be useful to find out +where Emacs is searching for ‘git’. ‘M-x magit-debug-git-executable’ (‘magit-debug-git-executable’) - Display a buffer with information about ‘magit-git-executable’. + This command displays a buffer with information about + ‘magit-git-executable’ and ‘magit-remote-git-executable’. + +‘M-x magit-version’ (‘magit-version’) + + This command shows the currently used versions of Magit, Git, and + Emacs in the echo area. Non-interactively this just returns the + Magit version.  File: magit.info, Node: Global Git Arguments, Prev: Git Executable, Up: Running Git @@ -2946,6 +2966,12 @@ File: magit.info, Node: Repository List, Next: Logging, Prev: Status Buffer, It has to return a string to be inserted or nil. PROPS is an alist that supports the keys ‘:right-align’ and ‘:pad-right’. + You may wish to display a range of numeric columns using just one + character per column and without any padding between columns, in + which case you should use an appropriate HEADER, set WIDTH to 1, + and set ‘:pad-right’ to 0. ‘+’ is substituted for numbers higher + than 9. + The following functions can be added to the above option: -- Function: magit-repolist-column-ident @@ -3168,6 +3194,17 @@ File: magit.info, Node: Log Buffer, Next: Log Margin, Prev: Refreshing Logs, first parent, but a numeric prefix can be used to specify another parent. +‘j’ (‘magit-log-move-to-revision’) + + Read a revision and move to it in current log buffer. + + If the chosen reference or revision isn’t being displayed in the + current log buffer, then inform the user about that and do nothing + else. + + If invoked outside any log buffer, then display the log buffer of + the current repository first; creating it if necessary. + ‘SPC’ (‘magit-diff-show-or-scroll-up’) Update the commit or diff buffer for the thing at point. @@ -5147,6 +5184,10 @@ Also see *note (gitman)git-commit::. Whether to ask to stage all unstaged changes when committing and nothing is staged. + -- User Option: magit-commit-show-diff + + Whether the relevant diff is automatically shown when committing. + -- User Option: magit-commit-extend-override-date Whether using ‘magit-commit-extend’ changes the committer date. @@ -5164,6 +5205,18 @@ Also see *note (gitman)git-commit::. "instant" variants always require confirmation because making an error while using those is harder to recover from. + -- User Option: magit-post-commit-hook + + 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. + + Also see ‘git-commit-post-finish-hook’. +  File: magit.info, Node: Editing Commit Messages, Prev: Initiating a Commit, Up: Committing @@ -5565,7 +5618,7 @@ them. Those features are available from separate transient command. -- User Option: magit-branch-direct-configure This option controls whether the transient command ‘magit-branch’ - can be used directly change the values Git variables. This + can be used to directly change the values of Git variables. This defaults to ‘t’ (to avoid changing key bindings). When set to ‘nil’, then no variables are displayed by that transient command, and its suffix command ‘magit-branch-configure’ has to be used @@ -5611,8 +5664,8 @@ them. Those features are available from separate transient command. ‘b c’ (‘magit-branch-and-checkout’) - This command creates a new branch like ‘magit-branch’, but then - also checks it out. + This command creates a new branch like ‘magit-branch-create’, but + then also checks it out. Also see option ‘magit-branch-prefer-remote-upstream’. @@ -5782,7 +5835,7 @@ them. Those features are available from separate transient command. If you use a finite set of non-ephemeral branches across all your repositories, then you might use something like: - (("origin/master" "master" "next" "maint")) + (("origin/master" . ("master" "next" "maint"))) Or if the names of all your ephemeral branches contain a slash, at least in some repositories, then a good value could be: @@ -5794,6 +5847,16 @@ them. Those features are available from separate transient command. (("origin/maint" . "\\`hotfix/") ("origin/master" . "\\`feature/")) + UPSTREAM can be a local branch: + + (("master" . ("master" "next" "maint"))) + + Because the main branch is no longer almost always named "master" you +should also account for other common names: + + (("main" . ("main" "master" "next" "maint")) + ("master" . ("main" "master" "next" "maint"))) + -- Command: magit-branch-orphan This command creates and checks out a new orphan branch with @@ -7330,6 +7393,15 @@ and the push-remote, see *note The Two Remotes::. This command pushes a tag to another repository. + One of the infix arguments, ‘--force-with-lease’, deserves a word of +caution. It is passed without a value, which means "permit a force push +as long as the remote-tracking branches match their counterparts on the +remote end". If you’ve set up a tool to do automatic fetches (Magit +itself does not provide such functionality), using ‘--force-with-lease’ +can be dangerous because you don’t actually control or know the state of +the remote-tracking refs. In that case, you should consider setting +‘push.useForceIfIncludes’ to ‘true’ (available since Git 2.30). + Two more push commands exist, which by default are not available from the push transient. See their doc-strings for instructions on how to add them to the transient. @@ -7485,7 +7557,7 @@ Also see *note (gitman)git-tag::. ‘t t’ (‘magit-tag-create’) This command creates a new tag with the given NAME at REV. With a - prefix argument it creates an annotate tag. + prefix argument it creates an annotated tag. ‘t r’ (‘magit-tag-release’) @@ -7706,66 +7778,3 @@ modules. because ‘git fetch’ does not support not doing that. With a prefix argument fetch all remotes. - -File: magit.info, Node: Subtree, Next: Worktree, Prev: Submodules, Up: Miscellaneous - -8.4 Subtree -=========== - -Also see *note (gitman)git-subtree::. - -‘O’ (‘magit-subtree’) - - This transient prefix command binds the two sub-transients; one for - importing a subtree and one for exporting a subtree. - -‘O i’ (‘magit-subtree-import’) - - This transient prefix command binds the following suffix commands - along with the appropriate infix arguments and displays them in a - temporary buffer until a suffix is invoked. - - The suffixes of this command import subtrees. - - If the ‘--prefix’ argument is set, then the suffix commands use - that prefix without prompting the user. If it is unset, then they - read the prefix in the minibuffer. - -‘O i a’ (‘magit-subtree-add’) - - This command adds COMMIT from REPOSITORY as a new subtree at - PREFIX. - -‘O i c’ (‘magit-subtree-add-commit’) - - This command add COMMIT as a new subtree at PREFIX. - -‘O i m’ (‘magit-subtree-merge’) - - This command merges COMMIT into the PREFIX subtree. - -‘O i f’ (‘magit-subtree-pull’) - - This command pulls COMMIT from REPOSITORY into the PREFIX subtree. - -‘O e’ (‘magit-subtree-export’) - - This transient prefix command binds the following suffix commands - along with the appropriate infix arguments and displays them in a - temporary buffer until a suffix is invoked. - - The suffixes of this command export subtrees. - - If the ‘--prefix’ argument is set, then the suffix commands use - that prefix without prompting the user. If it is unset, then they - read the prefix in the minibuffer. - -‘O e p’ (‘magit-subtree-push’) - - This command extract the history of the subtree PREFIX and pushes - it to REF on REPOSITORY. - -‘O e s’ (‘magit-subtree-split’) - - This command extracts the history of the subtree PREFIX. - diff --git a/elpa/magit-20210128.1702/magit.info-2 b/elpa/magit-20210802.1524/magit.info-2 similarity index 96% rename from elpa/magit-20210128.1702/magit.info-2 rename to elpa/magit-20210802.1524/magit.info-2 index 0b8d3c80..6be0ba52 100644 --- a/elpa/magit-20210128.1702/magit.info-2 +++ b/elpa/magit-20210802.1524/magit.info-2 @@ -1,4 +1,4 @@ -This is magit.info, produced by makeinfo version 6.5 from magit.texi. +This is magit.info, produced by makeinfo version 6.7 from magit.texi. Copyright (C) 2015-2021 Jonas Bernoulli @@ -17,6 +17,69 @@ START-INFO-DIR-ENTRY * Magit: (magit). Using Git from Emacs with Magit. END-INFO-DIR-ENTRY + +File: magit.info, Node: Subtree, Next: Worktree, Prev: Submodules, Up: Miscellaneous + +8.4 Subtree +=========== + +Also see *note (gitman)git-subtree::. + +‘O’ (‘magit-subtree’) + + This transient prefix command binds the two sub-transients; one for + importing a subtree and one for exporting a subtree. + +‘O i’ (‘magit-subtree-import’) + + This transient prefix command binds the following suffix commands + along with the appropriate infix arguments and displays them in a + temporary buffer until a suffix is invoked. + + The suffixes of this command import subtrees. + + If the ‘--prefix’ argument is set, then the suffix commands use + that prefix without prompting the user. If it is unset, then they + read the prefix in the minibuffer. + +‘O i a’ (‘magit-subtree-add’) + + This command adds COMMIT from REPOSITORY as a new subtree at + PREFIX. + +‘O i c’ (‘magit-subtree-add-commit’) + + This command add COMMIT as a new subtree at PREFIX. + +‘O i m’ (‘magit-subtree-merge’) + + This command merges COMMIT into the PREFIX subtree. + +‘O i f’ (‘magit-subtree-pull’) + + This command pulls COMMIT from REPOSITORY into the PREFIX subtree. + +‘O e’ (‘magit-subtree-export’) + + This transient prefix command binds the following suffix commands + along with the appropriate infix arguments and displays them in a + temporary buffer until a suffix is invoked. + + The suffixes of this command export subtrees. + + If the ‘--prefix’ argument is set, then the suffix commands use + that prefix without prompting the user. If it is unset, then they + read the prefix in the minibuffer. + +‘O e p’ (‘magit-subtree-push’) + + This command extract the history of the subtree PREFIX and pushes + it to REF on REPOSITORY. + +‘O e s’ (‘magit-subtree-split’) + + This command extracts the history of the subtree PREFIX. +  File: magit.info, Node: Worktree, Next: Common Commands, Prev: Subtree, Up: Miscellaneous @@ -870,14 +933,6 @@ the faster ‘vfork’ will be used. (The creation of child processes still takes about twice as long on Darwin compared to Linux.) See (1) for more information. - On Catalina, and potentially other macOS releases, there may be a -performance problem where any action takes 20 times longer on Darwin -than on Linux. This can be worked around by setting -‘magit-git-executable’ to the absolute path of the ‘git’ executable, -instead of relying on resolving the ‘$PATH’. You should not do that if -you want to use Magit on remote machines using Tramp and if ‘git’ is not -installed in the same location on those machines. - ---------- Footnotes ---------- (1) @@ -902,7 +957,7 @@ File: magit.info, Node: Default Bindings, Prev: Performance, Up: Essential Se ‘C-x M-g’ ‘magit-dispatch’ ‘C-c M-g’ ‘magit-file-dispatch’ - These bindings may be added when ‘after-init-hook’ is called. Each + These bindings may be added when ‘after-init-hook’ is run. Each binding is added if and only if at that time no other key is bound to the same command and no other command is bound to the same key. In other words we try to avoid adding bindings that are @@ -914,8 +969,14 @@ File: magit.info, Node: Default Bindings, Prev: Performance, Up: Essential Se or autoloaded) and to increase the likelihood that all the potentially conflicting user bindings have already been added. - Setting this variable after the hook has already been called has no - effect. + To set this variable use either ‘setq’ or the Custom interface. Do + not use the function ‘customize-set-variable’ because doing that + would cause Magit to be loaded immediately when that form is + evaluated (this differs from ‘custom-set-variables’, which doesn’t + load the libraries that define the customized variables). + + Setting this variable to nil has no effect if that is done after + the key bindings have already been added. We recommend that you bind ‘C-c g’ instead of ‘C-c M-g’ to ‘magit-file-dispatch’. The former is a much better binding but the @@ -1047,6 +1108,21 @@ side-effects, but that should be avoided. and add a section containing git’s standard error in the current repository’s process buffer. + -- Function: magit-process-git destination &rest args + + Calls Git synchronously in a separate process, returning its exit + code. DESTINATION specifies how to handle the output, like for + ‘call-process’, except that file handlers are supported. Enables + Cygwin’s "noglob" option during the call and ensures unix eol + conversion. + + -- Function: magit-process-file process &optional infile buffer display + &rest args + + Processes files synchronously in a separate process. Identical to + ‘process-file’ but temporarily enables Cygwin’s "noglob" option + during the call and ensures unix eol conversion. + If an error occurs when using one of the above functions, then that is usually due to a bug, i.e. using an argument which is not actually supported. Such errors are usually not reported, but when they occur we @@ -1119,15 +1195,6 @@ refresh because that also automatically moves to the next change. then it waits for the process to return, so the function itself is synchronous. - -- Function: magit-run-git-with-logfile file &rest args - - Calls git synchronously with ARGS. The process’s output is saved - in FILE. This is rarely useful and so this function might be - removed in the future. - - This function actually runs git asynchronously. But then it waits - for the process to return, so the function itself is synchronous. - -- Function: magit-git &rest args Calls git synchronously with ARGS for side-effects only. This @@ -1908,6 +1975,8 @@ A.2 FAQ - Issues and Errors * My Git hooks work on the command-line but not inside Magit:: * git-commit-mode isn't used when committing from the command-line:: * Point ends up inside invisible text when jumping to a file-visiting buffer:: +* I am unable to stage when using Tramp from MS Windows:: +* I am no longer able to save popup defaults::  File: magit.info, Node: Magit is slow, Next: I changed several thousand files at once and now Magit is unusable, Up: FAQ - Issues and Errors @@ -2113,7 +2182,7 @@ that succeeds, do nothing else. Otherwise start ‘emacs &’ (and ‘init.el’ must call ‘server-start’) and try to use ‘emacsclient’ again.  -File: magit.info, Node: Point ends up inside invisible text when jumping to a file-visiting buffer, Prev: git-commit-mode isn't used when committing from the command-line, Up: FAQ - Issues and Errors +File: magit.info, Node: Point ends up inside invisible text when jumping to a file-visiting buffer, Next: I am unable to stage when using Tramp from MS Windows, Prev: git-commit-mode isn't used when committing from the command-line, Up: FAQ - Issues and Errors A.2.12 Point ends up inside invisible text when jumping to a file-visiting buffer --------------------------------------------------------------------------------- @@ -2125,6 +2194,43 @@ visible. If that is too drastic for your taste, then you may instead use ‘magit-diff-visit-file-hook’ to reveal the text, possibly using ‘reveal-post-command’ or for Org buffers ‘org-reveal’. + +File: magit.info, Node: I am unable to stage when using Tramp from MS Windows, Next: I am no longer able to save popup defaults, Prev: Point ends up inside invisible text when jumping to a file-visiting buffer, Up: FAQ - Issues and Errors + +A.2.13 I am unable to stage when using Tramp from MS Windows +------------------------------------------------------------ + +Magit may be unable to stage (or otherwise apply) individual hunks when +you are connected to remote machine using Tramp and the local machine +uses MS Windows. + + There appears to be a problem with ‘process-send-eof’ in this +scenario, as mentioned at the end of ‘tramp-tests.el’. I have contacted +the Tramp maintainer about this. For now this unfortunately means that +it just doesn’t work and we cannot do anything about it. If you have +more information, then please comment on +. + + +File: magit.info, Node: I am no longer able to save popup defaults, Prev: I am unable to stage when using Tramp from MS Windows, Up: FAQ - Issues and Errors + +A.2.14 I am no longer able to save popup defaults +------------------------------------------------- + +Magit used to use Magit-Popup to implement the transient popup menus. +Now it used Transient instead, which is Magit-Popup’s successor. + + In the older Magit-Popup menus, it was possible to save user settings +(e.g. setting the gpg signing key for commits) by using ‘C-c C-c’ in +the popup buffer. This would dismiss the popup, but save the settings +as the defaults for future popups. + + When switching to Transient menus, this functionality is now +available via ‘C-x C-s’ instead; the ‘C-x’ prefix has other options as +well when using Transient, which will be displayed when it is typed. +See +for more details. +  File: magit.info, Node: Debugging Tools, Next: Keystroke Index, Prev: FAQ, Up: Top @@ -2214,16 +2320,16 @@ Appendix C Keystroke Index * % g: Worktree. (line 30) * % k: Worktree. (line 25) * % m: Worktree. (line 21) -* +: Log Buffer. (line 61) +* +: Log Buffer. (line 72) * + <1>: Refreshing Diffs. (line 69) -* -: Log Buffer. (line 65) +* -: Log Buffer. (line 76) * - <1>: Refreshing Diffs. (line 65) * 0: Refreshing Diffs. (line 73) * 1: Section Visibility. (line 26) * 2: Section Visibility. (line 27) * 3: Section Visibility. (line 28) * 4: Section Visibility. (line 29) -* =: Log Buffer. (line 55) +* =: Log Buffer. (line 66) * ^: Section Movement. (line 31) * a: Applying. (line 33) * A: Cherry Picking. (line 8) @@ -2378,7 +2484,7 @@ Appendix C Keystroke Index * d u: Diffing. (line 57) * d w: Diffing. (line 45) * D w: Refreshing Diffs. (line 29) -* DEL: Log Buffer. (line 45) +* DEL: Log Buffer. (line 56) * DEL <1>: Commands Available in Diffs. (line 60) * DEL <2>: Blaming. (line 89) @@ -2413,10 +2519,11 @@ Appendix C Keystroke Index * f u: Fetching. (line 23) * F u: Pulling. (line 22) * g: Automatic Refreshing of Magit Buffers. - (line 24) + (line 25) * G: Automatic Refreshing of Magit Buffers. - (line 33) -* j: Commands Available in Diffs. + (line 34) +* j: Log Buffer. (line 35) +* j <1>: Commands Available in Diffs. (line 45) * k: Viewing Git Output. (line 24) * k <1>: Applying. (line 40) @@ -2480,7 +2587,7 @@ Appendix C Keystroke Index (line 43) * M-w: Blaming. (line 127) * M-w <1>: Common Commands. (line 28) -* M-x magit-debug-git-executable: Git Executable. (line 45) +* M-x magit-debug-git-executable: Git Executable. (line 55) * M-x magit-debug-git-executable <1>: Debugging Tools. (line 36) * M-x magit-describe-section-briefly: Section Types and Values. (line 13) @@ -2497,7 +2604,7 @@ Appendix C Keystroke Index * M-x magit-toggle-verbose-refresh: Debugging Tools. (line 30) * M-x magit-unstage-file: Staging from File-Visiting Buffers. (line 18) -* M-x magit-version: Git Executable. (line 17) +* M-x magit-version: Git Executable. (line 60) * M-x magit-version <1>: Debugging Tools. (line 10) * M-x magit-wip-commit: Wip Modes. (line 88) * M-x with-editor-debug: Debugging Tools. (line 44) @@ -2581,7 +2688,7 @@ Appendix C Keystroke Index * s <1>: Editing Rebase Sequences. (line 59) * S-: Section Visibility. (line 22) -* SPC: Log Buffer. (line 35) +* SPC: Log Buffer. (line 46) * SPC <1>: Commands Available in Diffs. (line 56) * SPC <2>: Blaming. (line 79) @@ -2782,8 +2889,8 @@ Appendix D Command Index * magit-branch-configure <3>: Branch Commands. (line 32) * magit-branch-create: Branch Commands. (line 57) * magit-branch-delete: Branch Commands. (line 147) -* magit-branch-or-checkout: Branch Commands. (line 257) -* magit-branch-orphan: Branch Commands. (line 252) +* magit-branch-or-checkout: Branch Commands. (line 267) +* magit-branch-orphan: Branch Commands. (line 262) * magit-branch-rename: Branch Commands. (line 153) * magit-branch-reset: Branch Commands. (line 131) * magit-branch-shelve: Auxiliary Branch Commands. @@ -2823,7 +2930,7 @@ Appendix D Command Index * magit-copy-buffer-revision: Common Commands. (line 28) * magit-copy-section-value: Common Commands. (line 10) * magit-cycle-margin-style: Log Margin. (line 70) -* magit-debug-git-executable: Git Executable. (line 45) +* magit-debug-git-executable: Git Executable. (line 55) * magit-debug-git-executable <1>: Debugging Tools. (line 36) * magit-describe-section-briefly: Section Types and Values. (line 13) @@ -2846,9 +2953,9 @@ Appendix D Command Index * magit-diff-refresh <1>: Refreshing Diffs. (line 17) * magit-diff-save-default-arguments: Refreshing Diffs. (line 29) * magit-diff-set-default-arguments: Refreshing Diffs. (line 22) -* magit-diff-show-or-scroll-down: Log Buffer. (line 45) +* magit-diff-show-or-scroll-down: Log Buffer. (line 56) * magit-diff-show-or-scroll-down <1>: Blaming. (line 89) -* magit-diff-show-or-scroll-up: Log Buffer. (line 35) +* magit-diff-show-or-scroll-up: Log Buffer. (line 46) * magit-diff-show-or-scroll-up <1>: Blaming. (line 79) * magit-diff-staged: Diffing. (line 51) * magit-diff-switch-range-type: Refreshing Diffs. (line 41) @@ -2939,10 +3046,11 @@ Appendix D Command Index (line 77) * magit-log-bury-buffer: Log Buffer. (line 14) * magit-log-current: Logging. (line 35) -* magit-log-double-commit-limit: Log Buffer. (line 61) -* magit-log-half-commit-limit: Log Buffer. (line 65) +* magit-log-double-commit-limit: Log Buffer. (line 72) +* magit-log-half-commit-limit: Log Buffer. (line 76) * magit-log-head: Logging. (line 48) * magit-log-move-to-parent: Log Buffer. (line 29) +* magit-log-move-to-revision: Log Buffer. (line 35) * magit-log-other: Logging. (line 41) * magit-log-refresh: Refreshing Logs. (line 11) * magit-log-refresh <1>: Refreshing Logs. (line 17) @@ -2951,7 +3059,7 @@ Appendix D Command Index * magit-log-select-pick: Select from Log. (line 20) * magit-log-select-quit: Select from Log. (line 26) * magit-log-set-default-arguments: Refreshing Logs. (line 22) -* magit-log-toggle-commit-limit: Log Buffer. (line 55) +* magit-log-toggle-commit-limit: Log Buffer. (line 66) * magit-log-trace-definition: Commands for Buffers Visiting Files. (line 84) * magit-margin-settings: Log Margin. (line 57) @@ -2990,13 +3098,13 @@ Appendix D Command Index * magit-push-current: Pushing. (line 31) * magit-push-current-to-pushremote: Pushing. (line 15) * magit-push-current-to-upstream: Pushing. (line 23) -* magit-push-implicitly args: Pushing. (line 74) +* magit-push-implicitly args: Pushing. (line 83) * magit-push-matching: Pushing. (line 50) * magit-push-other: Pushing. (line 36) * magit-push-refspecs: Pushing. (line 41) * magit-push-tag: Pushing. (line 66) * magit-push-tags: Pushing. (line 58) -* magit-push-to-remote remote args: Pushing. (line 92) +* magit-push-to-remote remote args: Pushing. (line 101) * magit-rebase: Rebasing. (line 9) * magit-rebase-abort: Rebasing. (line 123) * magit-rebase-autosquash: Rebasing. (line 84) @@ -3015,9 +3123,9 @@ Appendix D Command Index * magit-reflog-head: Reflog. (line 19) * magit-reflog-other: Reflog. (line 15) * magit-refresh: Automatic Refreshing of Magit Buffers. - (line 24) + (line 25) * magit-refresh-all: Automatic Refreshing of Magit Buffers. - (line 33) + (line 34) * magit-remote: Remote Commands. (line 13) * magit-remote-add: Remote Commands. (line 50) * magit-remote-configure: Remote Commands. (line 33) @@ -3153,7 +3261,7 @@ Appendix D Command Index (line 18) * magit-unstage-file <1>: Commands for Buffers Visiting Files. (line 33) -* magit-version: Git Executable. (line 17) +* magit-version: Git Executable. (line 60) * magit-version <1>: Debugging Tools. (line 10) * magit-visit-ref: References Buffer. (line 181) * magit-wip-commit: Wip Modes. (line 88) @@ -3205,9 +3313,9 @@ Appendix E Function Index * ido-enter-magit-status: Status Buffer. (line 72) * magit-add-section-hook: Section Hooks. (line 20) * magit-after-save-refresh-status: Automatic Refreshing of Magit Buffers. - (line 58) -* magit-branch-or-checkout: Branch Commands. (line 257) -* magit-branch-orphan: Branch Commands. (line 252) + (line 59) +* magit-branch-or-checkout: Branch Commands. (line 267) +* magit-branch-orphan: Branch Commands. (line 262) * magit-branch-shelve: Auxiliary Branch Commands. (line 9) * magit-branch-unshelve: Auxiliary Branch Commands. @@ -3262,7 +3370,7 @@ Appendix E Function Index (line 17) * magit-get-section: Matching Sections. (line 16) * magit-git: Calling Git for Effect. - (line 59) + (line 50) * magit-git-exit-code: Getting a Value from Git. (line 10) * magit-git-failure: Getting a Value from Git. @@ -3276,7 +3384,7 @@ Appendix E Function Index * magit-git-lines: Getting a Value from Git. (line 44) * magit-git-str: Getting a Value from Git. - (line 72) + (line 87) * magit-git-string: Getting a Value from Git. (line 38) * magit-git-success: Getting a Value from Git. @@ -3284,7 +3392,7 @@ Appendix E Function Index * magit-git-true: Getting a Value from Git. (line 24) * magit-git-wash: Calling Git for Effect. - (line 64) + (line 55) * magit-hunk-set-window-start: Section Movement. (line 51) * magit-ido-completing-read: Support for Completion Frameworks. (line 48) @@ -3357,37 +3465,39 @@ Appendix E Function Index * magit-mode-display-buffer: Refreshing Buffers. (line 33) * magit-mode-quit-window: Quitting Windows. (line 34) * magit-mode-setup: Refreshing Buffers. (line 17) -* magit-push-implicitly: Pushing. (line 74) -* magit-push-to-remote: Pushing. (line 92) +* magit-process-file: Getting a Value from Git. + (line 67) +* magit-process-git: Getting a Value from Git. + (line 59) +* magit-push-implicitly: Pushing. (line 83) +* magit-push-to-remote: Pushing. (line 101) * magit-region-sections: Section Selection. (line 10) * magit-region-values: Section Selection. (line 37) -* magit-repolist-column-branch: Repository List. (line 44) -* magit-repolist-column-branches: Repository List. (line 53) -* magit-repolist-column-flag: Repository List. (line 61) -* magit-repolist-column-ident: Repository List. (line 30) -* magit-repolist-column-path: Repository List. (line 35) -* magit-repolist-column-stashes: Repository List. (line 57) +* magit-repolist-column-branch: Repository List. (line 50) +* magit-repolist-column-branches: Repository List. (line 59) +* magit-repolist-column-flag: Repository List. (line 67) +* magit-repolist-column-ident: Repository List. (line 36) +* magit-repolist-column-path: Repository List. (line 41) +* magit-repolist-column-stashes: Repository List. (line 63) * magit-repolist-column-unpulled-from-pushremote: Repository List. - (line 81) + (line 87) * magit-repolist-column-unpulled-from-upstream: Repository List. - (line 76) + (line 82) * magit-repolist-column-unpushed-to-pushremote: Repository List. - (line 91) + (line 97) * magit-repolist-column-unpushed-to-upstream: Repository List. - (line 86) -* magit-repolist-column-upstream: Repository List. (line 48) -* magit-repolist-column-version: Repository List. (line 39) + (line 92) +* magit-repolist-column-upstream: Repository List. (line 54) +* magit-repolist-column-version: Repository List. (line 45) * magit-restore-window-configuration: Quitting Windows. (line 23) * magit-run-git: Calling Git for Effect. (line 36) * magit-run-git-async: Calling Git for Effect. - (line 74) + (line 65) * magit-run-git-with-editor: Calling Git for Effect. - (line 87) + (line 78) * magit-run-git-with-input: Calling Git for Effect. (line 40) -* magit-run-git-with-logfile: Calling Git for Effect. - (line 50) * magit-save-window-configuration: Switching Buffers. (line 89) * magit-section-case: Matching Sections. (line 71) * magit-section-hide: Section Visibility. (line 49) @@ -3401,9 +3511,9 @@ Appendix E Function Index * magit-section-toggle-children: Section Visibility. (line 68) * magit-section-value-if: Matching Sections. (line 61) * magit-start-git: Calling Git for Effect. - (line 99) + (line 90) * magit-start-process: Calling Git for Effect. - (line 118) + (line 109) * magit-stashes-maybe-update-stash-buffer: Section Movement. (line 106) * magit-status-maybe-update-blob-buffer: Section Movement. (line 100) * magit-status-maybe-update-revision-buffer: Section Movement. @@ -3501,9 +3611,10 @@ Appendix F Variable Index * magit-clone-set-remote.pushDefault: Cloning Repository. (line 78) * magit-clone-url-format: Cloning Repository. (line 124) * magit-commit-ask-to-stage: Initiating a Commit. (line 75) -* magit-commit-extend-override-date: Initiating a Commit. (line 80) -* magit-commit-reword-override-date: Initiating a Commit. (line 84) -* magit-commit-squash-confirm: Initiating a Commit. (line 88) +* magit-commit-extend-override-date: Initiating a Commit. (line 84) +* magit-commit-reword-override-date: Initiating a Commit. (line 88) +* magit-commit-show-diff: Initiating a Commit. (line 80) +* magit-commit-squash-confirm: Initiating a Commit. (line 92) * magit-completing-read-function: Support for Completion Frameworks. (line 27) * magit-define-global-key-bindings: Default Bindings. (line 6) @@ -3534,21 +3645,21 @@ Appendix F Variable Index * magit-generate-buffer-name-function: Naming Buffers. (line 6) * magit-git-debug: Viewing Git Output. (line 28) * magit-git-debug <1>: Getting a Value from Git. - (line 64) -* magit-git-executable: Git Executable. (line 39) + (line 79) +* magit-git-executable: Git Executable. (line 26) * magit-git-global-arguments: Global Git Arguments. (line 6) * magit-keep-region-overlay: The Selection. (line 52) * magit-list-refs-sortby: Additional Completion Options. (line 6) -* magit-log-auto-more: Log Buffer. (line 69) +* magit-log-auto-more: Log Buffer. (line 80) * magit-log-buffer-file-locked: Commands for Buffers Visiting Files. (line 88) * magit-log-margin: Log Margin. (line 12) * magit-log-margin-show-committer-date: Log Margin. (line 49) * magit-log-section-commit-count: Status Sections. (line 136) * magit-log-select-margin: Select from Log. (line 30) -* magit-log-show-refname-after-summary: Log Buffer. (line 75) +* magit-log-show-refname-after-summary: Log Buffer. (line 86) * magit-log-trace-definition-function: Commands Available in Diffs. (line 18) * magit-module-sections-hook: Status Module Sections. @@ -3558,6 +3669,7 @@ Appendix F Variable Index * magit-no-confirm: Action Confirmation. (line 18) * magit-pop-revision-stack-format: Using the Revision Stack. (line 35) +* magit-post-commit-hook: Initiating a Commit. (line 101) * magit-post-display-buffer-hook: Switching Buffers. (line 95) * magit-pre-display-buffer-hook: Switching Buffers. (line 84) * magit-prefer-remote-upstream: Branch Git Variables. @@ -3565,15 +3677,15 @@ Appendix F Variable Index * magit-prefix-use-buffer-arguments: Transient Arguments and Buffer Variables. (line 64) * magit-process-raise-error: Calling Git for Effect. - (line 145) + (line 136) * magit-pull-or-fetch: Fetching. (line 59) * magit-reflog-margin: Reflog. (line 23) * magit-refresh-args: Refreshing Buffers. (line 55) * magit-refresh-buffer-hook: Automatic Refreshing of Magit Buffers. - (line 42) + (line 43) * magit-refresh-function: Refreshing Buffers. (line 49) * magit-refresh-status-buffer: Automatic Refreshing of Magit Buffers. - (line 48) + (line 49) * magit-refs-filter-alist: References Buffer. (line 159) * magit-refs-focus-column-width: References Buffer. (line 82) * magit-refs-margin: References Buffer. (line 97) @@ -3585,6 +3697,7 @@ Appendix F Variable Index * magit-refs-show-remote-prefix: References Buffer. (line 62) * magit-remote-add-set-remote.pushDefault: Remote Commands. (line 92) * magit-remote-direct-configure: Remote Commands. (line 21) +* magit-remote-git-executable: Git Executable. (line 33) * magit-repolist-columns: Repository List. (line 14) * magit-repository-directories: Status Buffer. (line 58) * magit-revision-filter-files-on-follow: Revision Buffer. (line 64) @@ -3610,7 +3723,7 @@ Appendix F Variable Index * magit-status-sections-hook: Status Sections. (line 10) * magit-submodule-list-columns: Listing Submodules. (line 21) * magit-this-process: Calling Git for Effect. - (line 140) + (line 131) * magit-uniquify-buffer-names: Naming Buffers. (line 74) * magit-unstage-committed: Staging and Unstaging. (line 56) diff --git a/elpa/magit-section-20210801.1004/dir b/elpa/magit-section-20210801.1004/dir new file mode 100644 index 00000000..6e446813 --- /dev/null +++ b/elpa/magit-section-20210801.1004/dir @@ -0,0 +1,19 @@ +This is the file .../info/dir, which contains the +topmost node of the Info hierarchy, called (dir)Top. +The first time you invoke Info you start off looking at this node. + +File: dir, Node: Top This is the top of the INFO tree + + This (the Directory node) gives a menu of major topics. + Typing "q" exits, "H" lists all Info commands, "d" returns here, + "h" gives a primer for first-timers, + "mEmacs" visits the Emacs manual, etc. + + In Emacs, you can click mouse button 2 on a menu item or cross reference + to select it. + +* Menu: + +Emacs +* Magit-Section: (magit-section). + Use Magit sections in your own packages. diff --git a/elpa/magit-section-20210801.1004/magit-section-autoloads.el b/elpa/magit-section-20210801.1004/magit-section-autoloads.el new file mode 100644 index 00000000..0899fbfa --- /dev/null +++ b/elpa/magit-section-20210801.1004/magit-section-autoloads.el @@ -0,0 +1,26 @@ +;;; magit-section-autoloads.el --- automatically extracted autoloads +;; +;;; Code: + +(add-to-list 'load-path (directory-file-name + (or (file-name-directory #$) (car load-path)))) + + +;;;### (autoloads nil "magit-section" "magit-section.el" (0 0 0 0)) +;;; Generated autoloads from magit-section.el + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "magit-section" '("isearch-clean-overlays@magit-mode" "magit-"))) + +;;;*** + +;;;### (autoloads nil nil ("magit-section-pkg.el") (0 0 0 0)) + +;;;*** + +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; magit-section-autoloads.el ends here diff --git a/elpa/magit-section-20210801.1004/magit-section-pkg.el b/elpa/magit-section-20210801.1004/magit-section-pkg.el new file mode 100644 index 00000000..ba629b0c --- /dev/null +++ b/elpa/magit-section-20210801.1004/magit-section-pkg.el @@ -0,0 +1,13 @@ +(define-package "magit-section" "20210801.1004" "Sections for read-only buffers" + '((emacs "25.1") + (dash "20210330")) + :commit "7b46191dedba053f1c44d5f13d4283860e26cbd6" :authors + '(("Jonas Bernoulli" . "jonas@bernoul.li")) + :maintainer + '("Jonas Bernoulli" . "jonas@bernoul.li") + :keywords + '("tools") + :url "https://github.com/magit/magit") +;; Local Variables: +;; no-byte-compile: t +;; End: diff --git a/elpa/magit-20210128.1702/magit-section.el b/elpa/magit-section-20210801.1004/magit-section.el similarity index 97% rename from elpa/magit-20210128.1702/magit-section.el rename to elpa/magit-section-20210801.1004/magit-section.el index fc278359..482b218e 100644 --- a/elpa/magit-20210128.1702/magit-section.el +++ b/elpa/magit-section-20210801.1004/magit-section.el @@ -8,9 +8,11 @@ ;; Author: Jonas Bernoulli ;; Maintainer: Jonas Bernoulli -;; Package-Requires: ((emacs "25.1") (dash "20200524")) ;; Keywords: tools ;; Homepage: https://github.com/magit/magit +;; Package-Requires: ((emacs "25.1") (dash "20210330")) +;; Package-Version: 3.2.0 +;; SPDX-License-Identifier: GPL-3.0-or-later ;; Magit-Section is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -137,7 +139,8 @@ entries of this alist." (defcustom magit-section-visibility-indicator (if (window-system) '(magit-fringe-bitmap> . magit-fringe-bitmapv) - '("…" . t)) + (cons (if (char-displayable-p ?…) "…" "...") + t)) "Whether and how to indicate that a section can be expanded/collapsed. If nil, then don't show any indicators. @@ -560,15 +563,15 @@ HEADING is the displayed heading of the section." `(defun ,name (&optional expand) ,(format "\ Jump to the section \"%s\". With a prefix argument also expand it." heading) - (interactive "P") - (--if-let (magit-get-section - (cons (cons ',type ,value) - (magit-section-ident magit-root-section))) - (progn (goto-char (oref it start)) - (when expand - (with-local-quit (magit-section-show it)) - (recenter 0))) - (message ,(format "Section \"%s\" wasn't found" heading))))) + (interactive "P") + (--if-let (magit-get-section + (cons (cons ',type ,value) + (magit-section-ident magit-root-section))) + (progn (goto-char (oref it start)) + (when expand + (with-local-quit (magit-section-show it)) + (recenter 0))) + (message ,(format "Section \"%s\" wasn't found" heading))))) ;;;; Visibility @@ -1771,6 +1774,67 @@ Configuration'." val))))) (overlays-at pos t))) +;;; Bitmaps + +(when (fboundp 'define-fringe-bitmap) + (define-fringe-bitmap 'magit-fringe-bitmap+ + [#b00000000 + #b00011000 + #b00011000 + #b01111110 + #b01111110 + #b00011000 + #b00011000 + #b00000000]) + (define-fringe-bitmap 'magit-fringe-bitmap- + [#b00000000 + #b00000000 + #b00000000 + #b01111110 + #b01111110 + #b00000000 + #b00000000 + #b00000000]) + + (define-fringe-bitmap 'magit-fringe-bitmap> + [#b01100000 + #b00110000 + #b00011000 + #b00001100 + #b00011000 + #b00110000 + #b01100000 + #b00000000]) + (define-fringe-bitmap 'magit-fringe-bitmapv + [#b00000000 + #b10000010 + #b11000110 + #b01101100 + #b00111000 + #b00010000 + #b00000000 + #b00000000]) + + (define-fringe-bitmap 'magit-fringe-bitmap-bold> + [#b11100000 + #b01110000 + #b00111000 + #b00011100 + #b00011100 + #b00111000 + #b01110000 + #b11100000]) + (define-fringe-bitmap 'magit-fringe-bitmap-boldv + [#b10000001 + #b11000011 + #b11100111 + #b01111110 + #b00111100 + #b00011000 + #b00000000 + #b00000000]) + ) + ;;; _ (provide 'magit-section) ;;; magit-section.el ends here diff --git a/elpa/magit-section-20210801.1004/magit-section.info b/elpa/magit-section-20210801.1004/magit-section.info new file mode 100644 index 00000000..b98a309e --- /dev/null +++ b/elpa/magit-section-20210801.1004/magit-section.info @@ -0,0 +1,289 @@ +This is magit-section.info, produced by makeinfo version 6.7 from +magit-section.texi. + + Copyright (C) 2015-2021 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-Section: (magit-section). Use Magit sections in your own packages. +END-INFO-DIR-ENTRY + + +File: magit-section.info, Node: Top, Next: Introduction, Up: (dir) + +Magit-Section Developer Manual +****************************** + +This package implements the main user interface of Magit — the +collapsible sections that make up its buffers. This package used to be +distributed as part of Magit but how it can also be used by other +packages that have nothing to do with Magit or Git. + + To learn more about the section abstraction and available commands +and user options see *note (magit)Sections::. This manual documents how +you can use sections in your own packages. + +This manual is for Magit-Section version 3.2.0. + + Copyright (C) 2015-2021 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. + +* Menu: + +* Introduction:: +* Creating Sections:: +* Core Functions:: +* Matching Functions:: + + +File: magit-section.info, Node: Introduction, Next: Creating Sections, Prev: Top, Up: Top + +1 Introduction +************** + +This package implements the main user interface of Magit — the +collapsible sections that make up its buffers. This package used to be +distributed as part of Magit but how it can also be used by other +packages that have nothing to do with Magit or Git. + + To learn more about the section abstraction and available commands +and user options see *note (magit)Sections::. This manual documents how +you can use sections in your own packages. + + When the documentation leaves something unaddressed, then please +consider that Magit uses this library extensively and search its source +for suitable examples before asking me for help. Thanks! + + +File: magit-section.info, Node: Creating Sections, Next: Core Functions, Prev: Introduction, Up: Top + +2 Creating Sections +******************* + + -- Function: magit-insert-section [name] (type &optional value hide) + &rest body + + Create a section object of type CLASS, storing VALUE in its ‘value’ + slot, and insert the section at point. CLASS is a subclass of + ‘magit-section’ or has the form ‘(eval FORM)’, in which case FORM + is evaluated at runtime and should return a subclass. In other + places a sections class is oftern referred to as its "type". + + Many commands behave differently depending on the class of the + current section and sections of a certain class can have their own + keymap, which is specified using the ‘keymap’ class slot. The + value of that slot should be a variable whose value is a keymap. + + For historic reasons Magit and Forge in most cases use symbols as + CLASS that don’t actually identify a class and that lack the + appropriate package prefix. This works due to some undocumented + kludges, which are not available to other packages. + + When optional HIDE is non-nil collapse the section body by default, + i.e. when first creating the section, but not when refreshing the + buffer. Else expand it by default. This can be overwritten using + ‘magit-section-set-visibility-hook’. When a section is recreated + during a refresh, then the visibility of predecessor is inherited + and HIDE is ignored (but the hook is still honored). + + BODY is any number of forms that actually insert the section’s + heading and body. Optional NAME, if specified, has to be a symbol, + which is then bound to the object of the section being inserted. + + Before BODY is evaluated the ‘start’ of the section object is set + to the value of ‘point’ and after BODY was evaluated its ‘end’ is + set to the new value of ‘point’; BODY is responsible for moving + ‘point’ forward. + + If it turns out inside BODY that the section is empty, then + ‘magit-cancel-section’ can be used to abort and remove all traces + of the partially inserted section. This can happen when creating a + section by washing Git’s output and Git didn’t actually output + anything this time around. + + -- Function: magit-insert-heading &rest args + + Insert the heading for the section currently being inserted. + + This function should only be used inside ‘magit-insert-section’. + + When called without any arguments, then just set the ‘content’ slot + of the object representing the section being inserted to a marker + at ‘point’. The section should only contain a single line when + this function is used like this. + + When called with arguments ARGS, which have to be strings, or nil, + then insert those strings at point. The section should not contain + any text before this happens and afterwards it should again only + contain a single line. If the ‘face’ property is set anywhere + inside any of these strings, then insert all of them unchanged. + Otherwise use the ‘magit-section-heading’ face for all inserted + text. + + The ‘content’ property of the section object is the end of the + heading (which lasts from ‘start’ to ‘content’) and the beginning + of the the body (which lasts from ‘content’ to ‘end’). If the + value of ‘content’ is nil, then the section has no heading and its + body cannot be collapsed. If a section does have a heading, then + its height must be exactly one line, including a trailing newline + character. This isn’t enforced, you are responsible for getting it + right. The only exception is that this function does insert a + newline character if necessary. + + -- Macro: magit-insert-section-body &rest body + + Use BODY to insert the section body, once the section is expanded. + If the section is expanded when it is created, then this is like + ‘progn’. Otherwise BODY isn’t evaluated until the section is + explicitly expanded. + + -- Function: magit-cancel-section + + Cancel inserting the section that is currently being inserted. + Remove all traces of that section. + + -- Function: magit-wash-sequence function + + Repeatedly call FUNCTION until it returns ‘nil’ or the end of the + buffer is reached. FUNCTION has to move point forward or return + ‘nil’. + + +File: magit-section.info, Node: Core Functions, Next: Matching Functions, Prev: Creating Sections, Up: Top + +3 Core Functions +**************** + + -- Function: magit-current-section + + Return the section at point. + + -- Function: magit-section-ident section + + Return an unique identifier for SECTION. The return value has the + form ‘((TYPE . VALUE)...)’. + + -- Function: magit-section-ident-value value + + Return a constant representation of VALUE. + + VALUE is the value of a ‘magit-section’ object. If that is an + object itself, then that is not suitable to be used to identify the + section because two objects may represent the same thing but not be + equal. If possible a method should be added for such objects, + which returns a value that is equal. Otherwise the catch-all + method is used, which just returns the argument itself. + + -- 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’. If optional ROOT is non-nil, + then search in that section tree instead of in the one whose root + ‘magit-root-section’ is. + + -- Function: magit-section-lineage section + + Return the lineage of SECTION. The return value has the form + ‘(TYPE...)’. + + +File: magit-section.info, Node: Matching Functions, Prev: Core Functions, Up: Top + +4 Matching Functions +******************** + + -- Function: magit-section-match condition &optional (section + (magit-current-section)) + + Return t if SECTION matches CONDITION. + + SECTION defaults to the section at point. If SECTION is not + specified and there also is no section at point, then return nil. + + CONDITION can take the following forms: + + • ‘(CONDITION...)’ matches if any of the CONDITIONs matches. + + • ‘[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. + + • ‘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. + + -- Function: 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. + + -- Macro: magit-section-case &rest clauses + + Choose among clauses on the type of the section at point. + + Each clause looks like ‘(CONDITION BODY...)’. The type of the + section is compared against each CONDITION; the BODY forms of the + first match are evaluated sequentially and the value of the last + form is returned. Inside BODY the symbol ‘it’ is bound to the + section at point. If no clause succeeds or if there is no section + at point, return nil. + + See ‘magit-section-match’ for the forms CONDITION can take. + Additionally a CONDITION of t is allowed in the final clause, and + matches if no other CONDITION match, even if there is no section at + point. + + + +Tag Table: +Node: Top788 +Node: Introduction2069 +Node: Creating Sections2839 +Node: Core Functions7356 +Node: Matching Functions8682 + +End Tag Table + + +Local Variables: +coding: utf-8 +End: -- 2.47.3