Compare commits
2 Commits
2f7c2bd595
...
41089ec7a9
Author | SHA1 | Date | |
---|---|---|---|
|
41089ec7a9 | ||
|
63dd8da36b |
|
@ -1,6 +1,6 @@
|
|||
(1
|
||||
(0blayout . [(20190703 527) nil "Layout grouping with ease" single ((:commit . "fd9a8f353dbd45b4628b5f84b8d8c2525ebf571d") (:authors ("Elis \"etu\" Axelsson")) (:maintainer "Elis \"etu\" Axelsson") (:keywords "convenience" "window-management") (:url . "https://github.com/etu/0blayout"))])
|
||||
(0x0 . [(20201121 1210) ((emacs (24 1))) "Upload to 0x0.st" single ((:commit . "996f822a7c6a7ff7caf49ee537e92c0d01be1f9c") (:authors ("Philip K." . "philipk@posteo.net")) (:maintainer "Philip K." . "philipk@posteo.net") (:keywords "comm") (:url . "https://git.sr.ht/~zge/nullpointer-emacs"))])
|
||||
(0x0 . [(20201121 1210) ((emacs (24 1))) "Upload to 0x0.st" single ((:commit . "eb4d1ec4b667040429aa496838f758823dc55788") (:authors ("Philip K." . "philipk@posteo.net")) (:maintainer "Philip K." . "philipk@posteo.net") (:keywords "comm") (:url . "https://git.sr.ht/~zge/nullpointer-emacs"))])
|
||||
(0xc . [(20201025 2105) ((emacs (24 4)) (s (1 11 0))) "Base conversion made easy" tar ((:commit . "eec4fb10b9288c0852f751cfb05d638664fa2411") (:authors ("Adam Niederer" . "adam.niederer@gmail.com")) (:maintainer "Adam Niederer" . "adam.niederer@gmail.com") (:keywords "base" "conversion") (:url . "http://github.com/AdamNiederer/0xc"))])
|
||||
(2048-game . [(20200417 259) nil "play 2048 in Emacs" single ((:commit . "aad4a590ea91f9a3256233b9b345e9159c6993f2") (:authors ("Zachary Kanfer" . "zkanfer@gmail.com")) (:maintainer "Zachary Kanfer" . "zkanfer@gmail.com") (:url . "https://hg.sr.ht/~zck/game-2048"))])
|
||||
(2bit . [(20200926 1418) ((emacs (24 3))) "Library for reading data from 2bit files" single ((:commit . "69b4ec1d6d2ad95c9e59dacb43224abbec7a8989") (:authors ("Dave Pearson" . "davep@davep.org")) (:maintainer "Dave Pearson" . "davep@davep.org") (:keywords "files" "data") (:url . "https://github.com/davep/2bit.el"))])
|
||||
|
@ -71,7 +71,7 @@
|
|||
(aes . [(20171029 623) nil "Implementation of AES" single ((:commit . "b7d5da89c3443292e4f0b1c9d254d459933cf5af") (:authors ("Markus Sauermann" . "emacs-aes@sauermann-consulting.de")) (:maintainer "Markus Sauermann" . "emacs-aes@sauermann-consulting.de") (:keywords "data" "tools") (:url . "https://github.com/Sauermann/emacs-aes"))])
|
||||
(afternoon-theme . [(20140104 1859) ((emacs (24 1))) "Dark color theme with a deep blue background" single ((:commit . "89b1d778a1f8b385775c122f2bd1c62f0fbf931a") (:authors ("Ozan Sener" . "ozan@ozansener.com")) (:maintainer "Ozan Sener" . "ozan@ozansener.com") (:keywords "themes") (:url . "http://github.com/osener/emacs-afternoon-theme"))])
|
||||
(ag . [(20201031 2202) ((dash (2 8 0)) (s (1 9 0)) (cl-lib (0 5))) "A front-end for ag ('the silver searcher'), the C ack replacement." single ((:commit . "ed7e32064f92f1315cecbfc43f120bbc7508672c") (:authors ("Wilfred Hughes" . "me@wilfred.me.uk")) (:maintainer "Wilfred Hughes" . "me@wilfred.me.uk") (:url . "https://github.com/Wilfred/ag.el"))])
|
||||
(agda2-mode . [(20210220 2039) ((emacs (24 3)) (annotation (1 0)) (eri (1 0))) "interactive development for Agda, a dependently typed functional programming language" tar ((:commit . "2bf7d55728e3b76d38d05b1c190e55ea57d1407b"))])
|
||||
(agda2-mode . [(20210220 2039) ((emacs (24 3)) (annotation (1 0)) (eri (1 0))) "interactive development for Agda, a dependently typed functional programming language" tar ((:commit . "b96a2b99abb7979a644a6aa6738d650afa20c947"))])
|
||||
(aggressive-fill-paragraph . [(20180910 816) ((dash (2 10 0))) "A mode to automatically keep paragraphs filled" single ((:commit . "4a620e62b5e645a48b0a818bf4eb19daea4977df") (:authors ("David Shepherd" . "davidshepherd7@gmail.com")) (:maintainer "David Shepherd" . "davidshepherd7@gmail.com") (:keywords "fill-paragraph" "automatic" "comments") (:url . "https://github.com/davidshepherd7/aggressive-fill-paragraph-mode"))])
|
||||
(aggressive-indent . [(20200824 2352) ((emacs (24 3))) "Minor mode to aggressively keep your code always indented" single ((:commit . "b0ec0047aaae071ad1647159613166a253410a63") (:authors ("Artur Malabarba" . "emacs@endlessparentheses.com")) (:maintainer "Artur Malabarba" . "emacs@endlessparentheses.com") (:keywords "indent" "lisp" "maint" "tools") (:url . "https://github.com/Malabarba/aggressive-indent-mode"))])
|
||||
(agtags . [(20200730 116) ((emacs (25))) "A frontend to GNU Global" tar ((:commit . "d80c6f61dee74040c07b7010d48cab1df13a3abf") (:authors ("Vietor Liu" . "vietor.liu@gmail.com")) (:maintainer "Vietor Liu" . "vietor.liu@gmail.com") (:keywords "tools" "convenience") (:url . "https://github.com/vietor/agtags"))])
|
||||
|
@ -124,7 +124,7 @@
|
|||
(annalist . [(20190929 207) ((emacs (24 4)) (cl-lib (0 5))) "Record and display information such as keybindings" tar ((:commit . "134fa3f0fb91a636a1c005c483516d4b64905a6d") (:authors ("Fox Kiester" . "noct@posteo.net")) (:maintainer "Fox Kiester" . "noct@posteo.net") (:keywords "convenience" "tools" "keybindings" "org") (:url . "https://github.com/noctuid/annalist.el"))])
|
||||
(annotate . [(20210322 1739) nil "annotate files without changing them" single ((:commit . "54ac759facadacbfea5c1e7c2975e2da6434cdda") (:authors ("Bastian Bechtold")) (:maintainer "Bastian Bechtold") (:url . "https://github.com/bastibe/annotate.el"))])
|
||||
(annotate-depth . [(20160520 2040) nil "Annotate buffer if indentation depth is beyond threshold." single ((:commit . "fcb24fa36287250e40d195590c4ca4a8a696277b") (:authors ("Morten Slot Kristensen <msk AT nullpointer DOT dk>")) (:maintainer "Morten Slot Kristensen <msk AT nullpointer DOT dk>") (:keywords "convenience") (:url . "https://github.com/netromdk/annotate-depth"))])
|
||||
(annotation . [(20200914 644) nil "Functions for annotating text with faces and help bubbles" single ((:commit . "2bf7d55728e3b76d38d05b1c190e55ea57d1407b") (:url . "https://github.com/agda/agda"))])
|
||||
(annotation . [(20200914 644) nil "Functions for annotating text with faces and help bubbles" single ((:commit . "b96a2b99abb7979a644a6aa6738d650afa20c947") (:url . "https://github.com/agda/agda"))])
|
||||
(annoying-arrows-mode . [(20161024 646) ((cl-lib (0 5))) "Ring the bell if using arrows too much" single ((:commit . "3c42e9807d7696da2da2a21b63beebf9cdb3f5dc") (:authors ("Magnar Sveen" . "magnars@gmail.com")) (:maintainer "Magnar Sveen" . "magnars@gmail.com"))])
|
||||
(ansi . [(20200611 944) ((emacs (24 1)) (cl-lib (0 6)) (s (1 6 1)) (dash (1 5 0))) "Turn string into ansi strings" single ((:commit . "a41d5cc719297515d85bb5256980cd1204a71b88") (:authors ("Johan Andersson" . "johan.rejeep@gmail.com")) (:maintainer "Johan Andersson" . "johan.rejeep@gmail.com") (:keywords "terminals" "color" "ansi") (:url . "http://github.com/rejeep/ansi"))])
|
||||
(ansible . [(20210103 543) ((s (1 9 0)) (f (0 16 2))) "Ansible minor mode" tar ((:commit . "40af0d2bbb6c5bbcf7aa9269ac9a07e22622d263") (:authors ("k1LoW (Kenichirou Oyama), <k1lowxb [at] gmail [dot] com> <k1low [at] 101000lab [dot] org>")) (:maintainer "k1LoW (Kenichirou Oyama), <k1lowxb [at] gmail [dot] com> <k1low [at] 101000lab [dot] org>") (:url . "http://101000lab.org"))])
|
||||
|
@ -181,7 +181,7 @@
|
|||
(audio-notes-mode . [(20170611 2159) nil "Play audio notes synced from somewhere else." single ((:commit . "fa38350829c7e97257efc746a010471d33748a68") (:authors ("Artur Malabarba" . "bruce.connor.am@gmail.com")) (:maintainer "Artur Malabarba" . "bruce.connor.am@gmail.com") (:keywords "hypermedia" "convenience") (:url . "http://github.com/Bruce-Connor/audio-notes-mode"))])
|
||||
(aurel . [(20170114 937) ((emacs (24 3)) (bui (1 1 0)) (dash (2 11 0))) "Search, get info, vote for and download AUR packages" single ((:commit . "fc7ad208f43f8525f84a18941c9b55f956df8961") (:authors ("Alex Kost" . "alezost@gmail.com")) (:maintainer "Alex Kost" . "alezost@gmail.com") (:keywords "tools") (:url . "https://github.com/alezost/aurel"))])
|
||||
(aurora-config-mode . [(20180216 2302) nil "Major mode for Apache Aurora configuration files" single ((:commit . "8273ec7937a21b469b9dbb6c11714255b890f410") (:authors ("Berk D. Demir" . "bdd@mindcast.org")) (:maintainer "Berk D. Demir" . "bdd@mindcast.org") (:keywords "languages" "configuration") (:url . "https://github.com/bdd/aurora-config.el"))])
|
||||
(auth-source-pass . [(20210210 1908) ((emacs (27 1))) "Integrate auth-source with password-store" single ((:commit . "468bba286fc20d739ed7724ec884357907ac8bda") (:authors ("Damien Cassou" . "damien@cassou.me") ("Nicolas Petton" . "nicolas@petton.fr") ("Keith Amidon" . "camalot@picnicpark.org")) (:maintainer "Damien Cassou" . "damien@cassou.me") (:url . "https://github.com/DamienCassou/auth-source-pass"))])
|
||||
(auth-source-pass . [(20210210 1908) ((emacs (27 1))) "Integrate auth-source with password-store" single ((:commit . "fa8b964494c1ef42035fad340ff5f29fcdbed21c") (:authors ("Damien Cassou" . "damien@cassou.me") ("Nicolas Petton" . "nicolas@petton.fr") ("Keith Amidon" . "camalot@picnicpark.org")) (:maintainer "Damien Cassou" . "damien@cassou.me") (:url . "https://github.com/DamienCassou/auth-source-pass"))])
|
||||
(auth-source-xoauth2 . [(20200911 1554) ((emacs (26 1))) "Integrate auth-source with XOAUTH2" single ((:commit . "d3890eaa3a46dc89758ec6b789949e70ae782896") (:authors ("Cesar Crusius" . "ccrusius@google.com")) (:maintainer "Cesar Crusius" . "ccrusius@google.com") (:url . "https://github.com/ccrusius/auth-source-xoauth2"))])
|
||||
(auto-async-byte-compile . [(20160916 454) nil "Automatically byte-compile when saved" single ((:commit . "8681e74ddb8481789c5dbb3cafabb327db4c4484") (:authors ("rubikitch" . "rubikitch@ruby-lang.org")) (:maintainer "rubikitch" . "rubikitch@ruby-lang.org") (:keywords "lisp" "convenience") (:url . "http://www.emacswiki.org/cgi-bin/wiki/download/auto-async-byte-compile.el"))])
|
||||
(auto-auto-indent . [(20131106 1903) ((es-lib (0 1)) (cl-lib (1 0))) "Indents code as you type" single ((:commit . "0139378577f936d34b20276af6f022fb457af490") (:authors ("sabof")) (:maintainer "sabof") (:url . "https://github.com/sabof/auto-auto-indent"))])
|
||||
|
@ -296,7 +296,7 @@
|
|||
(bibliothek . [(20190124 1828) ((emacs (24 4)) (pdf-tools (0 70)) (a (0 1 0 -3 4))) "Managing a digital library of PDFs" single ((:commit . "331252334ea2e62d8e06b2dfa24be5dbd7f9c09f") (:authors ("Göktuğ Kayaalp" . "self@gkayaalp.com")) (:maintainer "Göktuğ Kayaalp" . "self@gkayaalp.com") (:keywords "tools") (:url . "https://dev.gkayaalp.com/elisp/index.html#bibliothek-el"))])
|
||||
(bibretrieve . [(20191124 1855) ((auctex (11 87)) (emacs (24 3))) "Retrieve BibTeX entries from the internet" tar ((:commit . "81dc8e0db3629cc180eafb2bc34b60dcd8980316") (:authors ("Antonio Sartori")) (:maintainer "Pavel Zorin-Kranich" . "pzorin@uni-bonn.de") (:keywords "bibtex" "bibliography" "mathscinet" "arxiv" "zbmath") (:url . "https://github.com/pzorin/bibretrieve"))])
|
||||
(bibslurp . [(20151202 2346) ((s (1 6 0)) (dash (1 5 0))) "retrieve BibTeX entries from NASA ADS" single ((:commit . "0116bbb04840d20a6b087e6d9c921bb1c2489a8f") (:keywords "bibliography" "nasa ads") (:url . "https://github.com/mkmcc/bibslurp"))])
|
||||
(bibtex-actions . [(20210413 1148) ((emacs (26 3)) (bibtex-completion (1 0))) "Biblographic commands based on completing-read" single ((:commit . "842b6f49d2b0646dc54bb95f61ae6dd5e3bf2a71") (:authors ("Bruce D'Arcus <https://github.com/bdarcus>")) (:maintainer "Bruce D'Arcus <https://github.com/bdarcus>") (:url . "https://github.com/bdarcus/bibtex-actions"))])
|
||||
(bibtex-actions . [(20210413 1336) ((emacs (26 3)) (bibtex-completion (1 0))) "Biblographic commands based on completing-read" single ((:commit . "4e6643834659a670ae1d2d9c5f493843ceb2ff1d") (:authors ("Bruce D'Arcus <https://github.com/bdarcus>")) (:maintainer "Bruce D'Arcus <https://github.com/bdarcus>") (:url . "https://github.com/bdarcus/bibtex-actions"))])
|
||||
(bibtex-completion . [(20210408 1649) ((parsebib (1 0)) (s (1 9 0)) (dash (2 6 0)) (f (0 16 2)) (cl-lib (0 5)) (biblio (0 2)) (emacs (26 1))) "A BibTeX backend for completion frameworks" single ((:commit . "9f6ea920a49457d85096caa0e61f086a42b2908e") (:authors ("Titus von der Malsburg" . "malsburg@posteo.de") ("Justin Burkett" . "justin@burkett.cc")) (:maintainer "Titus von der Malsburg" . "malsburg@posteo.de") (:url . "https://github.com/tmalsburg/helm-bibtex"))])
|
||||
(bibtex-utils . [(20190703 2117) nil "Provides utilities for extending BibTeX mode" single ((:commit . "26a8f0909b6adbf545a2b5e57ce7f779bf7a65af") (:authors ("Tyler Smith" . "tyler@plantarum.ca")) (:maintainer "Tyler Smith" . "tyler@plantarum.ca") (:keywords "bibtex") (:url . "https://github.com/plantarum/bibtex-utils"))])
|
||||
(bicycle . [(20201028 1854) ((emacs (25 1))) "cycle outline and code visibility" single ((:commit . "e3fbc0737bb5f891e4d57d048bbc1fe17401f17f") (:authors ("Jonas Bernoulli" . "jonas@bernoul.li")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "outlines") (:url . "https://github.com/tarsius/bicycle"))])
|
||||
|
@ -336,7 +336,7 @@
|
|||
(bonjourmadame . [(20170919 1134) nil "Say \"Hello ma'am!\"" single ((:commit . "d3df185fce78aefa689fded8e56a654f0fde4ac0"))])
|
||||
(boogie-friends . [(20210323 1836) ((cl-lib (0 5)) (dash (2 10 0)) (flycheck (0 23)) (yasnippet (0 9 0 1)) (company (0 8 12))) "A collection of programming modes for Boogie, Dafny, and Z3 (SMTLIB v2)." tar ((:commit . "bc5572f796bc3ecafadadcbd93de73052304c856") (:authors ("Clément Pit--Claudel" . "clement.pitclaudel@live.com")) (:maintainer "Clément Pit--Claudel" . "clement.pitclaudel@live.com") (:keywords "convenience" "languages") (:url . "https://github.com/boogie-org/boogie-friends/"))])
|
||||
(bool-flip . [(20161215 1539) ((emacs (24 3))) "flip the boolean under the point" single ((:commit . "f58a9a7b9ab875bcfbd57c8262697ae404eb4485") (:authors ("Michael Brandt" . "michaelbrandt5@gmail.com")) (:maintainer "Michael Brandt" . "michaelbrandt5@gmail.com") (:keywords "boolean" "convenience" "usability") (:url . "http://github.com/michaeljb/bool-flip/"))])
|
||||
(boon . [(20210323 1341) ((emacs (25 1)) (dash (2 12 0)) (expand-region (0 10 0)) (multiple-cursors (1 3 0)) (pcre2el (1 8))) "Ergonomic Command Mode for Emacs." tar ((:commit . "17a7a9219a5a9b7156f58f7f30227fc2b79b6020"))])
|
||||
(boon . [(20210413 1322) ((emacs (25 1)) (dash (2 12 0)) (expand-region (0 10 0)) (multiple-cursors (1 3 0)) (pcre2el (1 8))) "Ergonomic Command Mode for Emacs." tar ((:commit . "a4f2d2caaf2d7a0adf36c19ea20a79dcfa129cad"))])
|
||||
(borg . [(20210330 1213) ((emacs (26)) (epkg (3 2 2)) (magit (2 90 1))) "assimilate Emacs packages as Git submodules" tar ((:commit . "7f6642c297044ffa10a287a5a74748ce0b3f8c27") (:authors ("Jonas Bernoulli" . "jonas@bernoul.li")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "tools") (:url . "https://github.com/emacscollective/borg"))])
|
||||
(borland-blue-theme . [(20160117 1321) ((emacs (24 1))) "Blue/yellow theme based on old DOS Borland/Turbo C IDE" single ((:commit . "db74eefebbc89d3c62575f8f50b319e87b4a3470") (:authors ("Alexey Veretennikov <alexey dot veretennikov at gmail dot com>")) (:maintainer "Alexey Veretennikov <alexey dot veretennikov at gmail dot com>") (:keywords "themes") (:url . "http://github.com/fourier/borland-blue-theme"))])
|
||||
(boron-theme . [(20170808 1308) ((emacs (24 0))) "an Emacs 24 theme based on Boron (tmTheme)" single ((:commit . "87ae1a765e07429fec25d2f29b004f84b52d2e0a") (:authors ("Jason Milkins")) (:maintainer "Jason Milkins") (:url . "https://github.com/emacsfodder/tmtheme-to-deftheme"))])
|
||||
|
@ -426,10 +426,10 @@
|
|||
(catmacs . [(20170826 1157) ((emacs (24))) "Simple CAT interface for Yaesu Transceivers." single ((:commit . "65d3e0563abe6ff9577202cf2278074d4130fbdd") (:authors ("Frank Singleton" . "b17flyboy@gmail.com")) (:maintainer "Frank Singleton" . "b17flyboy@gmail.com") (:keywords "comm" "hardware") (:url . "https://bitbucket.org/pymaximus/catmacs"))])
|
||||
(cbm . [(20171116 1240) ((cl-lib (0 5))) "Switch to similar buffers." single ((:commit . "5b41c936ba9f6d170309a85ffebc9939c1050b31") (:authors ("Lukas Fürmetz" . "fuermetz@mailbox.org")) (:maintainer "Lukas Fürmetz" . "fuermetz@mailbox.org") (:keywords "buffers") (:url . "http://github.com/akermu/cbm.el"))])
|
||||
(cc-cedict . [(20200705 443) ((emacs (26 1))) "Interface to CC-CEDICT (a Chinese-English dictionary)" single ((:commit . "6bb9481e48b889503626b4e3cb7cfec8d14cbf4b") (:authors ("Xu Chunyang")) (:maintainer "Xu Chunyang") (:url . "https://github.com/xuchunyang/cc-cedict.el"))])
|
||||
(ccc . [(20210403 1958) nil "buffer local cursor color control library" single ((:commit . "a266f70eb99ffb657b7821c2e1de49f5184a59ed") (:authors ("Masatake YAMATO" . "masata-y@is.aist-nara.ac.jp")) (:maintainer "SKK Development Team") (:keywords "cursor") (:url . "https://github.com/skk-dev/ddskk"))])
|
||||
(ccc . [(20210414 1352) nil "buffer local cursor color control library" single ((:commit . "6ed518435be2d8c6fe3cfb421f046c0f084dde9e") (:authors ("Masatake YAMATO" . "masata-y@is.aist-nara.ac.jp")) (:maintainer "SKK Development Team") (:keywords "cursor") (:url . "https://github.com/skk-dev/ddskk"))])
|
||||
(ccls . [(20200820 308) ((emacs (25 1)) (lsp-mode (6 3 1)) (dash (2 14 1))) "ccls client for lsp-mode" tar ((:commit . "675a5704c14a27931e835a431beea3631d92e8e6") (:authors ("Tobias Pisani, Fangrui Song")) (:maintainer "Tobias Pisani, Fangrui Song") (:keywords "languages" "lsp" "c++") (:url . "https://github.com/MaskRay/emacs-ccls"))])
|
||||
(cd-compile . [(20141108 1957) nil "run compile in a specific directory" single ((:commit . "10284ccae86afda4a37b09ba90acd1e2efedec9f") (:authors ("Jamie Nicol" . "jamie@thenicols.net")) (:maintainer "Jamie Nicol" . "jamie@thenicols.net"))])
|
||||
(cdb . [(20200904 1431) nil "constant database (cdb) reader for Emacs Lisp" single ((:commit . "a266f70eb99ffb657b7821c2e1de49f5184a59ed") (:authors ("Yusuke Shinyama <yusuke at cs . nyu . edu>")) (:maintainer "SKK Development Team") (:keywords "cdb") (:url . "https://github.com/skk-dev/ddskk"))])
|
||||
(cdb . [(20200904 1431) nil "constant database (cdb) reader for Emacs Lisp" single ((:commit . "6ed518435be2d8c6fe3cfb421f046c0f084dde9e") (:authors ("Yusuke Shinyama <yusuke at cs . nyu . edu>")) (:maintainer "SKK Development Team") (:keywords "cdb") (:url . "https://github.com/skk-dev/ddskk"))])
|
||||
(cdlatex . [(20201016 1659) nil "Fast input methods for LaTeX environments and math" single ((:commit . "adf96bab0bbf28f65c882c0874f1c14fdb216bd8") (:authors ("Carsten Dominik" . "carsten.dominik@gmail.com")) (:maintainer "Carsten Dominik" . "carsten.dominik@gmail.com") (:keywords "tex"))])
|
||||
(cdnjs . [(20161031 1522) ((dash (2 13 0)) (deferred (0 4)) (f (0 17 2)) (pkg-info (0 5))) "A front end for http://cdnjs.com" single ((:commit . "ce19880d3ec3d81e6c665d0b1dfea99cc7a3f908") (:authors ("Yasuyuki Oka" . "yasuyk@gmail.com")) (:maintainer "Yasuyuki Oka" . "yasuyk@gmail.com") (:keywords "tools") (:url . "https://github.com/yasuyk/cdnjs.el"))])
|
||||
(cedit . [(20200816 526) nil "paredit-like commands for c-like languages" single ((:commit . "cb38316903e6cfa8b8c978defa7e1dafcd4e0c12") (:authors ("zk_phi")) (:maintainer "zk_phi") (:url . "http://zk-phi.gitub.io/"))])
|
||||
|
@ -441,7 +441,7 @@
|
|||
(centimacro . [(20201225 1132) nil "Assign multiple macros as global key bindings" single ((:commit . "0149877584b333c4f1953f0767f0cae23881b0df") (:authors ("Oleh Krehel" . "ohwoeowho@gmail.com")) (:maintainer "Oleh Krehel" . "ohwoeowho@gmail.com") (:keywords "macros") (:url . "https://github.com/abo-abo/centimacro"))])
|
||||
(cerbere . [(20181113 1641) ((pkg-info (0 5))) "Unit testing in Emacs for several programming languages" tar ((:commit . "c667c165d9c1657f13d2d46f09ba21b61f9402cc") (:authors ("Nicolas Lamirault" . "nicolas.lamirault@gmail.com")) (:maintainer "Nicolas Lamirault" . "nicolas.lamirault@gmail.com") (:keywords "python" "go" "php" "phpunit" "elisp" "ert" "tests" "tdd") (:url . "https://github.com/nlamirault/cerbere"))])
|
||||
(ceylon-mode . [(20180606 1324) ((emacs (25))) "Major mode for editing Ceylon source code" single ((:commit . "948515672bc596dc118e8e3ede3ede5ec6a3c95a") (:authors ("Lucas Werkmeister" . "mail@lucaswerkmeister.de")) (:maintainer "Lucas Werkmeister" . "mail@lucaswerkmeister.de") (:keywords "languages" "ceylon") (:url . "https://github.com/lucaswerkmeister/ceylon-mode"))])
|
||||
(cfengine-code-style . [(20171115 2108) nil "C code style for CFEngine project." single ((:commit . "02478862ea707ed51223c1d5d2d8cd8d61d2915d") (:authors ("Mikhail Gusarov" . "mikhail.gusarov@cfengine.com")) (:maintainer "Mikhail Gusarov" . "mikhail.gusarov@cfengine.com") (:url . "https://github.com/cfengine/core"))])
|
||||
(cfengine-code-style . [(20171115 2108) nil "C code style for CFEngine project." single ((:commit . "0418e0723319b0046f0000ed4d4959799c876f0e") (:authors ("Mikhail Gusarov" . "mikhail.gusarov@cfengine.com")) (:maintainer "Mikhail Gusarov" . "mikhail.gusarov@cfengine.com") (:url . "https://github.com/cfengine/core"))])
|
||||
(cff . [(20160118 2018) ((cl-lib (0 5)) (emacs (24))) "Search of the C/C++ file header by the source and vice versa" single ((:commit . "b6ab2a28e64ef06f281ec74cfe3114e450644dfa") (:authors ("Alexey Veretennikov" . "alexey.veretennikov@gmail.com")) (:maintainer "Alexey Veretennikov" . "alexey.veretennikov@gmail.com") (:keywords "find-file") (:url . "https://github.com/fourier/cff"))])
|
||||
(cfml-mode . [(20190617 1130) ((emacs (25))) "Emacs mode for editing CFML files" single ((:commit . "2de315abddb6af088a2346e142cc305889dcd775") (:authors ("Andrew Myers" . "am2605@gmail.com")) (:maintainer "Andrew Myers" . "am2605@gmail.com") (:url . "https://github.com/am2605/cfml-mode"))])
|
||||
(cfn-mode . [(20210129 2037) ((emacs (26 0)) (f (0 20 0)) (s (1 12 0)) (yaml-mode (0 0 13))) "AWS cloudformation mode" tar ((:commit . "a4ca40978e680f9edc86c141e696e0ae57c63533") (:authors ("William Orr" . "will@worrbase.com")) (:maintainer "William Orr" . "will@worrbase.com") (:keywords "convenience" "languages" "tools") (:url . "https://gitlab.com/worr/cfn-mode"))])
|
||||
|
@ -474,7 +474,7 @@
|
|||
(chronos . [(20150602 1529) nil "multiple simultaneous countdown / countup timers" tar ((:commit . "b360d9dae57aa553cf2a14ffa0756a51ad71de09") (:authors ("David Knight" . "dxknight@opmbx.org")) (:maintainer "David Knight" . "dxknight@opmbx.org") (:keywords "calendar") (:url . "http://github.com/dxknight/chronos"))])
|
||||
(chruby . [(20180114 1652) ((cl-lib (0 5))) "Emacs integration for chruby" single ((:commit . "42bc6d521f832eca8e2ba210f30d03ad5529788f") (:authors ("Arne Brasseur" . "arne@arnebrasseur.net")) (:maintainer "Arne Brasseur" . "arne@arnebrasseur.net") (:keywords "languages") (:url . "https://github.com/plexus/chruby.el"))])
|
||||
(chyla-theme . [(20180302 1658) nil "chyla.org - green color theme." single ((:commit . "ae5e7ecace2ab474151eb0ac5ef07fba2dc32f8a") (:authors ("Adam Chyła" . "adam@chyla.org")) (:maintainer "Adam Chyła" . "adam@chyla.org") (:url . "https://github.com/chyla/ChylaThemeForEmacs"))])
|
||||
(cider . [(20210413 850) ((emacs (25)) (clojure-mode (5 12)) (parseedn (0 2)) (pkg-info (0 4)) (queue (0 2)) (spinner (1 7)) (seq (2 22)) (sesman (0 3 2))) "Clojure Interactive Development Environment that Rocks" tar ((:commit . "a8060f05e83e3dca586e39b1914df7a2bfc35125") (:authors ("Tim King" . "kingtim@gmail.com") ("Phil Hagelberg" . "technomancy@gmail.com") ("Bozhidar Batsov" . "bozhidar@batsov.com") ("Artur Malabarba" . "bruce.connor.am@gmail.com") ("Hugo Duncan" . "hugo@hugoduncan.org") ("Steve Purcell" . "steve@sanityinc.com")) (:maintainer "Bozhidar Batsov" . "bozhidar@batsov.com") (:keywords "languages" "clojure" "cider") (:url . "http://www.github.com/clojure-emacs/cider"))])
|
||||
(cider . [(20210413 850) ((emacs (25)) (clojure-mode (5 12)) (parseedn (0 2)) (pkg-info (0 4)) (queue (0 2)) (spinner (1 7)) (seq (2 22)) (sesman (0 3 2))) "Clojure Interactive Development Environment that Rocks" tar ((:commit . "3147a27ffff6858bc8fc071386c9b8999b74c12b") (:authors ("Tim King" . "kingtim@gmail.com") ("Phil Hagelberg" . "technomancy@gmail.com") ("Bozhidar Batsov" . "bozhidar@batsov.com") ("Artur Malabarba" . "bruce.connor.am@gmail.com") ("Hugo Duncan" . "hugo@hugoduncan.org") ("Steve Purcell" . "steve@sanityinc.com")) (:maintainer "Bozhidar Batsov" . "bozhidar@batsov.com") (:keywords "languages" "clojure" "cider") (:url . "http://www.github.com/clojure-emacs/cider"))])
|
||||
(cider-decompile . [(20151122 537) ((cider (0 3 0)) (javap-mode (9))) "decompilation extension for cider" single ((:commit . "5d87035f3c3c14025e8f01c0c53d0ce2c8f56651") (:authors ("Dmitry Bushenko")) (:maintainer "Dmitry Bushenko") (:keywords "languages" "clojure" "cider") (:url . "http://www.github.com/clojure-emacs/cider-decompile"))])
|
||||
(cider-eval-sexp-fu . [(20190311 2152) ((emacs (24)) (eval-sexp-fu (0 5 0))) "Briefly highlights an evaluated sexp." single ((:commit . "7fd229f1441356866aedba611fd0cf4e89b50921") (:authors ("Sylvain Benner" . "sylvain.benner@gmail.com")) (:maintainer "Sylvain Benner" . "sylvain.benner@gmail.com") (:keywords "languages" "clojure" "cider"))])
|
||||
(cider-hydra . [(20190816 1121) ((cider (0 22 0)) (hydra (0 13 0))) "Hydras for CIDER." single ((:commit . "c3b8a15d72dddfbc390ab6a454bd7e4c765a2c95") (:authors ("Tianxiang Xiong" . "tianxiang.xiong@gmail.com")) (:maintainer "Tianxiang Xiong" . "tianxiang.xiong@gmail.com") (:keywords "convenience" "tools") (:url . "https://github.com/clojure-emacs/cider-hydra"))])
|
||||
|
@ -504,7 +504,7 @@
|
|||
(clippy . [(20161028 1954) ((pos-tip (1 0))) "Show tooltip with function documentation at point" single ((:commit . "e77f6b63e54d74e243be98accad474e38f7e2a86") (:authors ("Matus Goljer" . "matus.goljer@gmail.com")) (:maintainer "Matus Goljer" . "matus.goljer@gmail.com") (:keywords "docs") (:url . "https://github.com/Fuco1/clippy.el"))])
|
||||
(clips-mode . [(20170909 823) nil "Major mode for editing CLIPS code and REPL" tar ((:commit . "dd38e2822640a38f7d8bfec4f69d8dd24be27074") (:authors ("David E. Young" . "david.young@fnc.fujitsu.com") ("Andrey Kotlarski" . "m00naticus@gmail.com") ("Grant Rettke" . "grettke@acm.org")) (:maintainer "Grant Rettke" . "grettke@acm.org") (:keywords "clips"))])
|
||||
(clj-decompiler . [(20201004 1019) ((emacs (26 1)) (clojure-mode (5 12)) (cider (0 18 0))) "Clojure Java decompiler expansion" single ((:commit . "f04e97af2678f170b872ff35dcbe81f86f7c39f2") (:authors ("Ben Sless" . "ben.sless@gmail.com")) (:maintainer "Ben Sless" . "ben.sless@gmail.com") (:keywords "languages" "clojure" "cider" "java" "decompiler") (:url . "https://www.github.com/bsless/clj-decompiler.el"))])
|
||||
(clj-refactor . [(20210413 733) ((emacs (25 1)) (seq (2 19)) (yasnippet (0 6 1)) (paredit (24)) (multiple-cursors (1 2 2)) (clojure-mode (5 9)) (cider (1 0)) (parseedn (0 2)) (inflections (2 3)) (hydra (0 13 2))) "A collection of commands for refactoring Clojure code" tar ((:commit . "efbcbf6d46b0a4a63d516f0e4f20b6ec2308f13e") (:authors ("Magnar Sveen" . "magnars@gmail.com") ("Lars Andersen" . "expez@expez.com") ("Benedek Fazekas" . "benedek.fazekas@gmail.com") ("Bozhidar Batsov" . "bozhidar@batsov.com")) (:maintainer "Magnar Sveen" . "magnars@gmail.com") (:keywords "convenience" "clojure" "cider"))])
|
||||
(clj-refactor . [(20210413 733) ((emacs (25 1)) (seq (2 19)) (yasnippet (0 6 1)) (paredit (24)) (multiple-cursors (1 2 2)) (clojure-mode (5 9)) (cider (1 0)) (parseedn (0 2)) (inflections (2 3)) (hydra (0 13 2))) "A collection of commands for refactoring Clojure code" tar ((:commit . "f50fb242ba0ff8526746ae0ffeb19b9a535c00b2") (:authors ("Magnar Sveen" . "magnars@gmail.com") ("Lars Andersen" . "expez@expez.com") ("Benedek Fazekas" . "benedek.fazekas@gmail.com") ("Bozhidar Batsov" . "bozhidar@batsov.com")) (:maintainer "Magnar Sveen" . "magnars@gmail.com") (:keywords "convenience" "clojure" "cider"))])
|
||||
(cljr-helm . [(20160913 828) ((clj-refactor (0 13 0)) (helm-core (1 7 7)) (cl-lib (0 5))) "Wraps clojure refactor commands with helm" single ((:commit . "f2fc7b698a56e4a44d5dfbc6a55d77a93c0fa9a4") (:authors ("Phil Jackson" . "phil@shellarchive.co.uk")) (:maintainer "Phil Jackson" . "phil@shellarchive.co.uk") (:keywords "helm" "clojure" "refactor") (:url . "https://github.com/philjackson/cljr-helm"))])
|
||||
(cljr-ivy . [(20200602 1607) ((clj-refactor (2 5 0)) (ivy (0 13 0)) (emacs (24 3)) (cl-lib (0 6 1))) "Access clojure refactor with ivy completion" single ((:commit . "921ba65d0db7cda4edcd690c708946125b874a70") (:authors ("Wanderson Ferreira" . "iagwanderson@gmail.com")) (:maintainer "Wanderson Ferreira" . "iagwanderson@gmail.com") (:keywords "convenience" "matching") (:url . "https://github.com/wandersoncferreira/cljr-ivy"))])
|
||||
(cljsbuild-mode . [(20160402 1700) nil "A minor mode for the ClojureScript 'lein cljsbuild' command" single ((:commit . "fa2315660cb3ce944b5e16c679dcf5afd6a97f4c") (:keywords "clojure" "clojurescript" "leiningen" "compilation") (:url . "http://github.com/kototama/cljsbuild-mode"))])
|
||||
|
@ -514,8 +514,8 @@
|
|||
(clojars . [(20180825 1951) ((request-deferred (0 2 0))) "clojars.org search interface" single ((:commit . "696c5b056e45067512a7d6dcce2515f3c639f61b") (:authors ("Joshua Miller" . "josh@joshmiller.io")) (:maintainer "Joshua Miller" . "josh@joshmiller.io") (:keywords "docs" "help" "tools") (:url . "https://github.com/joshuamiller/clojars.el"))])
|
||||
(clojure-essential-ref . [(20200619 1653) ((emacs (24)) (cider (0 24 0))) "Cider-doc to \"Clojure, The Essential Reference\"" single ((:commit . "13ac560c25f7355fba00d9ca8c9f4ca03e7fd189") (:url . "https://github.com/p3r7/clojure-essential-ref"))])
|
||||
(clojure-essential-ref-nov . [(20200719 608) ((emacs (24)) (dash (2 16 0)) (nov (0 3 1)) (clojure-essential-ref (0 1 0))) "Cider-doc to \"Clojure, The Essential Reference\" (EPUB)" single ((:commit . "13ac560c25f7355fba00d9ca8c9f4ca03e7fd189") (:url . "https://github.com/p3r7/clojure-essential-ref"))])
|
||||
(clojure-mode . [(20210322 704) ((emacs (25 1))) "Major mode for Clojure code" single ((:commit . "a14671e03c867c9d759ee9e59cdc5cecbf271245") (:maintainer "Bozhidar Batsov" . "bozhidar@batsov.com") (:keywords "languages" "clojure" "clojurescript" "lisp") (:url . "http://github.com/clojure-emacs/clojure-mode"))])
|
||||
(clojure-mode-extra-font-locking . [(20210322 704) ((clojure-mode (3 0))) "Extra font-locking for Clojure mode" single ((:commit . "a14671e03c867c9d759ee9e59cdc5cecbf271245") (:authors ("Bozhidar Batsov" . "bozhidar@batsov.com")) (:maintainer "Bozhidar Batsov" . "bozhidar@batsov.com") (:keywords "languages" "lisp") (:url . "http://github.com/clojure-emacs/clojure-mode"))])
|
||||
(clojure-mode . [(20210322 704) ((emacs (25 1))) "Major mode for Clojure code" single ((:commit . "83df48ecd01483e91d5578b015a2f1f7a7526d60") (:maintainer "Bozhidar Batsov" . "bozhidar@batsov.com") (:keywords "languages" "clojure" "clojurescript" "lisp") (:url . "http://github.com/clojure-emacs/clojure-mode"))])
|
||||
(clojure-mode-extra-font-locking . [(20210322 704) ((clojure-mode (3 0))) "Extra font-locking for Clojure mode" single ((:commit . "83df48ecd01483e91d5578b015a2f1f7a7526d60") (:authors ("Bozhidar Batsov" . "bozhidar@batsov.com")) (:maintainer "Bozhidar Batsov" . "bozhidar@batsov.com") (:keywords "languages" "lisp") (:url . "http://github.com/clojure-emacs/clojure-mode"))])
|
||||
(clojure-quick-repls . [(20150814 736) ((cider (0 8 1)) (dash (2 9 0))) "Quickly create Clojure and ClojureScript repls for a project." single ((:commit . "730311dd3ac4e0aceb0204f818b422017873467f") (:keywords "languages" "clojure" "cider" "clojurescript") (:url . "https://github.com/symfrog/clojure-quick-repls"))])
|
||||
(clojure-snippets . [(20180314 1308) ((yasnippet (0 10 0))) "Yasnippets for clojure" tar ((:commit . "6068dca90467a0f4ebc2cd39338a173d6f5ddc04") (:authors ("Max Penet" . "m@qbits.cc")) (:maintainer "Max Penet" . "m@qbits.cc") (:keywords "snippets"))])
|
||||
(clomacs . [(20201224 1358) ((emacs (24 3)) (cider (0 22 1)) (s (1 12 0)) (simple-httpd (1 4 6))) "Simplifies Emacs Lisp interaction with Clojure." single ((:commit . "ffcb122194507593815d67b26f5d2d8ffcc52bf8") (:authors ("Kostafey" . "kostafey@gmail.com")) (:maintainer "Kostafey" . "kostafey@gmail.com") (:keywords "clojure" "interaction") (:url . "https://github.com/clojure-emacs/clomacs"))])
|
||||
|
@ -527,7 +527,7 @@
|
|||
(cm-mode . [(20170203 2107) ((cl-lib (0 5))) "Minor mode for CriticMarkup" single ((:commit . "276d49c859822265070ae5dfbb403fd7d8d06436") (:authors ("Joost Kremers" . "joostkremers@fastmail.fm")) (:maintainer "Joost Kremers" . "joostkremers@fastmail.fm") (:keywords "text" "markdown"))])
|
||||
(cmake-font-lock . [(20210103 1558) ((cmake-mode (0 0))) "Advanced, type aware, highlight support for CMake" single ((:commit . "5e20ed32193c2c7ebae920a6a3cd711c8c950597") (:authors ("Anders Lindgren")) (:maintainer "Anders Lindgren") (:keywords "faces" "languages") (:url . "https://github.com/Lindydancer/cmake-font-lock"))])
|
||||
(cmake-ide . [(20201027 1947) ((emacs (24 4)) (cl-lib (0 5)) (seq (1 11)) (levenshtein (0)) (s (1 11 0))) "Calls CMake to find out include paths and other compiler flags" single ((:commit . "2330f91e51e6cf8a46ce595be3deb0feda223f75") (:authors ("Atila Neves" . "atila.neves@gmail.com")) (:maintainer "Atila Neves" . "atila.neves@gmail.com") (:keywords "languages") (:url . "http://github.com/atilaneves/cmake-ide"))])
|
||||
(cmake-mode . [(20210104 1831) ((emacs (24 1))) "major-mode for editing CMake sources" single ((:commit . "4bfe724e8149938031dde808610d369b1dc890ba"))])
|
||||
(cmake-mode . [(20210104 1831) ((emacs (24 1))) "major-mode for editing CMake sources" single ((:commit . "ff9e922902834a68d7872fa2d7476f28c865decd"))])
|
||||
(cmake-project . [(20171121 1115) nil "Integrates CMake build process with Emacs" single ((:commit . "a7cf9e4c01c4683e14b6942cc5cc5e8cddc98721") (:authors ("Alexander Lamaison" . "alexander.lamaison@gmail")) (:maintainer "Alexander Lamaison" . "alexander.lamaison@gmail") (:keywords "c" "cmake" "languages" "tools") (:url . "http://github.com/alamaison/emacs-cmake-project"))])
|
||||
(cmd-to-echo . [(20161203 2133) ((emacs (24 4)) (s (1 11 0)) (shell-split-string (20151224 208))) "Show the output of long-running commands in the echo area" single ((:commit . "e0e874fc0e1ad6d291e39ed76023445297ad438a") (:authors ("Tijs Mallaerts" . "tijs.mallaerts@gmail.com")) (:maintainer "Tijs Mallaerts" . "tijs.mallaerts@gmail.com"))])
|
||||
(cmm-mode . [(20150225 746) nil "Major mode for C-- source code" single ((:commit . "c3ad514dff3eb30434f6b20d953276d4c00de1ee"))])
|
||||
|
@ -657,8 +657,8 @@
|
|||
(conllu-mode . [(20200501 2328) ((emacs (25)) (cl-lib (0 5)) (flycheck (30)) (hydra (0 13 0)) (s (1 0))) "editing mode for CoNLL-U files" tar ((:commit . "0db3063572b0de08874822e20570bb153747e6ed") (:authors ("bruno cuconato" . "bcclaro+emacs@gmail.com")) (:maintainer "bruno cuconato" . "bcclaro+emacs@gmail.com") (:keywords "extensions") (:url . "https://github.com/odanoburu/conllu-mode"))])
|
||||
(connection . [(20191111 446) nil "TCP-based client connection" single ((:commit . "bdf0aa7761d1c1a3bc0652b2fdc4a54b3acdb06a") (:authors ("Torsten Hilbrich" . "torsten.hilbrich@gmx.net")) (:maintainer "Torsten Hilbrich" . "torsten.hilbrich@gmx.net") (:keywords "network"))])
|
||||
(constant-theme . [(20180921 1012) ((emacs (24 1))) "A calm, dark, almost monochrome color theme." tar ((:commit . "23543a09729569b566175abe1efbe774048d3fa8") (:authors ("Jannis Pohlmann" . "contact@jannispohlmann.de")) (:maintainer "Jannis Pohlmann" . "contact@jannispohlmann.de") (:keywords "themes") (:url . "https://github.com/jannis/emacs-constant-theme"))])
|
||||
(consult . [(20210413 1154) ((emacs (26 1))) "Consulting completing-read" tar ((:commit . "7cd2c4bf818c06e4c64a13186395fc39ab515adf") (:authors ("Daniel Mendler, Consult and Selectrum contributors")) (:maintainer "Daniel Mendler") (:url . "https://github.com/minad/consult"))])
|
||||
(consult-flycheck . [(20210410 1355) ((consult (0 6)) (flycheck (31)) (emacs (26 1))) "Provides the command `consult-flycheck'" single ((:commit . "7cd2c4bf818c06e4c64a13186395fc39ab515adf") (:authors ("Daniel Mendler, Consult and Selectrum contributors")) (:maintainer "Daniel Mendler") (:url . "https://github.com/minad/consult"))])
|
||||
(consult . [(20210414 1438) ((emacs (26 1))) "Consulting completing-read" tar ((:commit . "bd8fe1b2e78fdbb6f37b7ad6ad82830d9fdf6188") (:authors ("Daniel Mendler, Consult and Selectrum contributors")) (:maintainer "Daniel Mendler") (:url . "https://github.com/minad/consult"))])
|
||||
(consult-flycheck . [(20210410 1355) ((consult (0 6)) (flycheck (31)) (emacs (26 1))) "Provides the command `consult-flycheck'" single ((:commit . "bd8fe1b2e78fdbb6f37b7ad6ad82830d9fdf6188") (:authors ("Daniel Mendler, Consult and Selectrum contributors")) (:maintainer "Daniel Mendler") (:url . "https://github.com/minad/consult"))])
|
||||
(consult-notmuch . [(20210312 2201) ((emacs (26 1)) (consult (0 5)) (notmuch (0 21))) "Notmuch search using consult" single ((:commit . "67cf219fcce211237347a783ce6982402341d5fd") (:authors ("Jose A Ortega Ruiz" . "jao@gnu.org")) (:maintainer "Jose A Ortega Ruiz") (:keywords "mail") (:url . "https://codeberg.org/jao/consult-notmuch"))])
|
||||
(consult-recoll . [(20210411 1300) ((emacs (26 1)) (consult (0 5))) "Recoll queries using consult" single ((:commit . "9038cfa4222f428e28bdafa0aeb57362104a873d") (:authors ("Jose A Ortega Ruiz" . "jao@gnu.org")) (:maintainer "Jose A Ortega Ruiz") (:keywords "docs" "convenience") (:url . "https://codeberg.org/jao/consult-recoll"))])
|
||||
(consult-spotify . [(20210411 1305) ((emacs (26 1)) (consult (0 5)) (marginalia (0 3)) (espotify (0 1))) "Spotify queries using consult" single ((:commit . "22b81067ebcaef2cea633f967a4b55454af9326a") (:authors ("Jose A Ortega Ruiz" . "jao@gnu.org")) (:maintainer "Jose A Ortega Ruiz") (:keywords "multimedia") (:url . "https://codeberg.org/jao/espotify"))])
|
||||
|
@ -755,7 +755,7 @@
|
|||
(cycle-themes . [(20150403 309) ((cl-lib (0 5))) "A global minor mode to make switching themes easier" single ((:commit . "6e125d11fdbc6b78fc9f219eb2609a5e29815898") (:keywords "themes" "utility" "global minor mode") (:url . "http://github.com/toroidal-code/cycle-themes.el"))])
|
||||
(cyphejor . [(20210319 1423) ((emacs (24 4))) "Shorten major mode names using user-defined rules" single ((:commit . "cf580995f891e339a9485ba91d6cb81a2abd61e4") (:authors ("Mark Karpov" . "markkarpov92@gmail.com")) (:maintainer "Mark Karpov" . "markkarpov92@gmail.com") (:keywords "mode-line" "major-mode") (:url . "https://github.com/mrkkrp/cyphejor"))])
|
||||
(cypher-mode . [(20151110 1142) nil "major mode for editing cypher scripts" single ((:commit . "ce8543d7877c736c574a17b49874c9dcdc7a06d6") (:authors ("François-Xavier Bois <fxbois AT Google Mail Service>")) (:maintainer "François-Xavier Bois") (:keywords "cypher" "graph") (:url . "http://github.com/fxbois/cypher-mode"))])
|
||||
(cython-mode . [(20190111 2150) nil "Major mode for editing Cython files" single ((:commit . "6ba500e3deb4ce71bd7884fd7e219b37b837ea63"))])
|
||||
(cython-mode . [(20190111 2150) nil "Major mode for editing Cython files" single ((:commit . "9ae2e4e7b2d6b0dc07ee49d3299a212af3976993"))])
|
||||
(czech-holidays . [(20160113 1752) nil "Adds a list of Czech public holidays to Emacs calendar" single ((:commit . "d136fa09a152b3cd80db6d55c7b4ddfe07b90fbf") (:authors ("David Chkhikvadze" . "david.chk@outlook.com")) (:maintainer "David Chkhikvadze" . "david.chk@outlook.com") (:keywords "calendar"))])
|
||||
(d-mode . [(20210119 1853) ((emacs (25 1))) "D Programming Language major mode for (X)Emacs" single ((:commit . "199743df55c6bfce3cdb08405bd8519768c8dfa9") (:authors ("William Baxter")) (:maintainer "Russel Winder" . "russel@winder.org.uk") (:keywords "d" "programming" "language" "emacs" "cc-mode"))])
|
||||
(dactyl-mode . [(20140906 1725) nil "Major mode for editing Pentadactyl config files" single ((:commit . "cc55fe6b987271d9647492b8df4c812d884f661f") (:keywords "languages" "vim") (:url . "https://github.com/luxbock/dactyl-mode"))])
|
||||
|
@ -796,7 +796,7 @@
|
|||
(db . [(20140421 2111) ((kv (0 0 11))) "A database for EmacsLisp" single ((:commit . "b3a423fb8e72f9013009cbe033d654df2ce31438") (:authors ("Nic Ferrier" . "nferrier@ferrier.me.uk")) (:maintainer "Nic Ferrier" . "nferrier@ferrier.me.uk") (:keywords "data" "lisp"))])
|
||||
(db-pg . [(20130131 1902) ((pg (0 12)) (db (0 0 6))) "A PostgreSQL adapter for emacs-db" single ((:commit . "7d5ab86b74b05fe003b3b434d4835f37f3f3eded") (:authors ("Nic Ferrier" . "nic@ferrier.me.uk")) (:maintainer "Nic Ferrier" . "nic@ferrier.me.uk") (:keywords "data" "comm" "database" "postgresql"))])
|
||||
(dbc . [(20201001 1452) ((emacs (24 4)) (cl-lib (0 5)) (ht (2 3))) "Control how to open buffers" single ((:commit . "6728e72f72347d098b7d75ac4c29a7d687cc9ed3") (:authors ("Matsievskiy S.V.")) (:maintainer "Matsievskiy S.V.") (:keywords "convenience") (:url . "https://gitlab.com/matsievskiysv/display-buffer-control"))])
|
||||
(ddskk . [(20210112 2013) ((ccc (1 43)) (cdb (20141201 754))) "Simple Kana to Kanji conversion program." tar ((:commit . "a266f70eb99ffb657b7821c2e1de49f5184a59ed"))])
|
||||
(ddskk . [(20210112 2013) ((ccc (1 43)) (cdb (20141201 754))) "Simple Kana to Kanji conversion program." tar ((:commit . "6ed518435be2d8c6fe3cfb421f046c0f084dde9e"))])
|
||||
(ddskk-posframe . [(20200812 917) ((emacs (26 1)) (posframe (0 4 3)) (ddskk (16 2 50))) "Show Henkan tooltip for ddskk via posframe" single ((:commit . "299493dd951e5a0b43b8213321e3dc0bac10f762") (:authors ("Naoya Yamashita" . "conao3@gmail.com")) (:maintainer "Naoya Yamashita" . "conao3@gmail.com") (:keywords "tooltip" "convenience" "posframe") (:url . "https://github.com/conao3/ddskk-posframe.el"))])
|
||||
(deadgrep . [(20210219 748) ((emacs (25 1)) (dash (2 12 0)) (s (1 11 0)) (spinner (1 7 3))) "fast, friendly searching with ripgrep" single ((:commit . "ca16c37ffa5caa5f698bc049012489a2e3071bcc") (:authors ("Wilfred Hughes" . "me@wilfred.me.uk")) (:maintainer "Wilfred Hughes" . "me@wilfred.me.uk") (:keywords "tools") (:url . "https://github.com/Wilfred/deadgrep"))])
|
||||
(debian-el . [(20201011 1543) nil "Emacs helpers specific to Debian users" tar ((:commit . "4fd5547a54ee931f4a16adde1d3b52bf01ce045a"))])
|
||||
|
@ -974,7 +974,7 @@
|
|||
(dumb-diff . [(20171211 2122) ((emacs (24 3))) "fast arbitrary diffs" single ((:commit . "1a2331d283049b71a07c1b06b1e0627a950d55f4") (:authors ("jack angers")) (:maintainer "jack angers") (:keywords "programming" "diff"))])
|
||||
(dumb-jump . [(20210303 1714) ((emacs (24 3)) (s (1 11 0)) (dash (2 9 0)) (popup (0 5 3))) "Jump to definition for 50+ languages without configuration" single ((:commit . "8bc195000e17ce6c72755a8fb55ca0fcd36add76") (:authors ("jack angers and contributors")) (:maintainer "jack angers and contributors") (:keywords "programming") (:url . "https://github.com/jacktasia/dumb-jump"))])
|
||||
(dummyparens . [(20141009 1024) nil "parenthesis auto-pairing and wrapping" single ((:commit . "9798ef1d0eaa24e4fe66f8aa6022a8c62714cc89") (:authors ("Sergei Nosov <sergei.nosov [at] gmail.com>")) (:maintainer "Sergei Nosov <sergei.nosov [at] gmail.com>") (:keywords "dummyparens" "auto-pair" "wrapping") (:url . "https://github.com/snosov1/dummyparens"))])
|
||||
(dune . [(20210213 757) nil "Integration with the dune build system" tar ((:commit . "f7b56d6e79e96dbfb06120809d17c2ee68289b50") (:url . "https://github.com/ocaml/dune"))])
|
||||
(dune . [(20210213 757) nil "Integration with the dune build system" tar ((:commit . "c48b9975feb9609dcadd0818f754cab7d67d1ee3") (:url . "https://github.com/ocaml/dune"))])
|
||||
(dune-format . [(20210411 2348) ((reformatter (0 6)) (emacs (24 1))) "Reformat OCaml's dune files automatically" single ((:commit . "22af9fcf75eea577a39fc315fd9bcaa709fb4e1c") (:authors ("Steve Purcell" . "steve@sanityinc.com")) (:maintainer "Steve Purcell" . "steve@sanityinc.com") (:keywords "languages") (:url . "https://github.com/purcell/dune-format-el"))])
|
||||
(duplicate-thing . [(20181031 1500) nil "Duplicate current line & selection" single ((:commit . "9d8fd05e3e5caa35d3f2a0c0032c92f0c0908e21") (:authors ("ongaeshi")) (:maintainer "ongaeshi") (:keywords "convenience" "command" "duplicate" "line" "selection") (:url . "https://github.com/ongaeshi/duplicate-thing"))])
|
||||
(dut-mode . [(20170729 2111) ((emacs (24))) "Major mode for the Dut programming language" single ((:commit . "9235c7acaa6690942e9de8b7acd1e4be0c859dc1") (:authors ("The dut-mode Authors")) (:maintainer "The dut-mode Authors") (:keywords "languages" "gut") (:url . "https://github.com/dut-lang/dut-mode"))])
|
||||
|
@ -1039,7 +1039,7 @@
|
|||
(egg . [(20181126 500) nil "Emacs Got Git - Emacs interface to Git" tar ((:commit . "00e768a78ac3d25f457eed667d02cac568480bf9") (:authors ("Bogolisk" . "bogolisk@gmail.com")) (:maintainer "Bogolisk" . "bogolisk@gmail.com") (:keywords "git" "version control" "release management"))])
|
||||
(egg-timer . [(20200217 1650) ((emacs (25 1))) "Commonly used intervals for setting timers while working" single ((:commit . "e3542aeb80905956b94373a222a9cbac04e6497e") (:authors ("William Carroll" . "wpcarro@gmail.com")) (:maintainer "William Carroll" . "wpcarro@gmail.com") (:url . "https://github.com/wpcarro/egg-timer.el"))])
|
||||
(egison-mode . [(20200107 2333) nil "Egison editing mode" tar ((:commit . "df4e47f7c8adfe90d9bf408459772a6cb4e71b70") (:authors ("Satoshi Egi" . "egisatoshi@gmail.com")) (:maintainer "Satoshi Egi" . "egisatoshi@gmail.com") (:url . "https://github.com/egisatoshi/egison3/blob/master/elisp/egison-mode.el"))])
|
||||
(eglot . [(20210413 21) ((emacs (26 1)) (jsonrpc (1 0 14)) (flymake (1 0 9)) (project (0 3 0)) (xref (1 0 1)) (eldoc (1 11 0))) "Client for Language Server Protocol (LSP) servers" single ((:commit . "05fe6472cb1766e4dafae7562b8793d96d0bb271") (:authors ("João Távora" . "joaotavora@gmail.com")) (:maintainer "João Távora" . "joaotavora@gmail.com") (:keywords "convenience" "languages") (:url . "https://github.com/joaotavora/eglot"))])
|
||||
(eglot . [(20210413 21) ((emacs (26 1)) (jsonrpc (1 0 14)) (flymake (1 0 9)) (project (0 3 0)) (xref (1 0 1)) (eldoc (1 11 0))) "Client for Language Server Protocol (LSP) servers" single ((:commit . "fc221c8b8af33363a6a8d1e07950dc01555f6c9b") (:authors ("João Távora" . "joaotavora@gmail.com")) (:maintainer "João Távora" . "joaotavora@gmail.com") (:keywords "convenience" "languages") (:url . "https://github.com/joaotavora/eglot"))])
|
||||
(eglot-fsharp . [(20210330 1442) ((emacs (26 3)) (eglot (1 4)) (fsharp-mode (1 10)) (jsonrpc (1 0 14))) "fsharp-mode eglot integration" single ((:commit . "93b1fbc31d73286a18640a36fc2be87d1736e0f2") (:authors ("Jürgen Hötzel" . "juergen@archlinux.org")) (:maintainer "Jürgen Hötzel" . "juergen@archlinux.org") (:keywords "languages") (:url . "https://github.com/fsharp/emacs-fsharp-mode"))])
|
||||
(eglot-jl . [(20200726 741) ((emacs (25 1)) (eglot (1 4)) (julia-mode (0 3))) "Julia support for eglot" tar ((:commit . "84cff9d6ef1643f3eac6c9d620cc1e380a9847d9") (:authors ("Adam Beckmeyer" . "adam_git@thebeckmeyers.xyz")) (:maintainer "Adam Beckmeyer" . "adam_git@thebeckmeyers.xyz") (:keywords "convenience" "languages") (:url . "https://github.com/non-Jedi/eglot-jl"))])
|
||||
(ego . [(20200803 1101) ((emacs (24 5)) (ht (1 5)) (mustache (0 22)) (htmlize (1 47)) (org (8 0)) (dash (2 0 0))) "a static site generator based on org mode, forked from org-page." tar ((:commit . "211c4cb2af2582849d9df984fb2346deecaf79be") (:authors ("Feng Shu <tumashu AT 163.com>") ("Kelvin Hu <ini DOT kelvin AT gmail DOT com>") ("Kuangdash <kuangdash AT 163.com>")) (:maintainer "Feng Shu <tumashu AT 163.com>") (:keywords "org-mode" "convenience" "beautify") (:url . "https://github.com/emacs-china/EGO"))])
|
||||
|
@ -1066,7 +1066,7 @@
|
|||
(el2org . [(20200408 146) ((emacs (25 1))) "Convert elisp file to org file" single ((:commit . "7db77fdd73f378d4e60e34c11bbdf00677adc32c") (:authors ("Feng Shu " . "tumashu@163.com")) (:maintainer "Feng Shu " . "tumashu@163.com") (:keywords "convenience") (:url . "https://github.com/tumashu/el2org"))])
|
||||
(elbank . [(20180316 1343) ((emacs (25)) (seq (2 16))) "Personal finances reporting application" tar ((:commit . "fa9bc7dec0a8fd489e90b9f178719344cc8d315a") (:authors ("Nicolas Petton" . "nicolas@petton.fr")) (:maintainer "Nicolas Petton" . "nicolas@petton.fr") (:keywords "tools" "personal-finances"))])
|
||||
(elcontext . [(20210109 1238) ((ht (2 3)) (hydra (0 14 0)) (emacs (24 3)) (f (0 20 0)) (osx-location (0 4)) (uuidgen (0 3))) "Create context specific actions" tar ((:commit . "2efd3dd8c5176c4f071bb048be6cb069b05d6e9e") (:authors ("Thomas Sojka")) (:maintainer "Thomas Sojka") (:keywords "calendar" "convenience") (:url . "https://github.com/rollacaster/elcontext"))])
|
||||
(elcord . [(20210323 2234) ((emacs (25 1))) "Allows you to integrate Rich Presence from Discord" tar ((:commit . "25531186c10b74a10ee24990f9e967296cc70342") (:authors ("heatingdevice") ("Wilfredo Velázquez-Rodríguez" . "zulu.inuoe@gmail.com")) (:maintainer "heatingdevice") (:keywords "games") (:url . "https://github.com/Mstrodl/elcord"))])
|
||||
(elcord . [(20210413 2040) ((emacs (25 1))) "Allows you to integrate Rich Presence from Discord" tar ((:commit . "b25f9a9f6f2263f3cff5893e9733cc9ec1d6c1dc") (:authors ("heatingdevice") ("Wilfredo Velázquez-Rodríguez" . "zulu.inuoe@gmail.com")) (:maintainer "heatingdevice") (:keywords "games") (:url . "https://github.com/Mstrodl/elcord"))])
|
||||
(elcouch . [(20201108 955) ((emacs (25 1)) (json-mode (1 0 0)) (libelcouch (0 11 0)) (navigel (0 3 0))) "View and manipulate CouchDB databases" single ((:commit . "3d162dda14411349e12509029d2b621c5d1edea2") (:authors ("Damien Cassou" . "damien@cassou.me")) (:maintainer "Damien Cassou" . "damien@cassou.me") (:keywords "data" "tools") (:url . "https://gitlab.petton.fr/DamienCassou/elcouch"))])
|
||||
(eldev . [(20210410 1721) ((emacs (24 4))) "Elisp Development Tool" tar ((:commit . "635744890ba2d55d9569a66cb72b13870418a513") (:authors ("Paul Pogonyshev" . "pogonyshev@gmail.com")) (:maintainer "Paul Pogonyshev" . "pogonyshev@gmail.com") (:keywords "maint" "tools") (:url . "https://github.com/doublep/eldev"))])
|
||||
(eldoc-box . [(20210402 2039) ((emacs (26 1))) "Display documentation in childframe" single ((:commit . "f66f8d0641a0025d65da1ec21141ea594d6883da") (:authors ("Sebastien Chapuis" . "sebastien@chapu.is")) (:maintainer "Yuan Fu" . "casouri@gmail.com") (:url . "https://github.com/casouri/eldoc-box"))])
|
||||
|
@ -1085,7 +1085,7 @@
|
|||
(elfeed-dashboard . [(20201218 347) ((emacs (25 1)) (elfeed (3 3 0))) "An extensible frontend for elfeed using org-mode" single ((:commit . "9e8e212da9ea471bdc58bc0a1f5932833029bb38") (:authors ("Manoj Kumar Manikchand" . "manojm321@protonmail.com")) (:maintainer "Manoj Kumar Manikchand" . "manojm321@protonmail.com") (:keywords "convenience") (:url . "https://github.com/Manoj321/elfeed-dashboard"))])
|
||||
(elfeed-goodies . [(20190128 1631) ((popwin (1 0 0)) (powerline (2 2)) (elfeed (2 0 0)) (cl-lib (0 5)) (noflet (0 0 10)) (ace-jump-mode (2 0))) "Elfeed goodies" tar ((:commit . "95b4ea632fbd5960927952ec8f3394eb88da4752") (:authors ("Gergely Nagy")) (:maintainer "Gergely Nagy") (:url . "https://github.com/algernon/elfeed-goodies"))])
|
||||
(elfeed-org . [(20181015 1100) ((elfeed (1 1 1)) (org (8 2 7)) (dash (2 10 0)) (s (1 9 0)) (cl-lib (0 5))) "Configure elfeed with one or more org-mode files" single ((:commit . "77b6bbf222487809813de260447d31c4c59902c9") (:authors ("Remy Honig" . "remyhonig@gmail.com")) (:maintainer "Remy Honig" . "remyhonig@gmail.com") (:keywords "news") (:url . "https://github.com/remyhonig/elfeed-org"))])
|
||||
(elfeed-protocol . [(20210401 100) ((emacs (24 4)) (elfeed (2 1 1)) (cl-lib (0 5))) "Provide fever/newsblur/owncloud/ttrss protocols for elfeed" tar ((:commit . "2b2aaf2f3b92e7c27827e0f280598cb52db558e0") (:authors ("Xu Fasheng <fasheng[AT]fasheng.info>")) (:maintainer "Xu Fasheng <fasheng[AT]fasheng.info>") (:keywords "news") (:url . "https://github.com/fasheng/elfeed-protocol"))])
|
||||
(elfeed-protocol . [(20210401 100) ((emacs (24 4)) (elfeed (2 1 1)) (cl-lib (0 5))) "Provide fever/newsblur/owncloud/ttrss protocols for elfeed" tar ((:commit . "2b9084c6ca55b60c70c6c84e79e1bf4b4c2ae1c6") (:authors ("Xu Fasheng <fasheng[AT]fasheng.info>")) (:maintainer "Xu Fasheng <fasheng[AT]fasheng.info>") (:keywords "news") (:url . "https://github.com/fasheng/elfeed-protocol"))])
|
||||
(elfeed-score . [(20210302 2051) ((emacs (26 1)) (elfeed (3 3 0))) "Gnus-style scoring for Elfeed" tar ((:commit . "f59cbc38c83007e160722347c8cb5438d5fe13a0") (:authors ("Michael Herstine" . "sp1ff@pobox.com")) (:maintainer "Michael Herstine" . "sp1ff@pobox.com") (:keywords "news") (:url . "https://github.com/sp1ff/elfeed-score"))])
|
||||
(elfeed-web . [(20210226 258) ((simple-httpd (1 5 1)) (elfeed (3 2 0)) (emacs (24 3))) "web interface to Elfeed" tar ((:commit . "e29c8b91450bd42d90041231f769c4e5fe5070da") (:authors ("Christopher Wellons" . "wellons@nullprogram.com")) (:maintainer "Christopher Wellons" . "wellons@nullprogram.com") (:url . "https://github.com/skeeto/elfeed"))])
|
||||
(elgrep . [(20210205 733) ((emacs (26 2)) (async (1 5))) "Searching files for regular expressions" single ((:commit . "b627cc0f307161e580e9450ad5334687b9406a16") (:authors ("Tobias Zawada" . "i@tn-home.de")) (:maintainer "Tobias Zawada" . "i@tn-home.de") (:keywords "tools" "matching" "files" "unix") (:url . "https://github.com/TobiasZawada/elgrep"))])
|
||||
|
@ -1116,7 +1116,7 @@
|
|||
(elpa-audit . [(20141023 1331) nil "Handy functions for inspecting and comparing package archives" single ((:commit . "727da50e626977351aff2675b6540a36818bbbe6") (:authors ("Steve Purcell" . "steve@sanityinc.com")) (:maintainer "Steve Purcell" . "steve@sanityinc.com") (:keywords "maint") (:url . "https://github.com/purcell/elpa-audit"))])
|
||||
(elpa-clone . [(20191006 1953) ((emacs (24 4)) (cl-lib (0))) "Clone ELPA archive" single ((:commit . "827e2723b123618aaa32642d78c447cf2979a00a") (:authors ("ZHANG Weiyi" . "dochang@gmail.com")) (:maintainer "ZHANG Weiyi" . "dochang@gmail.com") (:keywords "comm" "elpa" "clone" "mirror") (:url . "https://github.com/dochang/elpa-clone"))])
|
||||
(elpa-deploy . [(20191022 718) ((emacs (24 4)) (f (0 0))) "ELPA deployment library" single ((:commit . "f5126a2da1e0e52981fad9c12028814be80328c2") (:authors ("Bruno Félix Rezende Ribeiro" . "oitofelix@gnu.org")) (:maintainer "Bruno Félix Rezende Ribeiro" . "oitofelix@gnu.org") (:keywords "tools") (:url . "https://github.com/oitofelix/elpa-deploy"))])
|
||||
(elpa-mirror . [(20210413 1053) ((emacs (25 1))) "Create local package repository from installed packages" single ((:commit . "ea868b52699535eb79c72a8308c2b7ffbfbc697f") (:authors ("Chen Bin" . "chenbin.sh@gmail.com")) (:maintainer "Chen Bin" . "chenbin.sh@gmail.com") (:keywords "tools") (:url . "http://github.com/redguardtoo/elpa-mirror"))])
|
||||
(elpa-mirror . [(20210414 208) ((emacs (25 1))) "Create local package repository from installed packages" single ((:commit . "944c79d654739ae83c8003b2b483e393589eee3f") (:authors ("Chen Bin" . "chenbin.sh@gmail.com")) (:maintainer "Chen Bin" . "chenbin.sh@gmail.com") (:keywords "tools") (:url . "http://github.com/redguardtoo/elpa-mirror"))])
|
||||
(elpher . [(20200919 1025) ((emacs (26 2))) "A friendly gopher and gemini client" tar ((:commit . "3561c2815bc6bc896fc7a6da8f094edca48c55b8") (:authors ("Tim Vaughan" . "plugd@thelambdalab.xyz")) (:maintainer "Tim Vaughan" . "plugd@thelambdalab.xyz") (:keywords "comm" "gopher") (:url . "http://thelambdalab.xyz/elpher"))])
|
||||
(elpl . [(20200821 1052) ((emacs (24 4))) "Emacs Lisp REPL" single ((:commit . "ca6a6237681c641d5137d58e52f884dec0da6349") (:authors ("Gong Qijian" . "gongqijian@gmail.com")) (:maintainer "Gong Qijian" . "gongqijian@gmail.com") (:keywords "lisp" "tool") (:url . "https://github.com/twlz0ne/elpl"))])
|
||||
(elpy . [(20210328 1852) ((company (0 9 2)) (emacs (24 4)) (highlight-indentation (0 5 0)) (pyvenv (1 3)) (yasnippet (0 8 0)) (s (1 11 0))) "Emacs Python Development Environment" tar ((:commit . "2203597e1254eba345d6873daa40c7b9d144931c") (:authors ("Jorgen Schaefer <contact@jorgenschaefer.de>, Gaby Launay" . "gaby.launay@protonmail.com")) (:maintainer "Jorgen Schaefer <contact@jorgenschaefer.de>, Gaby Launay" . "gaby.launay@protonmail.com") (:keywords "python" "ide" "languages" "tools") (:url . "https://github.com/jorgenschaefer/elpy"))])
|
||||
|
@ -1153,7 +1153,7 @@
|
|||
(emidje . [(20190209 1726) ((emacs (25)) (cider (0 17 0)) (seq (2 16)) (magit-popup (2 4 0))) "Test runner and report viewer for Midje" single ((:commit . "7e92f053964d925c97dc8cca8d4d70a3030021db") (:authors ("Alan Ghelardi" . "alan.ghelardi@nubank.com.br")) (:maintainer "Alan Ghelardi" . "alan.ghelardi@nubank.com.br") (:keywords "tools") (:url . "https://github.com/nubank/emidje"))])
|
||||
(emlib . [(20161126 1523) ((dash (2 13 0)) (cl-lib (0 5))) "A Machine Learning library for Emacs" tar ((:commit . "dea2af00f551ea580c641d86dd69219f7d4f3685") (:authors ("Narendra Joshi" . "narendraj9@gmail.com")) (:maintainer "Narendra Joshi" . "narendraj9@gmail.com") (:keywords "data" "ai" "neural networks" "ml") (:url . "https://github.com/narendraj9/emlib.git"))])
|
||||
(emmet-mode . [(20180613 341) nil "Unofficial Emmet's support for emacs" single ((:commit . "1acb821e0142136344ccf40c1e5fb664d7db2e70") (:authors ("Shin Aoyama" . "smihica@gmail.com")) (:maintainer "Shin Aoyama" . "smihica@gmail.com") (:keywords "convenience") (:url . "https://github.com/smihica/emmet-mode"))])
|
||||
(emms . [(20210407 1604) ((cl-lib (0 5)) (seq (0))) "The Emacs Multimedia System" tar ((:commit . "f79343bf03f6ece09638ec27eeb831c0abe59667") (:authors ("Jorgen Schäfer" . "forcer@forcix.cx")) (:maintainer "Yoni Rabkin" . "yrk@gnu.org") (:keywords "emms" "mp3" "ogg" "flac" "music" "mpeg" "video" "multimedia") (:url . "https://www.gnu.org/software/emms/"))])
|
||||
(emms . [(20210414 1359) ((cl-lib (0 5)) (seq (0))) "The Emacs Multimedia System" tar ((:commit . "5b1cfb12b49390328f68f351ab677c27c5c3e980") (:authors ("Jorgen Schäfer" . "forcer@forcix.cx")) (:maintainer "Yoni Rabkin" . "yrk@gnu.org") (:keywords "emms" "mp3" "ogg" "flac" "music" "mpeg" "video" "multimedia") (:url . "https://www.gnu.org/software/emms/"))])
|
||||
(emms-bilibili . [(20180103 418) ((emacs (25)) (cl-lib (0 5))) "Play Bilibili in EMMS." single ((:commit . "294bca3dfc42fe3a55fb326ab39bc0fcfc8c5090") (:keywords "emms" "bilibili") (:url . "https://github.com/stardiviner/emms-bilibili"))])
|
||||
(emms-info-mediainfo . [(20131223 1300) ((emms (0))) "Info-method for EMMS using medianfo" single ((:commit . "bce16eae9eacd38719fea62a9755225a888da59d") (:authors ("Fabián Ezequiel Gallina" . "fgallina@gnu.org")) (:maintainer "Fabián Ezequiel Gallina" . "fgallina@gnu.org") (:keywords "multimedia" "processes"))])
|
||||
(emms-mark-ext . [(20130529 327) ((emms (3 0))) "Extra functions for emms-mark-mode and emms-tag-edit-mode" single ((:commit . "ec68129e3e9e469e5bf160c6a1b7030e322f3541") (:authors ("Joe Bloggs" . "vapniks@yahoo.com")) (:maintainer "Joe Bloggs" . "vapniks@yahoo.com") (:keywords "convenience" "multimedia") (:url . "https://github.com/vapniks/emms-mark-ext"))])
|
||||
|
@ -1215,8 +1215,8 @@
|
|||
(erefactor . [(20200513 1252) ((cl-lib (0 3))) "Emacs-Lisp refactoring utilities" single ((:commit . "bfe27a1b8c7cac0fe054e76113e941efa3775fe8") (:authors ("Masahiro Hayashi" . "mhayashi1120@gmail.com")) (:maintainer "Masahiro Hayashi" . "mhayashi1120@gmail.com") (:keywords "extensions" "tools" "maint") (:url . "https://github.com/mhayashi1120/Emacs-erefactor"))])
|
||||
(ergoemacs-mode . [(20210402 1642) ((emacs (24 1)) (undo-tree (0 6 5)) (cl-lib (0 5))) "Emacs mode based on common modern interface and ergonomics." tar ((:commit . "f9d6e3f7d99b877a63fa6f5ab61e6ba05a7075c8") (:authors ("Xah Lee" . "xah@xahlee.org") ("David Capello" . "davidcapello@gmail.com") ("Matthew L. Fidler" . "matthew.fidler@gmail.com")) (:maintainer "Matthew L. Fidler" . "matthew.fidler@gmail.com") (:keywords "convenience") (:url . "https://github.com/ergoemacs/ergoemacs-mode"))])
|
||||
(ergoemacs-status . [(20160318 538) ((powerline (2 3)) (mode-icons (0 1 0))) "Adaptive Status Bar / Mode Line" single ((:commit . "d952cc2361adf6eb4d6af60950ad4ab699c81320") (:authors ("Matthew Fidler")) (:maintainer "Matthew Fidler"))])
|
||||
(eri . [(20200914 644) nil "Enhanced relative indentation (eri)" single ((:commit . "2bf7d55728e3b76d38d05b1c190e55ea57d1407b") (:url . "https://github.com/agda/agda"))])
|
||||
(erlang . [(20210315 1640) ((emacs (24 1))) "Erlang major mode" tar ((:commit . "9a96a3ab9342ccfa5b8a58ce4ea6adb8e32d0f4c") (:authors ("Anders Lindgren")) (:maintainer "Anders Lindgren") (:keywords "erlang" "languages" "processes"))])
|
||||
(eri . [(20200914 644) nil "Enhanced relative indentation (eri)" single ((:commit . "b96a2b99abb7979a644a6aa6738d650afa20c947") (:url . "https://github.com/agda/agda"))])
|
||||
(erlang . [(20210315 1640) ((emacs (24 1))) "Erlang major mode" tar ((:commit . "23a5b5aaa78e626d5c0e2b0e641537ad72fabd94") (:authors ("Anders Lindgren")) (:maintainer "Anders Lindgren") (:keywords "erlang" "languages" "processes"))])
|
||||
(erlstack-mode . [(20210412 917) ((emacs (25 1)) (dash (2 12 0))) "Minor mode for analysing Erlang stacktraces" single ((:commit . "003ce5c2f41ef3e692aabdd0c73c4ec8889baef0") (:authors ("k32")) (:maintainer "k32") (:keywords "tools" "erlang") (:url . "https://github.com/k32/erlstack-mode"))])
|
||||
(eros . [(20180415 618) ((emacs (24 4))) "Evaluation Result OverlayS for Emacs Lisp" single ((:commit . "dd8910279226259e100dab798b073a52f9b4233a") (:authors ("Tianxiang Xiong" . "tianxiang.xiong@gmail.com")) (:maintainer "Tianxiang Xiong" . "tianxiang.xiong@gmail.com") (:keywords "convenience" "lisp") (:url . "https://github.com/xiongtx/eros"))])
|
||||
(ert-async . [(20200105 1031) ((emacs (24 1))) "Async support for ERT" single ((:commit . "948cf2faa10e085bda3739034ca5ea1912893433") (:authors ("Johan Andersson" . "johan.rejeep@gmail.com")) (:maintainer "Johan Andersson" . "johan.rejeep@gmail.com") (:keywords "lisp" "test") (:url . "http://github.com/rejeep/ert-async.el"))])
|
||||
|
@ -1283,7 +1283,7 @@
|
|||
(evil-cleverparens . [(20170718 413) ((evil (1 0)) (paredit (1)) (smartparens (1 6 1)) (emacs (24 4)) (dash (2 12 0))) "Evil friendly minor-mode for editing lisp." tar ((:commit . "8c45879d49bfa6d4e414b6c1df700a4a51cbb869") (:authors ("Olli Piepponen" . "opieppo@gmail.com")) (:maintainer "Olli Piepponen" . "opieppo@gmail.com") (:keywords "cleverparens" "parentheses" "evil" "paredit" "smartparens") (:url . "https://github.com/luxbock/evil-cleverparens"))])
|
||||
(evil-colemak-basics . [(20200630 1936) ((emacs (24 3)) (evil (1 2 12)) (evil-snipe (2 0 3))) "Basic Colemak key bindings for evil-mode" single ((:commit . "584f8f9496bf5250a439c9c9fee1d94f3b4883f0") (:authors ("Wouter Bolsterlee" . "wouter@bolsterl.ee")) (:maintainer "Wouter Bolsterlee" . "wouter@bolsterl.ee") (:keywords "convenience" "emulations" "colemak" "evil") (:url . "https://github.com/wbolster/evil-colemak-basics"))])
|
||||
(evil-colemak-minimal . [(20171006 1317) ((emacs (24)) (evil (1 2 12))) "Minimal Colemak key bindings for evil-mode" single ((:commit . "6d98b6da60f414524a0d718f76024c26dce742b3") (:authors ("Bryan Allred" . "bryan@revolvingcow.com")) (:maintainer "Bryan Allred" . "bryan@revolvingcow.com") (:keywords "colemak" "evil") (:url . "https://github.com/bmallred/evil-colemak-minimal"))])
|
||||
(evil-collection . [(20210401 1012) ((emacs (25 1)) (evil (1 2 13)) (annalist (1 0))) "A set of keybindings for Evil mode" tar ((:commit . "f2be91297029ae002d15e23510f9f686d848d7a8") (:authors ("James Nguyen" . "james@jojojames.com")) (:maintainer "James Nguyen" . "james@jojojames.com") (:keywords "evil" "tools") (:url . "https://github.com/emacs-evil/evil-collection"))])
|
||||
(evil-collection . [(20210414 1155) ((emacs (25 1)) (evil (1 2 13)) (annalist (1 0))) "A set of keybindings for Evil mode" tar ((:commit . "b6025cf9eaf7b4659db918548fd6d96ed17fddc6") (:authors ("James Nguyen" . "james@jojojames.com")) (:maintainer "James Nguyen" . "james@jojojames.com") (:keywords "evil" "tools") (:url . "https://github.com/emacs-evil/evil-collection"))])
|
||||
(evil-commentary . [(20210210 1702) ((evil (1 0 0))) "Comment stuff out. A port of vim-commentary." tar ((:commit . "2dab6ac34d1617971768ad219d73af48f7473fec") (:authors ("Quang Linh LE" . "linktohack@gmail.com")) (:maintainer "Quang Linh LE" . "linktohack@gmail.com") (:keywords "evil" "comment" "commentary" "evil-commentary") (:url . "http://github.com/linktohack/evil-commentary"))])
|
||||
(evil-dvorak . [(20160416 1841) ((evil (1 0 8))) "evil keybindings for that work with dvorak mode" tar ((:commit . "824f7c56980d72a0ff04c662223540cd66f13754") (:authors ("Joshua Branson")) (:maintainer "Joshua Branson") (:keywords "dvorak" "evil" "vim"))])
|
||||
(evil-easymotion . [(20200424 135) ((emacs (24)) (avy (0 3 0)) (cl-lib (0 5))) "A port of vim's easymotion to emacs" single ((:commit . "f96c2ed38ddc07908db7c3c11bcd6285a3e8c2e9") (:authors ("PythonNut" . "pythonnut@pythonnut.com")) (:maintainer "PythonNut" . "pythonnut@pythonnut.com") (:keywords "convenience" "evil") (:url . "https://github.com/pythonnut/evil-easymotion"))])
|
||||
|
@ -1427,7 +1427,7 @@
|
|||
(finalize . [(20170418 1945) ((emacs (24 1)) (cl-generic (0 3)) (cl-lib (0 3)) (eieio (1 4))) "finalizers for Emacs Lisp" tar ((:commit . "846731531e7d1d80451787992e07bfe7dedbe9ff") (:authors ("Christopher Wellons" . "wellons@nullprogram.com")) (:maintainer "Christopher Wellons" . "wellons@nullprogram.com") (:url . "https://github.com/skeeto/elisp-finalize"))])
|
||||
(find-by-pinyin-dired . [(20180210 218) ((pinyinlib (0 1 0))) "Find file by first PinYin character of Chinese Hanzi" single ((:commit . "3b4781148dddc84a701ad76c0934ed991ecd59d5") (:authors ("Chen Bin" . "chenbin.sh@gmail.com")) (:maintainer "Chen Bin" . "chenbin.sh@gmail.com") (:keywords "hanzi" "chinese" "dired" "find" "file" "pinyin") (:url . "http://github.com/redguardtoo/find-by-pinyin-dired"))])
|
||||
(find-dupes-dired . [(20210204 49) ((emacs (26 1))) "Find dupes and handle in dired" single ((:commit . "3c9783589e43717b682c9e37dd229839735402e8") (:authors ("Shuguang Sun" . "shuguang79@qq.com")) (:maintainer "Shuguang Sun" . "shuguang79@qq.com") (:keywords "tools") (:url . "https://github.com/ShuguangSun/find-dupes-dired"))])
|
||||
(find-file-in-project . [(20210323 118) ((emacs (25 1))) "Find file/directory and review Diff/Patch/Commit efficiently everywhere" single ((:commit . "595c6ac9d5e5b2dc138b472a40bc85c7f20a56c0") (:authors ("Phil Hagelberg, Doug Alcorn, and Will Farrington")) (:maintainer "Chen Bin" . "chenbin.sh@gmail.com") (:keywords "project" "convenience") (:url . "https://github.com/technomancy/find-file-in-project"))])
|
||||
(find-file-in-project . [(20210413 1305) ((emacs (25 1))) "Find file/directory and review Diff/Patch/Commit efficiently everywhere" single ((:commit . "cb5f3d1b697ef8212cc276c7486cbce2bf6c2a02") (:authors ("Phil Hagelberg, Doug Alcorn, and Will Farrington")) (:maintainer "Chen Bin" . "chenbin.sh@gmail.com") (:keywords "project" "convenience") (:url . "https://github.com/technomancy/find-file-in-project"))])
|
||||
(find-file-in-repository . [(20210301 2202) nil "Quickly find files in a git, mercurial or other repository" single ((:commit . "10f5bd919ce35691addc5ce0d281597a46813a79") (:authors ("Samuel Hoffstaetter" . "samuel@hoffstaetter.com")) (:maintainer "Samuel Hoffstaetter" . "samuel@hoffstaetter.com") (:keywords "files" "convenience" "repository" "project" "source control") (:url . "https://github.com/hoffstaetter/find-file-in-repository"))])
|
||||
(find-file-rg . [(20200827 704) ((emacs (25 1))) "Find file in project using ripgrep" single ((:commit . "ed556e092a92e325f335554ab193cef2d8fec009") (:authors ("Andrii Kolomoiets" . "andreyk.mad@gmail.com")) (:maintainer "Andrii Kolomoiets" . "andreyk.mad@gmail.com") (:keywords "tools") (:url . "https://github.com/muffinmad/emacs-find-file-rg"))])
|
||||
(find-temp-file . [(20200117 2254) nil "Open quickly a temporary file" single ((:commit . "2bfcdba0d6a8a0e6faa080cb04ff0f7ed06491ba") (:authors ("Sylvain Rousseau <thisirs at gmail dot com>")) (:maintainer "Sylvain Rousseau <thisirs at gmail dot com>") (:keywords "convenience") (:url . "https://github.com/thisirs/find-temp-file.git"))])
|
||||
|
@ -1651,7 +1651,7 @@
|
|||
(foreign-regexp . [(20200325 50) nil "search and replace by foreign regexp." tar ((:commit . "e2dd47f2160cadc194eb156e7c76c3c869e6706e") (:authors ("K-talo Miyazaki <Keitaro dot Miyazaki at gmail dot com>")) (:maintainer "K-talo Miyazaki <Keitaro dot Miyazaki at gmail dot com>") (:keywords "convenience" "emulations" "matching" "tools" "unix" "wp"))])
|
||||
(foreman-mode . [(20170725 1422) ((s (1 9 0)) (dash (2 10 0)) (dash-functional (1 2 0)) (f (0 17 2)) (emacs (24))) "View and manage Procfile-based applications" single ((:commit . "22b3bb13134b617870ed1e888af739f4818be929") (:authors ("ZHOU Feng" . "zf.pascal@gmail.com")) (:maintainer "ZHOU Feng" . "zf.pascal@gmail.com") (:keywords "foreman") (:url . "http://github.com/zweifisch/foreman-mode"))])
|
||||
(forest-blue-theme . [(20160627 842) ((emacs (24))) "Emacs theme with a dark background." single ((:commit . "58096ce1a25615d2bae806c3775bae3e2775019d") (:authors ("olkinn")) (:maintainer "olkinn"))])
|
||||
(forge . [(20210406 1356) ((emacs (25 1)) (closql (1 0 0)) (dash (2 14 1)) (emacsql-sqlite (3 0 0)) (ghub (20190319)) (let-alist (1 0 5)) (magit (20190408)) (markdown-mode (2 3)) (transient (0 1 0))) "Access Git forges from Magit." tar ((:commit . "ab3be5a703f319e6de7e76ed292d20deb60cb2d7") (:authors ("Jonas Bernoulli" . "jonas@bernoul.li")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "git" "tools" "vc") (:url . "https://github.com/magit/forge"))])
|
||||
(forge . [(20210414 1246) ((emacs (25 1)) (closql (1 0 0)) (dash (2 14 1)) (emacsql-sqlite (3 0 0)) (ghub (20190319)) (let-alist (1 0 5)) (magit (20190408)) (markdown-mode (2 3)) (transient (0 1 0))) "Access Git forges from Magit." tar ((:commit . "81f4191586385748f3e8a795526479ceeee85f82") (:authors ("Jonas Bernoulli" . "jonas@bernoul.li")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "git" "tools" "vc") (:url . "https://github.com/magit/forge"))])
|
||||
(form-feed . [(20201116 1108) nil "Display ^L glyphs as horizontal lines" single ((:commit . "26a52410db56fab9888b24b7622d74a2779c719d") (:authors ("Vasilij Schneidermann" . "mail@vasilij.de")) (:maintainer "Vasilij Schneidermann" . "mail@vasilij.de") (:keywords "faces") (:url . "https://depp.brause.cc/form-feed"))])
|
||||
(format-all . [(20210413 802) ((emacs (24 3)) (inheritenv (0 1)) (language-id (0 12))) "Auto-format C, C++, JS, Python, Ruby and 50 other languages" single ((:commit . "eb5906c7070b667432194da3991daf21f24b516a") (:authors ("Lassi Kortela" . "lassi@lassi.io")) (:maintainer "Lassi Kortela" . "lassi@lassi.io") (:keywords "languages" "util") (:url . "https://github.com/lassik/emacs-format-all-the-code"))])
|
||||
(format-sql . [(20150422 1333) nil "Use format-sql to make your SQL readable in directly Emacs." single ((:commit . "97f475c245cd6c81a72a265678e2087cee66ac7b") (:authors ("Friedrich Paetzke" . "paetzke@fastmail.fm")) (:maintainer "Friedrich Paetzke" . "paetzke@fastmail.fm") (:url . "https://github.com/paetzke/format-sql.el"))])
|
||||
|
@ -1684,7 +1684,7 @@
|
|||
(fsbot-data-browser . [(20160921 1533) nil "browse the fsbot database using tabulated-list-mode" single ((:commit . "6bca4f7de63e31839d2542f6c678b79931dec344") (:authors ("Benaiah Mischenko")) (:maintainer "Benaiah Mischenko") (:keywords "fsbot" "irc" "tabulated-list-mode") (:url . "http://github.com/benaiah/fsbot-data-browser"))])
|
||||
(fsharp-mode . [(20210331 1931) ((emacs (25)) (s (1 3 1))) "Support for the F# programming language" tar ((:commit . "93b1fbc31d73286a18640a36fc2be87d1736e0f2") (:authors ("1993-1997 Xavier Leroy, Jacques Garrigue and Ian T Zimmerman") ("2010-2011 Laurent Le Brun" . "laurent@le-brun.eu") ("2012-2014 Robin Neatherway" . "robin.neatherway@gmail.com") ("2017-2021 Jürgen Hötzel")) (:maintainer "Jürgen Hötzel") (:keywords "languages"))])
|
||||
(fstar-mode . [(20201012 2201) ((emacs (24 3)) (dash (2 11)) (company (0 8 12)) (quick-peek (1 0)) (yasnippet (0 11 0)) (flycheck (30 0)) (company-quickhelp (2 2 0))) "Support for F* programming" tar ((:commit . "3afbf04e4eb21af950cfdb727d8b808164fd9415") (:authors ("Clément Pit-Claudel" . "clement.pitclaudel@live.com")) (:maintainer "Clément Pit-Claudel" . "clement.pitclaudel@live.com") (:keywords "convenience" "languages") (:url . "https://github.com/FStarLang/fstar-mode.el"))])
|
||||
(fuel . [(20210323 1426) ((cl-lib (0 2)) (emacs (24 2))) "Major mode for the Factor programming language." tar ((:commit . "3c54d39f2b913d831a0b497b093001850abdc5fd"))])
|
||||
(fuel . [(20210323 1426) ((cl-lib (0 2)) (emacs (24 2))) "Major mode for the Factor programming language." tar ((:commit . "73f763133a61ee25a36d8819e0f10505a6aab373"))])
|
||||
(fuff . [(20170202 1503) ((seq (2 3))) "Find files with findutils, recursively" single ((:commit . "278e849913df87bd8756c59382282d87474802c3") (:authors ("Joel Moberg")) (:maintainer "Joel Moberg") (:keywords "files" "project" "convenience") (:url . "https://github.com/joelmo/fuff"))])
|
||||
(full-ack . [(20140223 1732) nil "a front-end for ack" single ((:commit . "761d846e105b150f8e6d13d7a8983f0248313a45") (:authors ("Nikolaj Schumacher <bugs * nschum de>")) (:maintainer "Nikolaj Schumacher <bugs * nschum de>") (:keywords "tools" "matching") (:url . "http://nschum.de/src/emacs/full-ack/"))])
|
||||
(fullframe . [(20210226 1057) ((cl-lib (0 5))) "Generalized automatic execution in a single frame" single ((:commit . "886b831c001b44ec95aec4ff36e8bc1b3003c786") (:authors ("Tom Regner" . "tom@goochesa.de")) (:maintainer "Tom Regner" . "tom@goochesa.de") (:keywords "fullscreen"))])
|
||||
|
@ -1755,7 +1755,7 @@
|
|||
(git-backup-ivy . [(20200709 818) ((ivy (0 12 0)) (git-backup (0 0 1)) (emacs (25 1))) "An ivy interface to git-backup" single ((:commit . "0a5c52e64d0062f77ffefc9213e75690c6d7b111") (:authors ("Sebastian Wålinder" . "s.walinder@gmail.com")) (:maintainer "Sebastian Wålinder" . "s.walinder@gmail.com") (:keywords "backup" "convenience" "files" "tools" "vc") (:url . "https://github.com/walseb/git-backup-ivy"))])
|
||||
(git-blamed . [(20161028 1926) nil "Minor mode for incremental blame for Git" single ((:commit . "cef196abf398e2dd11f775d1e6cd8690567408aa") (:keywords "git" "version control" "release management"))])
|
||||
(git-command . [(20191028 333) ((term-run (0 1 4)) (with-editor (2 3 1))) "A Git Command-Line interface" single ((:commit . "a773d40da39dfb1c6ecf2b0758aa370ddea8f06d") (:authors ("10sr <8slashes+el [at] gmail [dot] com>")) (:maintainer "10sr <8slashes+el [at] gmail [dot] com>") (:keywords "utility" "git") (:url . "https://github.com/10sr/git-command-el"))])
|
||||
(git-commit . [(20210328 1730) ((emacs (25 1)) (dash (20200524)) (transient (20200601)) (with-editor (20200522))) "Edit Git commit messages" single ((:commit . "5882df245d3388cd6f443bc11df219a838104df2") (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "git" "tools" "vc") (:url . "https://github.com/magit/magit"))])
|
||||
(git-commit . [(20210328 1730) ((emacs (25 1)) (dash (20200524)) (transient (20200601)) (with-editor (20200522))) "Edit Git commit messages" single ((:commit . "c7364e169648f454dc73fe50596d827fbf1f0fb7") (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "git" "tools" "vc") (:url . "https://github.com/magit/magit"))])
|
||||
(git-commit-insert-issue . [(20210107 2018) ((emacs (25)) (projectile (0)) (s (0)) (ghub (0)) (bitbucket (0))) "Get issues list when typing \"Fixes #\"" single ((:commit . "6cfb8b4b5b23ae881cf3d005da4d7f60d91cd2cd") (:authors ("Vindarel")) (:maintainer "Vindarel") (:keywords "tools" "vc" "github" "gitlab" "bitbucket" "commit" "issues") (:url . "https://gitlab.com/emacs-stuff/git-commit-insert-issue/"))])
|
||||
(git-dwim . [(20170126 1214) nil "Context-aware git commands such as branch handling" single ((:commit . "485c732130686c2f28a026e385366006435394b9") (:authors ("rubikitch" . "rubikitch@ruby-lang.org")) (:maintainer "rubikitch" . "rubikitch@ruby-lang.org") (:keywords "git" "tools" "convenience") (:url . "http://www.emacswiki.org/cgi-bin/wiki/download/git-dwim.el"))])
|
||||
(git-grep . [(20200920 1751) ((projectile (0 10 0))) "Search tools using git grep" single ((:commit . "12ff6045e9b6aa42f98abd4ddc44d670268a0849") (:authors ("Sam Kleinman")) (:maintainer "tychoish" . "garen@tychoish.com") (:keywords "matching" "files" "grep" "search" "using" "git-grep") (:url . "https://github.com/tychoish/git-grep.el"))])
|
||||
|
@ -1879,7 +1879,7 @@
|
|||
(goto-last-change . [(20150109 1823) nil "Move point through buffer-undo-list positions" single ((:commit . "58b0928bc255b47aad318cd183a5dce8f62199cc") (:authors ("Kevin Rodgers" . "ihs_4664@yahoo.com")) (:maintainer "Kevin Rodgers" . "ihs_4664@yahoo.com") (:keywords "convenience") (:url . "https://github.com/camdez/goto-last-change.el"))])
|
||||
(goto-last-point . [(20190525 1855) ((emacs (24 3))) "Record and jump to the last point in the buffer." single ((:commit . "7ea191df18ff4774cf1dc568e1726143dd54ea02") (:authors ("Manuel Uberti" . "manuel.uberti@inventati.org")) (:maintainer "Manuel Uberti" . "manuel.uberti@inventati.org") (:keywords "convenience") (:url . "https://github.com/manuel-uberti/goto-last-point"))])
|
||||
(goto-line-preview . [(20210323 422) ((emacs (25))) "Preview line when executing `goto-line` command" single ((:commit . "c83688ea95b4308145555fea50e953a26d67b1b2") (:authors ("Shen, Jen-Chieh" . "jcs090218@gmail.com")) (:maintainer "Shen, Jen-Chieh" . "jcs090218@gmail.com") (:url . "https://github.com/jcs-elpa/goto-line-preview"))])
|
||||
(govc . [(20191213 2131) ((emacs (24 3)) (dash (1 5 0)) (s (1 9 0)) (magit-popup (2 0 50)) (json-mode (1 6 0))) "Interface to govc for managing VMware ESXi and vCenter" single ((:commit . "52c75aa6b3d8eeacfede11b314e20514ca7c75a4") (:authors ("The govc developers")) (:maintainer "The govc developers") (:keywords "convenience") (:url . "https://github.com/vmware/govmomi/tree/master/govc/emacs"))])
|
||||
(govc . [(20191213 2131) ((emacs (24 3)) (dash (1 5 0)) (s (1 9 0)) (magit-popup (2 0 50)) (json-mode (1 6 0))) "Interface to govc for managing VMware ESXi and vCenter" single ((:commit . "9af23072767a6d3093c000464d015120e6c6d20c") (:authors ("The govc developers")) (:maintainer "The govc developers") (:keywords "convenience") (:url . "https://github.com/vmware/govmomi/tree/master/govc/emacs"))])
|
||||
(govet . [(20170808 1724) nil "linter/problem finder for the Go source code" single ((:commit . "1c05817cf8b96589076c7ac4e52ee58a860a0cbf") (:url . "https://godoc.org/golang.org/x/tools/cmd/vet"))])
|
||||
(gpastel . [(20181229 1404) ((emacs (25 1))) "Integrates GPaste with the kill-ring" single ((:commit . "d5fc55bc825203f998537c5834718e665bb87c29") (:authors ("Damien Cassou" . "damien@cassou.me")) (:maintainer "Damien Cassou" . "damien@cassou.me") (:keywords "tools") (:url . "https://gitlab.petton.fr/DamienCassou/desktop-environment"))])
|
||||
(grab-mac-link . [(20200712 428) ((emacs (24))) "Grab link from Mac Apps and insert it into Emacs" single ((:commit . "9b47cbe126a0735fa447a3c5e1e8ba80a7ef8d26") (:authors ("Xu Chunyang")) (:maintainer "Xu Chunyang") (:keywords "mac" "hyperlink") (:url . "https://github.com/xuchunyang/grab-mac-link.el"))])
|
||||
|
@ -1964,7 +1964,7 @@
|
|||
(hcl-mode . [(20200315 2129) ((emacs (24 3))) "Major mode for Hashicorp" single ((:commit . "e12b1df2ca28d2b06c471cd709c038a2dc0bcdbd") (:authors ("Syohei YOSHIDA" . "syohex@gmail.com")) (:maintainer "Steve Purcell" . "steve@sanityinc.com") (:url . "https://github.com/purcell/emacs-hcl-mode"))])
|
||||
(headlong . [(20150417 1526) nil "reckless completion" single ((:commit . "f6830f87f236eee88263cb6976125f72422abe72") (:authors ("Oleh Krehel" . "ohwoeowho@gmail.com")) (:maintainer "Oleh Krehel" . "ohwoeowho@gmail.com") (:keywords "completion") (:url . "https://github.com/abo-abo/headlong"))])
|
||||
(heaven-and-hell . [(20190713 1830) ((emacs (24 4))) "easy toggle light/dark themes" single ((:commit . "e1febfd60d060c110a1e43c5f093cd8537251308") (:authors ("Valentin Ignatev" . "valentignatev@gmail.com")) (:maintainer "Valentin Ignatev" . "valentignatev@gmail.com") (:keywords "faces") (:url . "https://github.com/valignatev/heaven-and-hell"))])
|
||||
(helm . [(20210410 753) ((emacs (25 1)) (async (1 9 4)) (popup (0 5 3)) (helm-core (3 7 1))) "Helm is an Emacs incremental and narrowing framework" tar ((:commit . "8470905a1f5cf8468e7b72287a525babdb2d9a59") (:authors ("Thierry Volpiatto" . "thierry.volpiatto@gmail.com")) (:maintainer "Thierry Volpiatto" . "thierry.volpiatto@gmail.com") (:url . "https://github.com/emacs-helm/helm"))])
|
||||
(helm . [(20210414 547) ((emacs (25 1)) (async (1 9 4)) (popup (0 5 3)) (helm-core (3 7 1))) "Helm is an Emacs incremental and narrowing framework" tar ((:commit . "e0b8ee5dff03f6045fc0cfe35ea60068055e9b08") (:authors ("Thierry Volpiatto" . "thierry.volpiatto@gmail.com")) (:maintainer "Thierry Volpiatto" . "thierry.volpiatto@gmail.com") (:url . "https://github.com/emacs-helm/helm"))])
|
||||
(helm-R . [(20120820 14) ((helm (20120517)) (ess (20120509))) "helm-sources and some utilities for GNU R." single ((:commit . "b0eb9d5f6a483a9dbe6eb6cf1f2024d4f5938bc2") (:authors ("myuhe <yuhei.maeda_at_gmail.com>")) (:maintainer "myuhe") (:keywords "convenience") (:url . "https://github.com/myuhe/helm-R.el"))])
|
||||
(helm-ack . [(20141030 1226) ((helm (1 0)) (cl-lib (0 5))) "Ack command with helm interface" single ((:commit . "889bc225318d14c6e3be80e73b1d9d6fb30e48c3") (:authors ("Syohei YOSHIDA" . "syohex@gmail.com")) (:maintainer "Syohei YOSHIDA" . "syohex@gmail.com") (:url . "https://github.com/syohex/emacs-helm-ack"))])
|
||||
(helm-ad . [(20151209 1015) ((dash (2 8 0)) (helm (1 6 2))) "helm source for Active Directory" single ((:commit . "8ac044705d8620ee354a9cfa8cc1b865e83c0d55") (:authors ("Takahiro Noda" . "takahiro.noda+github@gmail.com")) (:maintainer "Takahiro Noda" . "takahiro.noda+github@gmail.com") (:keywords "comm"))])
|
||||
|
@ -1999,7 +1999,7 @@
|
|||
(helm-codesearch . [(20190412 1153) ((emacs (25 1)) (s (1 11 0)) (dash (2 12 0)) (helm (1 7 7)) (cl-lib (0 5))) "helm interface for codesearch" single ((:commit . "72f1d1de746115ab7e861178b49fa3c0b6b58d90") (:authors ("Youngjoo Lee" . "youngker@gmail.com")) (:maintainer "Youngjoo Lee" . "youngker@gmail.com") (:keywords "tools"))])
|
||||
(helm-commandlinefu . [(20150611 545) ((emacs (24 1)) (helm (1 7 0)) (json (1 3)) (let-alist (1 0 3))) "Search and browse commandlinefu.com from helm" single ((:commit . "9ee7e018c5db23ae9c8d1c8fa969876f15b7280d") (:authors ("Chunyang Xu" . "xuchunyang56@gmail.com")) (:maintainer "Chunyang Xu" . "xuchunyang56@gmail.com") (:keywords "commandlinefu.com") (:url . "https://github.com/xuchunyang/helm-commandlinefu"))])
|
||||
(helm-company . [(20190812 1429) ((helm (1 5 9)) (company (0 6 13))) "Helm interface for company-mode" single ((:commit . "6eb5c2d730a60e394e005b47c1db018697094dde") (:authors ("Yasuyuki Oka" . "yasuyk@gmail.com")) (:maintainer "Daniel Ralston" . "Sodel-the-Vociferous@users.noreply.github.com") (:url . "https://github.com/Sodel-the-Vociferous/helm-company"))])
|
||||
(helm-core . [(20210410 706) ((emacs (25 1)) (async (1 9 4))) "Development files for Helm" tar ((:commit . "8470905a1f5cf8468e7b72287a525babdb2d9a59"))])
|
||||
(helm-core . [(20210414 547) ((emacs (25 1)) (async (1 9 4))) "Development files for Helm" tar ((:commit . "e0b8ee5dff03f6045fc0cfe35ea60068055e9b08"))])
|
||||
(helm-cscope . [(20190615 41) ((xcscope (1 0)) (helm (1 6 7)) (cl-lib (0 5)) (emacs (24 1))) "Helm interface for xcscope.el." single ((:commit . "af1d9e7f4460a88d7400b5a74d5da68084089ac1") (:authors ("alpha22jp" . "alpha22jp@gmail.com")) (:maintainer "alpha22jp" . "alpha22jp@gmail.com") (:keywords "cscope" "helm") (:url . "https://github.com/alpha22jp/helm-cscope.el"))])
|
||||
(helm-css-scss . [(20191230 1549) ((emacs (24 3)) (helm (1 0))) "CSS/SCSS/LESS Selectors with helm interface" single ((:commit . "48b996f73af1fef8d6e88a1c545d98f8c50b0cf3") (:authors ("Shingo Fukuyama - http://fukuyama.co")) (:maintainer "Shingo Fukuyama - http://fukuyama.co") (:keywords "convenience" "scss" "css" "less" "selector" "helm") (:url . "https://github.com/ShingoFukuyama/helm-css-scss"))])
|
||||
(helm-ctest . [(20191031 1435) ((s (1 9 0)) (dash (2 11 0)) (helm-core (1 7 4))) "Run ctest from within emacs" single ((:commit . "2a29cfb4ec583da247fa2ae7bac88790b1223e40") (:authors ("Dan LaManna" . "me@danlamanna.com")) (:maintainer "Dan LaManna" . "me@danlamanna.com") (:keywords "helm" "ctest"))])
|
||||
|
@ -2323,7 +2323,7 @@
|
|||
(indicators . [(20161211 1126) ((dash (2 13 0)) (cl-lib (0 5 0))) "Display the buffer relative location of line in the fringe." single ((:commit . "f62a1201f21453e3aca93f48483e65ae8251432e") (:authors ("Matus Goljer" . "matus.goljer@gmail.com")) (:maintainer "Matus Goljer" . "matus.goljer@gmail.com") (:keywords "fringe" "frames") (:url . "https://github.com/Fuco1/indicators.el"))])
|
||||
(indium . [(20210309 1210) ((emacs (25)) (seq (2 16)) (js2-mode (20140114)) (js2-refactor (0 9 0)) (company (0 9 0)) (json-process-client (0 2 0))) "JavaScript Awesome Development Environment" tar ((:commit . "8499e156bf7286846c3a2bf8c9e0c4d4f24b224c") (:authors ("Nicolas Petton" . "nicolas@petton.fr")) (:maintainer "Nicolas Petton" . "nicolas@petton.fr") (:keywords "tools" "javascript") (:url . "https://github.com/NicolasPetton/indium"))])
|
||||
(indy . [(20190807 625) nil "A minor mode and EDSL to manage your mode's indentation rules." single ((:commit . "abc5bee424780ad2de5520f8fefbf8e120c0d9ed") (:authors ("Kevin W. van Rooijen" . "kevin.van.rooijen@attichacker.com")) (:maintainer "Kevin W. van Rooijen" . "kevin.van.rooijen@attichacker.com") (:keywords "convenience" "matching" "tools"))])
|
||||
(inf-clojure . [(20210322 1421) ((emacs (25 1)) (clojure-mode (5 11))) "Run an external Clojure process in an Emacs buffer" single ((:commit . "c3ff2f40fdcedf3357cde868c278474767b65adb") (:keywords "processes" "clojure") (:url . "http://github.com/clojure-emacs/inf-clojure"))])
|
||||
(inf-clojure . [(20210322 1421) ((emacs (25 1)) (clojure-mode (5 11))) "Run an external Clojure process in an Emacs buffer" single ((:commit . "696e5efb537d55c9db4d885c33d638f3eaf932a5") (:keywords "processes" "clojure") (:url . "http://github.com/clojure-emacs/inf-clojure"))])
|
||||
(inf-crystal . [(20180119 211) ((emacs (24 3)) (crystal-mode (0 1 0))) "Run a Inferior-Crystal process in a buffer" single ((:commit . "02007b2a2a3bea44902d7c83c4acba1e39d278e3") (:authors ("Brantou" . "brantou89@gmail.com")) (:maintainer "Brantou" . "brantou89@gmail.com") (:keywords "languages" "crystal") (:url . "https://github.com/brantou/inf-crystal.el"))])
|
||||
(inf-elixir . [(20210315 1723) ((emacs (25 1))) "Run an interactive Elixir shell" single ((:commit . "b526ce852886d1863163e054fcbbcbb83c55b32a") (:authors ("Jonathan Arnett" . "jonathan.arnett@protonmail.com")) (:maintainer "Jonathan Arnett" . "jonathan.arnett@protonmail.com") (:keywords "languages" "processes" "tools") (:url . "https://github.com/J3RN/inf-elixir"))])
|
||||
(inf-mongo . [(20180408 1338) nil "Run a MongoDB shell process in a buffer" single ((:commit . "2e498d1c88bd1904eeec18ed06b1a0cf8bdc2a92") (:authors ("Tobias Svensson")) (:maintainer "Tobias Svensson") (:keywords "databases" "mongodb") (:url . "http://github.com/endofunky/inf-mongo"))])
|
||||
|
@ -2510,7 +2510,7 @@
|
|||
(jupyter . [(20210407 212) ((emacs (26)) (zmq (0 10 3)) (cl-lib (0 5)) (simple-httpd (1 5 0)) (websocket (1 9))) "Jupyter" tar ((:commit . "7735d2b8fb32434992467f0d4d9d59c1a1a5dc0c") (:authors ("Nathaniel Nicandro" . "nathanielnicandro@gmail.com")) (:maintainer "Nathaniel Nicandro" . "nathanielnicandro@gmail.com") (:url . "https://github.com/dzop/emacs-jupyter"))])
|
||||
(just-mode . [(20210311 2359) ((emacs (26 1))) "Justfile editing mode" single ((:commit . "45c248fe72d4a15c5a9f26bc0b27adb874265f53") (:authors ("Leon Barrett" . "leon@barrettnexus.com")) (:maintainer "Leon Barrett" . "leon@barrettnexus.com") (:keywords "files" "languages" "tools") (:url . "https://github.com/leon-barrett/just-mode.el"))])
|
||||
(jvm-mode . [(20150422 708) ((dash (2 6 0)) (emacs (24))) "Monitor and manage your JVMs" single ((:commit . "3355dbaf5b0185aadfbad24160399abb32c5bea0") (:authors ("Martin Trojer" . "martin.trojer@gmail.com")) (:maintainer "Martin Trojer" . "martin.trojer@gmail.com") (:keywords "convenience") (:url . "https://github.com/martintrojer/jvm-mode.el"))])
|
||||
(k8s-mode . [(20210219 1317) ((emacs (24 3)) (yaml-mode (0 0 10))) "Major mode for Kubernetes configuration file" tar ((:commit . "0df142ac98bcd072dd7017053c9c9c476345aeef") (:authors ("Giap Tran" . "txgvnn@gmail.com")) (:maintainer "Giap Tran" . "txgvnn@gmail.com") (:url . "https://github.com/TxGVNN/emacs-k8s-mode"))])
|
||||
(k8s-mode . [(20210414 1543) ((emacs (24 3)) (yaml-mode (0 0 10))) "Major mode for Kubernetes configuration file" tar ((:commit . "14f08627d5bc320fee5bd9926e9aabe6956f514e") (:authors ("Giap Tran" . "txgvnn@gmail.com")) (:maintainer "Giap Tran" . "txgvnn@gmail.com") (:url . "https://github.com/TxGVNN/emacs-k8s-mode"))])
|
||||
(kaesar . [(20160128 1008) ((cl-lib (0 3))) "Another AES algorithm encrypt/decrypt string with password." single ((:commit . "d087075cb1a46c2c85cd075220e09b2eaef9b86e") (:authors ("Masahiro Hayashi" . "mhayashi1120@gmail.com")) (:maintainer "Masahiro Hayashi" . "mhayashi1120@gmail.com") (:keywords "data") (:url . "https://github.com/mhayashi1120/Emacs-kaesar"))])
|
||||
(kaesar-file . [(20160128 1008) ((kaesar (0 1 1))) "Encrypt/Decrypt file by AES with password." single ((:commit . "d087075cb1a46c2c85cd075220e09b2eaef9b86e") (:authors ("Masahiro Hayashi" . "mhayashi1120@gmail.com")) (:maintainer "Masahiro Hayashi" . "mhayashi1120@gmail.com") (:keywords "data" "files") (:url . "https://github.com/mhayashi1120/Emacs-kaesar"))])
|
||||
(kaesar-mode . [(20160128 1008) ((kaesar (0 1 4)) (cl-lib (0 3))) "Encrypt/Decrypt buffer by AES with password." single ((:commit . "d087075cb1a46c2c85cd075220e09b2eaef9b86e") (:authors ("Masahiro Hayashi" . "mhayashi1120@gmail.com")) (:maintainer "Masahiro Hayashi" . "mhayashi1120@gmail.com") (:keywords "data" "convenience") (:url . "https://github.com/mhayashi1120/Emacs-kaesar"))])
|
||||
|
@ -2532,7 +2532,7 @@
|
|||
(keg . [(20210226 2246) ((emacs (24 1)) (cl-lib (0 6))) "Modern Elisp package development system" tar ((:commit . "e4c7d9d8f823fa717df5f0e7039d525758429fc9") (:authors ("Naoya Yamashita" . "conao3@gmail.com")) (:maintainer "Naoya Yamashita" . "conao3@gmail.com") (:keywords "convenience") (:url . "https://github.com/conao3/keg.el"))])
|
||||
(keg-mode . [(20200601 333) ((emacs (24 4))) "Major mode for editing Keg files" single ((:commit . "e4c7d9d8f823fa717df5f0e7039d525758429fc9") (:authors ("Naoya Yamashita" . "conao3@gmail.com")) (:maintainer "Naoya Yamashita" . "conao3@gmail.com") (:keywords "convenience") (:url . "https://github.com/conao3/keg.el"))])
|
||||
(kerl . [(20150424 2005) nil "Emacs integration for kerl" single ((:commit . "1732ee26213f021bf040919c45ad276aafcaae14") (:authors ("Correl Roush" . "correl@gmail.com")) (:maintainer "Correl Roush" . "correl@gmail.com") (:keywords "tools") (:url . "http://github.com/correl/kerl.el/"))])
|
||||
(key-assist . [(20201109 1358) ((emacs (24 3))) "Minibuffer keybinding cheatsheet and launcher" single ((:commit . "7fd89c306c975a1fa3ab16ba7a4d3b102130a868") (:authors ("Boruch Baum" . "boruch_baum@gmx.com")) (:maintainer "Boruch Baum" . "boruch_baum@gmx.com") (:keywords "abbrev" "convenience" "docs" "help") (:url . "https://github.com/Boruch-Baum/emacs-key-assist"))])
|
||||
(key-assist . [(20210414 11) ((emacs (24 3))) "Minibuffer keybinding cheatsheet and launcher" single ((:commit . "512a9e9aa26abc80985c36275f45f2fcdff75470") (:authors ("Boruch Baum" . "boruch_baum@gmx.com")) (:maintainer "Boruch Baum" . "boruch_baum@gmx.com") (:keywords "abbrev" "convenience" "docs" "help") (:url . "https://github.com/Boruch-Baum/emacs-key-assist"))])
|
||||
(key-chord . [(20201222 2030) ((emacs (24))) "map pairs of simultaneously pressed keys to commands" single ((:commit . "7f7fd7c5bd2b996fa054779357e1566f7989e07d") (:authors ("David Andersson <l.david.andersson(at)sverige.nu>")) (:maintainer "David Andersson <l.david.andersson(at)sverige.nu>") (:keywords "keyboard" "chord" "input"))])
|
||||
(key-combo . [(20150324 1439) nil "map key sequence to commands" single ((:commit . "2fb5c65bc82d5bd2964e2b163822429ab45d90a1") (:authors ("Yuuki Arisawa" . "yuuki.ari@gmail.com")) (:maintainer "Vitalie Spinu" . "spinuvit@gmail.com") (:keywords "keyboard" "input") (:url . "https://github.com/uk-ar/key-combo"))])
|
||||
(key-intercept . [(20140211 749) nil "Intercept prefix keys" single ((:commit . "d9a60edb4ce893f2d3d94f242164fdcc62d43cf2") (:authors ("INA Lintaro <tarao.gnn at gmail.com>")) (:maintainer "INA Lintaro <tarao.gnn at gmail.com>") (:keywords "keyboard") (:url . "http://github.com/tarao/key-intercept-el"))])
|
||||
|
@ -2558,7 +2558,7 @@
|
|||
(killer . [(20190128 10) nil "kill and delete text" single ((:commit . "ace0547944933440384ceeb5876b1f68c082d540") (:authors ("Jonas Bernoulli" . "jonas@bernoul.li")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "convenience") (:url . "http://github.com/tarsius/killer"))])
|
||||
(kite . [(20130201 1938) ((json (1 2)) (websocket (0 93 1))) "WebKit inspector front-end" tar ((:commit . "7ed74d1147a6ddd152d3da65dc30df3517d53144") (:authors ("Julian Scheid" . "julians37@gmail.com")) (:maintainer "Julian Scheid" . "julians37@gmail.com") (:keywords "tools"))])
|
||||
(kite-mini . [(20160508 1106) ((dash (2 11 0)) (websocket (1 5))) "Remotely evaluate JavaScript in the WebKit debugger" tar ((:commit . "a68619dbc109c7989f3448426d8c1ee9e797c11f") (:authors ("Tung Dao" . "me@tungdao.com")) (:maintainer "Tung Dao" . "me@tungdao.com") (:keywords "webkit") (:url . "https://github.com/tungd/kite-mini.el"))])
|
||||
(kivy-mode . [(20210318 2106) nil "Emacs major mode for editing Kivy files" single ((:commit . "53b655b0ef4bdfe8bf81a2bef8f09179a4917076") (:authors ("Dean Serenevy" . "dean@serenevy.net")) (:maintainer "Dean Serenevy" . "dean@serenevy.net"))])
|
||||
(kivy-mode . [(20210318 2106) nil "Emacs major mode for editing Kivy files" single ((:commit . "9c69f30742e1df8190ae9ce1293edf6d6b0c9f7e") (:authors ("Dean Serenevy" . "dean@serenevy.net")) (:maintainer "Dean Serenevy" . "dean@serenevy.net"))])
|
||||
(kiwix . [(20210219 51) ((emacs (24 4)) (request (0 3 0))) "Searching offline Wikipedia through Kiwix." tar ((:commit . "0c5e1619f079df822686cf42af5859111b6afd44") (:authors ("stardiviner" . "numbchild@gmail.com")) (:maintainer "stardiviner" . "numbchild@gmail.com") (:keywords "kiwix" "wikipedia") (:url . "https://github.com/stardiviner/kiwix.el"))])
|
||||
(kixtart-mode . [(20150611 1604) ((emacs (24))) "major mode for Kixtart scripting files" single ((:commit . "1c2356797e7b766bbaaa2b341176a8b10499cd79") (:authors ("Ryrun <https://github.com/ryrun>")) (:maintainer "Ryrun <https://github.com/ryrun>") (:keywords "languages") (:url . "https://github.com/ryrun/kixtart-mode"))])
|
||||
(klere-theme . [(20210320 1912) ((emacs (24))) "A dark theme with lambent color highlights and incremental grays" single ((:commit . "f9eacacc00455e6c42961ec41f24f864c2a05ace") (:authors ("Wamm K. D." . "jaft.r@outlook.com")) (:maintainer "Wamm K. D." . "jaft.r@outlook.com") (:url . "https://codeberg.org/WammKD/emacs-klere-theme"))])
|
||||
|
@ -2588,7 +2588,7 @@
|
|||
(labburn-theme . [(20200822 2153) nil "A lab color space zenburn theme." single ((:commit . "4ef2892f56c973907361bc91495d14204744f678") (:authors ("Johannes Goslar")) (:maintainer "Johannes Goslar") (:keywords "theme" "zenburn") (:url . "https://github.com/ksjogo/labburn-theme"))])
|
||||
(laguna-theme . [(20200928 2159) nil "A theme that's easy on the eyes & focuses on importance." single ((:commit . "61b18f6362b94e42ea5ab19a6f2debc2bd917eda") (:authors ("Henry Newcomer" . "a.cliche.email@gmail.com")) (:maintainer "Henry Newcomer" . "a.cliche.email@gmail.com") (:url . "https://github.com/HenryNewcomer/laguna-theme"))])
|
||||
(lakota-input . [(20200823 2146) nil "Input modes for Lakota language orthographies" single ((:commit . "b74b9de284a0404a120bb15340def4dd2f9a4779") (:authors ("Grant Shangreaux" . "shshoshin@protonmail.com")) (:maintainer "Grant Shangreaux" . "shshoshin@protonmail.com") (:url . "https://git.sr.ht/~shoshin/lakota-input.git"))])
|
||||
(lambdapi-mode . [(20210407 1529) ((emacs (26 1)) (eglot (1 5)) (math-symbol-lists (1 2 1)) (highlight (20190710 1527))) "A major mode for editing Lambdapi source code" tar ((:commit . "8609ec2101777362f45df493c593e0e125fe0824") (:maintainer "Deducteam" . "dedukti-dev@inria.fr") (:keywords "languages") (:url . "https://github.com/Deducteam/lambdapi"))])
|
||||
(lambdapi-mode . [(20210407 1529) ((emacs (26 1)) (eglot (1 5)) (math-symbol-lists (1 2 1)) (highlight (20190710 1527))) "A major mode for editing Lambdapi source code" tar ((:commit . "058c1c5896fabb1e2e0b7cf4f4ae36c1ce8f502b") (:maintainer "Deducteam" . "dedukti-dev@inria.fr") (:keywords "languages") (:url . "https://github.com/Deducteam/lambdapi"))])
|
||||
(lammps-mode . [(20180801 1319) ((emacs (24 4))) "basic syntax highlighting for LAMMPS files" single ((:commit . "a5b68d7a59975770b56ee8f6e66fa4f703a72ffe") (:authors ("Aidan Thompson <athomps at sandia.gov>")) (:maintainer "Rohit Goswami <r95g10 at gmail.com>") (:keywords "languages" "faces") (:url . "https://github.com/lammps/lammps/tree/master/tools/emacs"))])
|
||||
(lang-refactor-perl . [(20131122 2127) nil "Simple refactorings, primarily for Perl" single ((:commit . "691bd69639de6b7af357e3b7143563ececd9c497") (:authors (nil . "Johan Lindstrom <buzzwordninja not_this_bit@googlemail.com>")) (:maintainer nil . "Johan Lindstrom <buzzwordninja not_this_bit@googlemail.com>") (:keywords "languages" "refactoring" "perl") (:url . "https://github.com/jplindstrom/emacs-lang-refactor-perl"))])
|
||||
(langdoc . [(20150218 645) ((cl-lib (0 2))) "Help to define help document mode for various languages" single ((:commit . "2c7223bacb116992d700ecb19a60df5c09c63424") (:authors ("Tomoya Tanjo" . "ttanjo@gmail.com")) (:maintainer "Tomoya Tanjo" . "ttanjo@gmail.com") (:keywords "convenience" "eldoc") (:url . "https://github.com/tom-tan/langdoc/"))])
|
||||
|
@ -2647,7 +2647,7 @@
|
|||
(license-snippets . [(20201117 1619) ((emacs (26)) (yasnippet (0 8 0))) "LICENSE templates for yasnippet" tar ((:commit . "a729748b7d7f38a916fe61f23db6e7446c0a5e8f") (:authors ("Seong Yong-ju" . "sei40kr@gmail.com")) (:maintainer "Seong Yong-ju" . "sei40kr@gmail.com") (:keywords "tools") (:url . "https://github.com/sei40kr/license-snippets"))])
|
||||
(license-templates . [(20200906 2047) ((emacs (24 3)) (request (0 3 0))) "Create LICENSE using GitHub API" single ((:commit . "ef80eff8b7be117f9c48bdc6d9a62e56b0a93554") (:authors ("Shen, Jen-Chieh" . "jcs090218@gmail.com")) (:maintainer "Shen, Jen-Chieh" . "jcs090218@gmail.com") (:url . "https://github.com/jcs-elpa/license-templates"))])
|
||||
(light-soap-theme . [(20150607 1445) ((emacs (24))) "Emacs 24 theme with a light background." single ((:commit . "76a787bd40c6b567ae68ced7f5d9f9f10725e00d"))])
|
||||
(ligo-mode . [(20210303 1751) ((emacs (27 1))) "A major mode for editing LIGO source code" single ((:commit . "d77a1ce480bcd21d0501b224cab11d5359450499") (:authors ("LigoLang SASU")) (:maintainer "LigoLang SASU") (:keywords "languages") (:url . "https://gitlab.com/ligolang/ligo/-/tree/dev/tools/emacs"))])
|
||||
(ligo-mode . [(20210303 1751) ((emacs (27 1))) "A major mode for editing LIGO source code" single ((:commit . "c146c829b2653e139a0e9316b3d8aec06632dc08") (:authors ("LigoLang SASU")) (:maintainer "LigoLang SASU") (:keywords "languages") (:url . "https://gitlab.com/ligolang/ligo/-/tree/dev/tools/emacs"))])
|
||||
(line-reminder . [(20210216 1451) ((emacs (24 4)) (indicators (0 0 4))) "Line annotation for changed and saved lines" single ((:commit . "bc488bbdba2172629183891758cfa9466a64182f") (:authors ("Shen, Jen-Chieh" . "jcs090218@gmail.com")) (:maintainer "Shen, Jen-Chieh" . "jcs090218@gmail.com") (:url . "https://github.com/jcs-elpa/line-reminder"))])
|
||||
(line-up-words . [(20180219 1024) nil "Align words in an intelligent way" single ((:commit . "a49afb9c168eaf8aaaf94f0c631b7b74db9a1d82") (:url . "https://github.com/janestreet/line-up-words"))])
|
||||
(lines-at-once . [(20180422 247) ((emacs (25))) "Insert and edit multiple lines at once" single ((:commit . "31bce4b79fe16251b7cf118f0d343b0b46f72360") (:authors ("Jiahao Li" . "jiahaowork@gmail.com")) (:maintainer "Jiahao Li" . "jiahaowork@gmail.com") (:keywords "abbrev" "tools") (:url . "https://github.com/jiahaowork/lines-at-once.el"))])
|
||||
|
@ -2682,7 +2682,7 @@
|
|||
(literate-starter-kit . [(20150730 1854) ((emacs (24 3))) "A literate starter kit to configure Emacs using Org-mode files." tar ((:commit . "6dce1d01781966c14558aa553cfc85008c06e115"))])
|
||||
(live-code-talks . [(20180907 1647) ((emacs (24)) (cl-lib (0 5)) (narrowed-page-navigation (0 1))) "Support for slides with live code in them" single ((:commit . "97f16a9ee4e6ff3e0f9291eaead772c66e3e12ae") (:authors ("David Raymond Christiansen" . "david@davidchristiansen.dk")) (:maintainer "David Raymond Christiansen" . "david@davidchristiansen.dk") (:keywords "docs" "multimedia"))])
|
||||
(live-preview . [(20201010 1948) ((emacs (24 4))) "Live preview by any shell command while editing" single ((:commit . "603a4a1759fbec92e7a1cabc249517c78e59ce7e") (:authors ("Lassi Kortela" . "lassi@lassi.io")) (:maintainer "Lassi Kortela" . "lassi@lassi.io") (:keywords "languages" "util") (:url . "https://github.com/lassik/emacs-live-preview"))])
|
||||
(live-py-mode . [(20210413 205) ((emacs (24 3))) "Live Coding in Python" tar ((:commit . "26d51013e75ddedd5eb8600a0a3dd035319f9d3f") (:authors ("Don Kirkby http://donkirkby.github.io")) (:maintainer "Don Kirkby http://donkirkby.github.io") (:keywords "live" "coding") (:url . "http://donkirkby.github.io/live-py-plugin/"))])
|
||||
(live-py-mode . [(20210413 205) ((emacs (24 3))) "Live Coding in Python" tar ((:commit . "8805233d42d8dd9896792f1da4253efd8552ae93") (:authors ("Don Kirkby http://donkirkby.github.io")) (:maintainer "Don Kirkby http://donkirkby.github.io") (:keywords "live" "coding") (:url . "http://donkirkby.github.io/live-py-plugin/"))])
|
||||
(lively . [(20171005 754) nil "interactively updating text" single ((:commit . "348675828c6a81bfa1ac311ca465aad813542c1b") (:authors ("Luke Gorrie" . "luke@bup.co.nz")) (:maintainer "Steve Purcell" . "steve@sanityinc.com"))])
|
||||
(livereload . [(20170629 650) ((emacs (25)) (websocket (1 8))) "Livereload server" tar ((:commit . "1e501d7e46dbd476c2c7cc9d20b5ac9d41fb1955") (:authors ("João Távora" . "joaotavora@gmail.com")) (:maintainer "João Távora" . "joaotavora@gmail.com") (:keywords "convenience"))])
|
||||
(livescript-mode . [(20140613 421) nil "Major mode for editing LiveScript files" single ((:commit . "90a918d9686e256e6d4d439cc20f24dad8d3b804") (:authors ("Hisamatsu Yasuyuki" . "yas@null.net")) (:maintainer "Hisamatsu Yasuyuki" . "yas@null.net") (:keywords "languages" "livescript") (:url . "https://github.com/yhisamatsu/livescript-mode"))])
|
||||
|
@ -2728,7 +2728,7 @@
|
|||
(lsp-julia . [(20210329 1551) ((emacs (25 1)) (lsp-mode (6 3)) (julia-mode (0 3))) "Julia support for lsp-mode" tar ((:commit . "81f7de5b9fe8e8e0e1e3a3ccc677f052edad140d") (:authors ("Martin Wolke" . "vibhavp@gmail.com") ("Adam Beckmeyer" . "adam_git@thebeckmeyers.xyz") ("Guido Kraemer" . "gdkrmr@users.noreply.github.com")) (:maintainer "Adam Beckmeyer" . "adam_git@thebeckmeyers.xyz") (:keywords "languages" "tools") (:url . "https://github.com/non-Jedi/lsp-julia"))])
|
||||
(lsp-latex . [(20210110 1914) ((emacs (25 1)) (lsp-mode (6 0))) "lsp-mode client for LaTeX, on texlab" single ((:commit . "5fc536f24dc659f998bc673129d9e7c4b20d297c") (:authors ("ROCKTAKEY" . "rocktakey@gmail.com")) (:maintainer "ROCKTAKEY" . "rocktakey@gmail.com") (:keywords "languages" "tex") (:url . "https://github.com/ROCKTAKEY/lsp-latex"))])
|
||||
(lsp-metals . [(20210413 526) ((emacs (26 1)) (lsp-mode (7 0)) (lsp-treemacs (0 2)) (dap-mode (0 3)) (dash (2 18 0)) (f (0 20 0)) (ht (2 0)) (treemacs (2 5))) "Scala Client settings" tar ((:commit . "fcacc7d6e33c4178db62492711c3ea624c990314") (:authors ("Ross A. Baker" . "ross@rossabaker.com") ("Evgeny Kurnevsky" . "kurnevsky@gmail.com")) (:maintainer "Ross A. Baker" . "ross@rossabaker.com") (:keywords "languages" "extensions") (:url . "https://github.com/emacs-lsp/lsp-metals"))])
|
||||
(lsp-mode . [(20210412 1229) ((emacs (26 1)) (dash (2 18 0)) (f (0 20 0)) (ht (2 3)) (spinner (1 7 3)) (markdown-mode (2 3)) (lv (0))) "LSP mode" tar ((:commit . "0f5bedcdf1293065637f0dcfc9f6d1963349ec27") (:authors ("Vibhav Pant, Fangrui Song, Ivan Yonchovski")) (:maintainer "Vibhav Pant, Fangrui Song, Ivan Yonchovski") (:keywords "languages") (:url . "https://github.com/emacs-lsp/lsp-mode"))])
|
||||
(lsp-mode . [(20210414 1652) ((emacs (26 1)) (dash (2 18 0)) (f (0 20 0)) (ht (2 3)) (spinner (1 7 3)) (markdown-mode (2 3)) (lv (0))) "LSP mode" tar ((:commit . "682f5b14f03f37558c88ac987036d398b27f09dd") (:authors ("Vibhav Pant, Fangrui Song, Ivan Yonchovski")) (:maintainer "Vibhav Pant, Fangrui Song, Ivan Yonchovski") (:keywords "languages") (:url . "https://github.com/emacs-lsp/lsp-mode"))])
|
||||
(lsp-mssql . [(20191204 1150) ((emacs (25 1)) (lsp-mode (6 2)) (dash (2 14 1)) (f (0 20 0)) (ht (2 0)) (lsp-treemacs (0 1))) "MSSQL LSP bindings" tar ((:commit . "88319a61a06e27fc1d3ea2e7b853ec1692b4c166") (:authors ("Ivan Yonchovski" . "yyoncho@gmail.com")) (:maintainer "Ivan Yonchovski" . "yyoncho@gmail.com") (:keywords "data" "languages") (:url . "https://github.com/emacs-lsp/lsp-mssql"))])
|
||||
(lsp-origami . [(20210126 843) ((origami (1 0)) (lsp-mode (6 1))) "origami.el support for lsp-mode" single ((:commit . "bedea3d25552d6969e917a15a0acc3d333ddc742") (:authors ("Vibhav Pant")) (:maintainer "Vibhav Pant") (:keywords "languages" "lsp-mode") (:url . "https://github.com/emacs-lsp/lsp-origami"))])
|
||||
(lsp-p4 . [(20190127 1049) ((lsp-mode (3 0))) "P4 support for lsp-mode" tar ((:commit . "669460d93b87fb876df11b2b68229677e7ad1a26") (:authors ("Dmitri Makarov")) (:maintainer "Dmitri Makarov") (:keywords "lsp" "p4") (:url . "https://github.com/dmakarov/p4ls"))])
|
||||
|
@ -2738,7 +2738,7 @@
|
|||
(lsp-python-ms . [(20210405 1922) ((emacs (25 1)) (lsp-mode (6 1))) "The lsp-mode client for Microsoft python-language-server" single ((:commit . "8d228b0f6dde3a4d1327650c17b21539ff4a08ee") (:authors ("Charl Botha")) (:maintainer "Andrew Christianson, Vincent Zhang") (:keywords "languages" "tools") (:url . "https://github.com/emacs-lsp/lsp-python-ms"))])
|
||||
(lsp-sonarlint . [(20200821 1703) ((emacs (25)) (dash (2 12 0)) (lsp-mode (6 3)) (ht (2 3))) "Emacs Sonarlint lsp client" tar ((:commit . "ef32b6f734323698fc8ba28646a07515aaafea44") (:authors ("Fermin MF" . "fmfs@posteo.net")) (:maintainer "Fermin MF" . "fmfs@posteo.net") (:keywords "languages" "tools" "php" "javascript" "xml" "ruby" "html" "scala" "java" "python") (:url . "https://github.com/emacs-lsp/lsp-sonarlint"))])
|
||||
(lsp-sourcekit . [(20210404 1624) ((emacs (25 1)) (lsp-mode (5))) "sourcekit-lsp client for lsp-mode" single ((:commit . "aafa9878a3df2f08e5a9c846d91fd53350ce3c99") (:authors ("Daniel Martín")) (:maintainer "Daniel Martín") (:keywords "languages" "lsp" "swift" "objective-c" "c++") (:url . "https://github.com/emacs-lsp/lsp-sourcekit"))])
|
||||
(lsp-tailwindcss . [(20210330 323) ((lsp-mode (3 0)) (emacs (24 3))) "A lsp-mode client for tailwindcss" single ((:commit . "5df10c36d3162982f5100b8c66af957dd05712cf") (:authors ("A.I." . "merrick@luois.me")) (:maintainer "A.I." . "merrick@luois.me") (:keywords "language" "tools") (:url . "https://github.com/merrickluo/lsp-tailwindcss"))])
|
||||
(lsp-tailwindcss . [(20210414 855) ((lsp-mode (3 0)) (emacs (24 3))) "A lsp-mode client for tailwindcss" single ((:commit . "b95e0e2db9e1561719c7f7815e7787fe71392871") (:authors ("A.I." . "merrick@luois.me")) (:maintainer "A.I." . "merrick@luois.me") (:keywords "language" "tools") (:url . "https://github.com/merrickluo/lsp-tailwindcss"))])
|
||||
(lsp-treemacs . [(20210411 1507) ((emacs (26 1)) (dash (2 18 0)) (f (0 20 0)) (ht (2 0)) (treemacs (2 5)) (lsp-mode (6 0))) "LSP treemacs" tar ((:commit . "4cfb46d7fe69cc537a8a86389c5d8d9fd3fbfabe") (:authors ("Ivan Yonchovski")) (:maintainer "Ivan Yonchovski") (:keywords "languages") (:url . "https://github.com/emacs-lsp/lsp-treemacs"))])
|
||||
(lsp-ui . [(20210330 428) ((emacs (26 1)) (dash (2 18 0)) (lsp-mode (6 0)) (markdown-mode (2 3))) "UI modules for lsp-mode" tar ((:commit . "efae00eb6a733d5271cb33e9d92c3d8c2fa98dde") (:authors ("Sebastien Chapuis <sebastien@chapu.is>, Fangrui Song" . "i@maskray.me")) (:maintainer "Sebastien Chapuis <sebastien@chapu.is>, Fangrui Song" . "i@maskray.me") (:keywords "languages" "tools") (:url . "https://github.com/emacs-lsp/lsp-ui"))])
|
||||
(lua-mode . [(20201110 1250) ((emacs (24 3))) "a major-mode for editing Lua scripts" tar ((:commit . "2d9a468b94acd8480299d47449b53136060b7b23") (:authors ("2011-2013 immerrr" . "immerrr+lua@gmail.com") ("2010-2011 Reuben Thomas" . "rrt@sc3d.org") ("2006 Juergen Hoetzel" . "juergen@hoetzel.info") ("2004 various (support for Lua 5 and byte compilation)") ("2001 Christian Vogler" . "cvogler@gradient.cis.upenn.edu") ("1997 Bret Mogilefsky" . "mogul-lua@gelatinous.com") ("tcl-mode by Gregor Schmid" . "schmid@fb3-s7.math.tu-berlin.de") ("with tons of assistance from") ("Paul Du Bois" . "pld-lua@gelatinous.com") ("Aaron Smith" . "aaron-lua@gelatinous.com")) (:maintainer "2011-2013 immerrr" . "immerrr+lua@gmail.com") (:keywords "languages" "processes" "tools") (:url . "http://immerrr.github.com/lua-mode"))])
|
||||
|
@ -2761,26 +2761,26 @@
|
|||
(magic-filetype . [(20180219 1552) ((emacs (24)) (s (1 9 0))) "Enhance filetype major mode" single ((:commit . "019494add5ff02dd36cb3f500142fc51125522cc") (:authors ("USAMI Kenta" . "tadsan@zonu.me")) (:maintainer "USAMI Kenta" . "tadsan@zonu.me") (:keywords "emulations" "vim" "ft" "file" "magic-mode") (:url . "https://github.com/zonuexe/magic-filetype.el"))])
|
||||
(magic-latex-buffer . [(20210306 422) ((cl-lib (0 5)) (emacs (25 1))) "Magically enhance LaTeX-mode font-locking for semi-WYSIWYG editing" single ((:commit . "903ec91872760e47c0e5715795f8465173615098") (:authors ("zk_phi")) (:maintainer "zk_phi") (:url . "http://zk-phi.github.io/"))])
|
||||
(magik-mode . [(20200304 1323) nil "mode for editing Magik + some utils." tar ((:commit . "e54f934952cde3f96d6a131968295d993b3cf624") (:keywords "languages") (:url . "http://github.com/roadrunner1776/magik"))])
|
||||
(magit . [(20210411 2036) ((emacs (25 1)) (dash (20200524)) (git-commit (20200516)) (transient (20200601)) (with-editor (20200522))) "A Git porcelain inside Emacs." tar ((:commit . "5882df245d3388cd6f443bc11df219a838104df2") (:authors ("Marius Vollmer" . "marius.vollmer@gmail.com")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "git" "tools" "vc") (:url . "https://github.com/magit/magit"))])
|
||||
(magit . [(20210414 1306) ((emacs (25 1)) (dash (20200524)) (git-commit (20200516)) (transient (20200601)) (with-editor (20200522))) "A Git porcelain inside Emacs." tar ((:commit . "c7364e169648f454dc73fe50596d827fbf1f0fb7") (:authors ("Marius Vollmer" . "marius.vollmer@gmail.com")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "git" "tools" "vc") (:url . "https://github.com/magit/magit"))])
|
||||
(magit-annex . [(20210210 2312) ((cl-lib (0 3)) (magit (2 90 0))) "Control git-annex from Magit" single ((:commit . "870174f23faa00b003b3eb63452228511c2da597") (:authors ("Kyle Meyer" . "kyle@kyleam.com") ("Rémi Vanicat" . "vanicat@debian.org")) (:maintainer "Kyle Meyer" . "kyle@kyleam.com") (:keywords "vc" "tools") (:url . "https://github.com/magit/magit-annex"))])
|
||||
(magit-circleci . [(20191209 2113) ((dash (2 16 0)) (transient (0 1 0)) (magit (2 90 0)) (emacs (25 3))) "CircleCI integration for Magit" single ((:commit . "2d4bdacf498ed3ff7d2c3574d346b2d24cbb12da") (:authors ("Adrien Brochard")) (:maintainer "Adrien Brochard") (:keywords "circleci" "continuous" "integration" "magit" "vc" "tools") (:url . "https://github.com/abrochard/magit-circleci"))])
|
||||
(magit-delta . [(20210104 1541) ((emacs (25 1)) (magit (20200426)) (xterm-color (2 0))) "Use Delta when displaying diffs in Magit" single ((:commit . "1164a6c3e501e944f1a6a2e91f15374a193bb8d3") (:authors ("Dan Davison" . "dandavison7@gmail.com")) (:maintainer "Dan Davison" . "dandavison7@gmail.com") (:url . "https://github.com/dandavison/magit-delta"))])
|
||||
(magit-diff-flycheck . [(20190524 551) ((magit (2)) (flycheck (31)) (seq (2)) (emacs (25 1))) "Report errors in diffs" single ((:commit . "28acf74f59e385865746cccf4b1e4c4025ae9433") (:authors ("Alex Ragone" . "ragonedk@gmail.com")) (:maintainer "Alex Ragone" . "ragonedk@gmail.com") (:keywords "convenience" "matching") (:url . "https://github.com/ragone/magit-diff-flycheck"))])
|
||||
(magit-filenotify . [(20151116 2340) ((magit (1 3 0)) (emacs (24 4))) "Refresh status buffer when git tree changes" single ((:commit . "c0865b3c41af20b6cd89de23d3b0beb54c8401a4") (:authors ("Rüdiger Sonderfeld" . "ruediger@c-plusplus.de")) (:maintainer "Rüdiger Sonderfeld" . "ruediger@c-plusplus.de") (:keywords "tools"))])
|
||||
(magit-find-file . [(20150702 830) ((magit (2 1 0)) (dash (2 8 0))) "completing-read over all files in Git" single ((:commit . "c3ea91bab37d10a814a829728ec972811f728d60") (:authors ("Bradley Wright" . "brad@intranation.com")) (:maintainer "Bradley Wright" . "brad@intranation.com") (:keywords "git") (:url . "https://github.com/bradleywright/magit-find-file.el"))])
|
||||
(magit-gerrit . [(20210412 1334) ((emacs (25 1)) (magit (2 90 1)) (transient (0 3 0))) "Magit plugin for Gerrit Code Review" single ((:commit . "5a104ea5d8174c546ce87b2de95b135b84f5cd34") (:authors ("Brian Fransioli" . "assem@terranpro.org")) (:maintainer "Brian Fransioli" . "assem@terranpro.org") (:url . "https://github.com/terranpro/magit-gerrit"))])
|
||||
(magit-gerrit . [(20210414 1334) ((emacs (25 1)) (magit (2 90 1)) (transient (0 3 0))) "Magit plugin for Gerrit Code Review" single ((:commit . "31f5ce30e374716818df7deb0cdbf462ef67e679") (:authors ("Brian Fransioli" . "assem@terranpro.org")) (:maintainer "Brian Fransioli" . "assem@terranpro.org") (:url . "https://github.com/terranpro/magit-gerrit"))])
|
||||
(magit-gh-pulls . [(20191230 1944) ((emacs (24 4)) (gh (0 9 1)) (magit (2 12 0)) (pcache (0 2 3)) (s (1 6 1))) "GitHub pull requests extension for Magit" single ((:commit . "57f3a5158bbc7bfd169ee136fde351cce999e0ca") (:authors ("Yann Hodique" . "yann.hodique@gmail.com")) (:maintainer "Yann Hodique" . "yann.hodique@gmail.com") (:keywords "git" "tools") (:url . "https://github.com/sigma/magit-gh-pulls"))])
|
||||
(magit-gitflow . [(20170929 824) ((magit (2 1 0)) (magit-popup (2 2 0))) "gitflow extension for magit" single ((:commit . "cc41b561ec6eea947fe9a176349fb4f771ed865b") (:authors ("Jan Tatarik" . "Jan.Tatarik@gmail.com")) (:maintainer "Jan Tatarik" . "Jan.Tatarik@gmail.com") (:keywords "vc" "tools") (:url . "https://github.com/jtatarik/magit-gitflow"))])
|
||||
(magit-imerge . [(20200516 2029) ((emacs (24 4)) (magit (2 10 0))) "Magit extension for git-imerge" single ((:commit . "a6130871e5f4421618e66d9254d0b5df9f3a1ef2") (:authors ("Kyle Meyer" . "kyle@kyleam.com")) (:maintainer "Kyle Meyer" . "kyle@kyleam.com") (:keywords "vc" "tools") (:url . "https://github.com/magit/magit-imerge"))])
|
||||
(magit-lfs . [(20190831 118) ((emacs (24 4)) (magit (2 10 3)) (dash (2 13 0))) "Magit plugin for Git LFS" single ((:commit . "75bf6d3310eae24889589a09e96a4a855e1a11c4") (:authors ("Junyoung Clare Jang" . "jjc9310@gmail.com")) (:maintainer "Junyoung Clare Jang" . "jjc9310@gmail.com") (:keywords "magit" "git" "lfs" "tools" "vc") (:url . "https://github.com/ailrun/magit-lfs"))])
|
||||
(magit-libgit . [(20210124 1829) ((emacs (26 1)) (magit (0)) (libgit (0))) "Libgit functionality" single ((:commit . "5882df245d3388cd6f443bc11df219a838104df2") (:authors ("Jonas Bernoulli" . "jonas@bernoul.li")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "git" "tools" "vc") (:url . "https://github.com/magit/magit"))])
|
||||
(magit-libgit . [(20210124 1829) ((emacs (26 1)) (magit (0)) (libgit (0))) "Libgit functionality" single ((:commit . "c7364e169648f454dc73fe50596d827fbf1f0fb7") (:authors ("Jonas Bernoulli" . "jonas@bernoul.li")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "git" "tools" "vc") (:url . "https://github.com/magit/magit"))])
|
||||
(magit-org-todos . [(20180709 1950) ((magit (2 0 0)) (emacs (24))) "Add local todo items to the magit status buffer" single ((:commit . "9ffa3efb098434d837cab4bacd1601fdfc6fe999") (:authors ("Daniel Ma")) (:maintainer "Daniel Ma") (:keywords "org-mode" "magit" "tools") (:url . "http://github.com/danielma/magit-org-todos"))])
|
||||
(magit-p4 . [(20170414 1246) ((magit (2 1)) (magit-popup (2 1)) (p4 (12 0)) (cl-lib (0 5))) "git-p4 plug-in for Magit" single ((:commit . "cdc05f2d564409baac9ca15b1a2a0110a6ff12b7") (:authors ("Damian T. Dobroczy\\\\'nski" . "qoocku@gmail.com")) (:maintainer "Aleksey Fedotov" . "lexa@cfotr.com") (:keywords "vc" "tools") (:url . "https://github.com/qoocku/magit-p4"))])
|
||||
(magit-patch-changelog . [(20200217 1202) ((emacs (25 1)) (magit (2 91 0))) "Generate a patch according to emacs-mirror/CONTRIBUTE" single ((:commit . "876c780bdb676b6ece64861704e199b94f33cf71") (:keywords "git" "tools" "vc") (:url . "https://github.com/dickmao/magit-patch-changelog"))])
|
||||
(magit-popup . [(20200719 1015) ((emacs (24 4)) (dash (2 13 0))) "Define prefix-infix-suffix command combos" tar ((:commit . "d8585fa39f88956963d877b921322530257ba9f5") (:authors ("Jonas Bernoulli" . "jonas@bernoul.li")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "bindings") (:url . "https://github.com/magit/magit-popup"))])
|
||||
(magit-rbr . [(20181009 2016) ((magit (2 13 0)) (emacs (24 3))) "Support for git rbr in Magit" single ((:commit . "029203b3e48537205052a058e964f058cd802c3c") (:authors ("Anatoly Fayngelerin" . "fanatoly+magitrbr@gmail.com")) (:maintainer "Anatoly Fayngelerin" . "fanatoly+magitrbr@gmail.com") (:keywords "git" "magit" "rbr" "tools") (:url . "https://github.com/fanatoly/magit-rbr"))])
|
||||
(magit-reviewboard . [(20200727 1748) ((emacs (25 2)) (magit (2 13 0)) (s (1 12 0)) (request (0 3 0))) "Show open Reviewboard reviews in Magit" single ((:commit . "aceedff88921f1dfef8a6b2fb18fe316fb7223a8") (:authors ("Jules Tamagnan" . "jtamagnan@gmail.com")) (:maintainer "Jules Tamagnan" . "jtamagnan@gmail.com") (:keywords "magit" "vc") (:url . "http://github.com/jtamagnan/magit-reviewboard"))])
|
||||
(magit-section . [(20210224 1417) ((emacs (25 1)) (dash (20200524))) "Sections for read-only buffers" tar ((:commit . "5882df245d3388cd6f443bc11df219a838104df2") (:authors ("Jonas Bernoulli" . "jonas@bernoul.li")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "tools") (:url . "https://github.com/magit/magit"))])
|
||||
(magit-section . [(20210224 1417) ((emacs (25 1)) (dash (20200524))) "Sections for read-only buffers" tar ((:commit . "c7364e169648f454dc73fe50596d827fbf1f0fb7") (:authors ("Jonas Bernoulli" . "jonas@bernoul.li")) (:maintainer "Jonas Bernoulli" . "jonas@bernoul.li") (:keywords "tools") (:url . "https://github.com/magit/magit"))])
|
||||
(magit-stgit . [(20190313 1158) nil "No description available." single ((:commit . "8294f34e4927798d9db883cafe946a9041b7e331"))])
|
||||
(magit-svn . [(20190821 1455) ((emacs (24 4)) (magit (2 1 0))) "Git-Svn extension for Magit" single ((:commit . "2cff1a30a30f2b3963342a7d185ec13fc12279c3") (:authors ("Phil Jackson" . "phil@shellarchive.co.uk")) (:maintainer "Phil Jackson" . "phil@shellarchive.co.uk") (:keywords "vc" "tools"))])
|
||||
(magit-tbdiff . [(20210327 350) ((emacs (24 4)) (magit (2 10 0))) "Magit extension for range diffs" single ((:commit . "99cb9c0501f0f1ea7ec3ebf0fb398f3d36cddafb") (:authors ("Kyle Meyer" . "kyle@kyleam.com")) (:maintainer "Kyle Meyer" . "kyle@kyleam.com") (:keywords "vc" "tools") (:url . "https://github.com/magit/magit-tbdiff"))])
|
||||
|
@ -2858,11 +2858,11 @@
|
|||
(memolist . [(20150804 1721) ((markdown-mode (22 0)) (ag (0 45))) "memolist.el is Emacs port of memolist.vim." single ((:commit . "c437a32d3955f859d9bbcbadf0911bbe27d877ff") (:authors ("mikanfactory <k952i4j14x17_at_gmail.com>")) (:maintainer "mikanfactory") (:keywords "markdown" "memo") (:url . "http://github.com/mikanfactory/emacs-memolist"))])
|
||||
(mentor . [(20201121 1649) ((xml-rpc (1 6 12)) (seq (1 11)) (cl-lib (0 5)) (async (1 9 3))) "Frontend for the rTorrent bittorrent client" tar ((:commit . "aa1eb8a8e7d8c5e5564b08f82130eed0943826bb") (:authors ("Stefan Kangas" . "stefankangas@gmail.com")) (:maintainer "Stefan Kangas" . "stefankangas@gmail.com") (:keywords "comm" "processes" "bittorrent"))])
|
||||
(meow . [(20210410 1837) ((emacs (26 3)) (dash (2 12 0)) (cl-lib (0 6 1)) (s (1 12 0))) "Modal Editing On Wheel" tar ((:commit . "6eb10d223fb7e0d87ac7ab7063fdb3951934e94c") (:authors ("Shi Tianshu")) (:maintainer "Shi Tianshu") (:keywords "convenience" "modal-editing") (:url . "https://www.github.com/DogLooksGood/meow"))])
|
||||
(merlin . [(20210408 1014) ((emacs (25 1))) "Mode for Merlin, an assistant for OCaml" tar ((:commit . "fe7380bb13ff91f8ed5cfbfea6a6ca01ee1ef88c") (:authors ("Frédéric Bour <frederic.bour(_)lakaban.net>")) (:maintainer "Frédéric Bour <frederic.bour(_)lakaban.net>") (:keywords "ocaml" "languages") (:url . "https://github.com/ocaml/merlin"))])
|
||||
(merlin-ac . [(20210409 1323) ((emacs (25 1)) (merlin (3)) (auto-complete (1 5))) "Merlin and auto-complete integration." single ((:commit . "fe7380bb13ff91f8ed5cfbfea6a6ca01ee1ef88c") (:authors ("Simon Castellan <simon.castellan(_)iuwt.fr>") ("Frédéric Bour <frederic.bour(_)lakaban.net>") ("Thomas Refis <thomas.refis(_)gmail.com>")) (:maintainer "Simon Castellan <simon.castellan(_)iuwt.fr>") (:keywords "ocaml" "languages") (:url . "http://github.com/ocaml/merlin"))])
|
||||
(merlin-company . [(20210409 1323) ((emacs (25 1)) (merlin (3)) (company (0 9))) "Merlin and company mode integration." single ((:commit . "fe7380bb13ff91f8ed5cfbfea6a6ca01ee1ef88c") (:authors ("Simon Castellan <simon.castellan(_)iuwt.fr>") ("Frédéric Bour <frederic.bour(_)lakaban.net>") ("Thomas Refis <thomas.refis(_)gmail.com>")) (:maintainer "Simon Castellan <simon.castellan(_)iuwt.fr>") (:keywords "ocaml" "languages") (:url . "http://github.com/ocaml/merlin"))])
|
||||
(merlin . [(20210408 1014) ((emacs (25 1))) "Mode for Merlin, an assistant for OCaml" tar ((:commit . "635923da0771cc0cb7154d3fc58e348e9148766d") (:authors ("Frédéric Bour <frederic.bour(_)lakaban.net>")) (:maintainer "Frédéric Bour <frederic.bour(_)lakaban.net>") (:keywords "ocaml" "languages") (:url . "https://github.com/ocaml/merlin"))])
|
||||
(merlin-ac . [(20210409 1323) ((emacs (25 1)) (merlin (3)) (auto-complete (1 5))) "Merlin and auto-complete integration." single ((:commit . "635923da0771cc0cb7154d3fc58e348e9148766d") (:authors ("Simon Castellan <simon.castellan(_)iuwt.fr>") ("Frédéric Bour <frederic.bour(_)lakaban.net>") ("Thomas Refis <thomas.refis(_)gmail.com>")) (:maintainer "Simon Castellan <simon.castellan(_)iuwt.fr>") (:keywords "ocaml" "languages") (:url . "http://github.com/ocaml/merlin"))])
|
||||
(merlin-company . [(20210409 1323) ((emacs (25 1)) (merlin (3)) (company (0 9))) "Merlin and company mode integration." single ((:commit . "635923da0771cc0cb7154d3fc58e348e9148766d") (:authors ("Simon Castellan <simon.castellan(_)iuwt.fr>") ("Frédéric Bour <frederic.bour(_)lakaban.net>") ("Thomas Refis <thomas.refis(_)gmail.com>")) (:maintainer "Simon Castellan <simon.castellan(_)iuwt.fr>") (:keywords "ocaml" "languages") (:url . "http://github.com/ocaml/merlin"))])
|
||||
(merlin-eldoc . [(20190830 517) ((emacs (24 4)) (merlin (3 0))) "eldoc for OCaml and Reason" single ((:commit . "db7fab1eddfe34781b7e79694f8923b285698032") (:authors ("Louis Roché" . "louis@louisroche.net")) (:maintainer "Louis Roché" . "louis@louisroche.net") (:keywords "merlin" "ocaml" "languages" "eldoc") (:url . "https://github.com/khady/merlin-eldoc"))])
|
||||
(merlin-iedit . [(20210409 1323) ((emacs (25 1)) (merlin (3)) (iedit (0 9))) "Merlin and iedit integration." single ((:commit . "fe7380bb13ff91f8ed5cfbfea6a6ca01ee1ef88c") (:authors ("Simon Castellan <simon.castellan(_)iuwt.fr>") ("Frédéric Bour <frederic.bour(_)lakaban.net>") ("Thomas Refis <thomas.refis(_)gmail.com>")) (:maintainer "Simon Castellan <simon.castellan(_)iuwt.fr>") (:keywords "ocaml" "languages") (:url . "http://github.com/ocaml/merlin"))])
|
||||
(merlin-iedit . [(20210409 1323) ((emacs (25 1)) (merlin (3)) (iedit (0 9))) "Merlin and iedit integration." single ((:commit . "635923da0771cc0cb7154d3fc58e348e9148766d") (:authors ("Simon Castellan <simon.castellan(_)iuwt.fr>") ("Frédéric Bour <frederic.bour(_)lakaban.net>") ("Thomas Refis <thomas.refis(_)gmail.com>")) (:maintainer "Simon Castellan <simon.castellan(_)iuwt.fr>") (:keywords "ocaml" "languages") (:url . "http://github.com/ocaml/merlin"))])
|
||||
(mermaid-mode . [(20210329 2328) ((f (0 20 0)) (emacs (25 3))) "major mode for working with mermaid graphs" single ((:commit . "b650649a9f28629154a041ef187c21c5128530f2") (:authors ("Adrien Brochard")) (:maintainer "Adrien Brochard") (:keywords "mermaid" "graphs" "tools" "processes") (:url . "https://github.com/abrochard/mermaid-mode"))])
|
||||
(meson-mode . [(20210321 1136) ((emacs (26 1))) "Major mode for the Meson build system files" tar ((:commit . "88717d5256d4cf47a85756dc5e204ea23eec165d") (:authors ("Michal Sojka" . "sojkam1@fel.cvut.cz")) (:maintainer "Michal Sojka" . "sojkam1@fel.cvut.cz") (:keywords "languages" "tools") (:url . "https://github.com/wentasah/meson-mode"))])
|
||||
(message-attachment-reminder . [(20200428 124) ((emacs (24 1))) "Remind if missing attachment" single ((:commit . "ce506b27b15cc39a47c58ff795026eaea8632e2f") (:authors ("Alex Murray" . "murray.alex@gmail.com")) (:maintainer "Alex Murray" . "murray.alex@gmail.com") (:url . "https://github.com/alexmurray/message-attachment-reminder"))])
|
||||
|
@ -2879,7 +2879,7 @@
|
|||
(mew . [(20210131 740) nil "Messaging in the Emacs World" tar ((:commit . "8c6bc6bf9562beb74b3b4fda47b2fe473139eb1c") (:authors ("Kazu Yamamoto" . "Kazu@Mew.org")) (:maintainer "Kazu Yamamoto" . "Kazu@Mew.org"))])
|
||||
(mexican-holidays . [(20200622 132) nil "Mexico holidays for Emacs calendar." single ((:commit . "5b5dd6e71505e8938bac9e9733b30bd394631923") (:authors ("Saúl Gutiérrez" . "me@sggc.me")) (:maintainer "Saúl Gutiérrez" . "me@sggc.me") (:keywords "calendar") (:url . "https://github.com/shopClerk/mexican-holidays"))])
|
||||
(meyvn . [(20210130 2016) ((emacs (25 1)) (cider (0 23)) (projectile (2 1)) (s (1 12)) (dash (2 17)) (parseedn (0 1 0)) (geiser (0 12))) "Meyvn client" single ((:commit . "a49731f39020b7c7626ba12e4c7b2f1c17a69341") (:authors ("Daniel Szmulewicz" . "daniel.szmulewicz@gmail.com")) (:maintainer "Daniel Szmulewicz" . "daniel.szmulewicz@gmail.com") (:url . "https://github.com/danielsz/meyvn-el"))])
|
||||
(mgmtconfig-mode . [(20200104 108) ((emacs (24 3))) "mgmt configuration management language" single ((:commit . "76ede10e0a0433d8aae6b3b4e132ca9dcce5ca75") (:keywords "languages") (:authors ("Peter Oliver" . "mgmtconfig@mavit.org.uk")) (:maintainer "Mgmt contributors <https://github.com/purpleidea/mgmt>") (:url . "https://github.com/purpleidea/mgmt/misc/emacs"))])
|
||||
(mgmtconfig-mode . [(20210131 2152) ((emacs (24 3))) "mgmt configuration management language" single ((:commit . "48fa796ab1669dc275b8c99238fff6c83ad2fcc6") (:authors ("Peter Oliver" . "mgmtconfig@mavit.org.uk")) (:maintainer "Mgmt contributors <https://github.com/purpleidea/mgmt>") (:keywords "languages") (:url . "https://github.com/purpleidea/mgmt/misc/emacs"))])
|
||||
(mhc . [(20201227 406) ((calfw (20150703))) "Message Harmonized Calendaring system." tar ((:commit . "1cd9cbc7f8cfe40833d1af726644ae45a3d07dc0") (:authors ("Yoshinari Nomura" . "nom@quickhack.net")) (:maintainer "Yoshinari Nomura" . "nom@quickhack.net") (:keywords "calendar") (:url . "http://www.quickhack.net/mhc"))])
|
||||
(mic-paren . [(20170731 1907) nil "advanced highlighting of matching parentheses" single ((:commit . "d0410c7d805c9aaf51a1bcefaaef092bed5824c4") (:authors ("Mikael Sjödin" . "mic@docs.uu.se") ("Klaus Berndl " . "berndl@sdm.de") ("Jonathan Kotta" . "jpkotta@gmail.com")) (:maintainer "ttn") (:keywords "languages" "faces" "parenthesis" "matching"))])
|
||||
(micgoline . [(20160415 326) ((emacs (24 3)) (powerline (2 3))) "powerline mode, color schemes from microsoft and google's logo." single ((:commit . "837504263bb1711203b0f7efecd6b7b5f272fae0") (:authors ("yzprofile" . "yzprofiles@gmail.com")) (:maintainer "yzprofile" . "yzprofiles@gmail.com") (:keywords "mode-line" "powerline" "theme") (:url . "https://github.com/yzprofile/micgoline"))])
|
||||
|
@ -2927,7 +2927,7 @@
|
|||
(modern-sh . [(20200904 1838) ((emacs (25 1)) (hydra (0 15 0)) (eval-in-repl (0 9 7))) "Minor mode for editing shell script" single ((:commit . "05430398a5070245c4358e6a1b7e49a154da174e") (:keywords "languages" "programming") (:url . "https://github.com/damon-kwok/modern-sh"))])
|
||||
(modtime-skip-mode . [(20140128 2201) nil "Minor mode for disabling modtime and supersession checks on files." single ((:commit . "c0e49523aa26b2263a8693691ac775988015f592") (:authors ("Jordon Biondo" . "biondoj@mail.gvsu.edu")) (:maintainer "Jordon Biondo" . "biondoj@mail.gvsu.edu") (:url . "http://www.github.com/jordonbiondo/modtime-skip-mode"))])
|
||||
(modular-config . [(20200824 442) ((emacs (24 3))) "Organize your config into small and loadable modules" single ((:commit . "c0a6d3dac1aa176deb8417c77dfeac06e9f18e1f") (:authors ("Sidharth Arya" . "sidhartharya10@gmail.com")) (:maintainer "Sidharth Arya" . "sidhartharya10@gmail.com") (:keywords "startup" "lisp" "tools") (:url . "https://github.com/SidharthArya/modular-config.el"))])
|
||||
(modus-themes . [(20210412 616) ((emacs (26 1))) "Highly accessible themes (WCAG AAA)" tar ((:commit . "13023de5c621b821206e49a3e88f884e6e28e098") (:authors ("Protesilaos Stavrou" . "info@protesilaos.com")) (:maintainer "Protesilaos Stavrou" . "info@protesilaos.com") (:keywords "faces" "theme" "accessibility") (:url . "https://gitlab.com/protesilaos/modus-themes"))])
|
||||
(modus-themes . [(20210414 1025) ((emacs (26 1))) "Highly accessible themes (WCAG AAA)" tar ((:commit . "eba0ca9ce2bc2014669a55231136a01e015098da") (:authors ("Protesilaos Stavrou" . "info@protesilaos.com")) (:maintainer "Protesilaos Stavrou" . "info@protesilaos.com") (:keywords "faces" "theme" "accessibility") (:url . "https://gitlab.com/protesilaos/modus-themes"))])
|
||||
(moe-theme . [(20210308 1053) nil "A colorful eye-candy theme. Moe, moe, kyun!" tar ((:commit . "b23975ba57a68f69551424552f484227db8a7b97") (:authors ("kuanyui" . "azazabc123@gmail.com")) (:maintainer "kuanyui" . "azazabc123@gmail.com") (:keywords "themes") (:url . "https://github.com/kuanyui/moe-theme.el"))])
|
||||
(molar-mass . [(20210324 1832) ((emacs (24 3))) "Calculates molar mass of a molecule" single ((:commit . "5b7d1d0004d27580e980fe8532658cd09174342e") (:authors ("Sergi Ruiz Trepat")) (:maintainer "Sergi Ruiz Trepat") (:keywords "convenience" "chemistry") (:url . "https://github.com/sergiruiztrepat/molar-mass.el"))])
|
||||
(molecule . [(20180527 743) ((emacs (25 1))) "Simple wrapper for molecule" single ((:commit . "2ef72b81d9aa24ea782b71a061a3abdad6cae162") (:authors (": drymer <drymer [ AT ] autistici.org>")) (:maintainer ": drymer <drymer [ AT ] autistici.org>") (:keywords ":" "languages" "terminals") (:url . "https://git.daemons.it/drymer/molecule.el"))])
|
||||
|
@ -3147,7 +3147,7 @@
|
|||
(ob-elixir . [(20170725 1419) ((org (8))) "org-babel functions for elixir evaluation" single ((:commit . "8990a8178b2f7bd93504a9ab136622aab6e82e32") (:authors ("ZHOU Feng" . "zf.pascal@gmail.com")) (:maintainer "ZHOU Feng" . "zf.pascal@gmail.com") (:keywords "org" "babel" "elixir") (:url . "http://github.com/zweifisch/ob-elixir"))])
|
||||
(ob-elm . [(20200528 1857) ((emacs (26 1)) (org (9 3))) "Org-babel functions for elm evaluation" single ((:commit . "d3a9fbc2f56416894c9aed65ea9a20cc1d98f15d") (:authors ("Bonface M. K.")) (:maintainer "Bonface M. K.") (:keywords "languages" "tools") (:url . "https://www.bonfacemunyoki.com"))])
|
||||
(ob-elvish . [(20180427 1900) nil "org-babel functions for Elvish shell" single ((:commit . "369181ceae1190bf971c71aebf9fc6133bd98c39") (:authors ("Diego Zamboni" . "diego@zzamboni.org")) (:maintainer "Diego Zamboni" . "diego@zzamboni.org") (:keywords "literate programming" "elvish" "shell" "languages" "processes" "tools") (:url . "https://github.com/zzamboni/ob-elvish"))])
|
||||
(ob-ess-julia . [(20201109 911) ((ess (20201004 1522)) (julia-mode (0 4))) "Org babel support for Julia language" tar ((:commit . "b97ebf19c3d68ff946584e78ab7943f8a691ebe5") (:authors ("Frédéric Santos")) (:maintainer "Frédéric Santos") (:keywords "languages") (:url . "https://github.com/frederic-santos/ob-ess-julia"))])
|
||||
(ob-ess-julia . [(20210414 1444) ((ess (20201004 1522)) (julia-mode (0 4))) "Org babel support for Julia language" tar ((:commit . "147e9e7fe55c41dd77171417e92af40db3530b84") (:authors ("Frédéric Santos")) (:maintainer "Frédéric Santos") (:keywords "languages") (:url . "https://github.com/frederic-santos/ob-ess-julia"))])
|
||||
(ob-fsharp . [(20170618 1429) ((emacs (25)) (fsharp-mode (1 9 8))) "Org-Babel F#" single ((:commit . "0b2fdd9bb4f38af8b5cf4914627af52f5b43d9f7") (:authors ("Jürgen Hötzel" . "juergen@archlinux.org")) (:maintainer "Jürgen Hötzel" . "juergen@archlinux.org") (:keywords "literate programming" "reproducible research") (:url . "https://github.com/juergenhoetzel/ob-fsharp"))])
|
||||
(ob-go . [(20190201 2040) nil "org-babel functions for go evaluation" tar ((:commit . "2067ed55f4c1d33a43cb3f6948609d240a8915f5") (:authors ("K. Adam Christensen")) (:maintainer "K. Adam Christensen") (:keywords "golang" "go" "literate programming" "reproducible research") (:url . "http://orgmode.org"))])
|
||||
(ob-graphql . [(20201222 1515) ((emacs (24 4)) (graphql-mode (20191024 1221)) (request (0 3 2))) "Org-Babel execution backend for GraphQL source blocks" single ((:commit . "7c35419f9eec5dc44967cbcfa13c7135b9a96bfc") (:authors ("Jeremy Dormitzer" . "jeremy.dormitzer@gmail.com")) (:maintainer "Jeremy Dormitzer" . "jeremy.dormitzer@gmail.com") (:url . "https://github.com/jdormit/ob-graphql"))])
|
||||
|
@ -3659,7 +3659,7 @@
|
|||
(poly-ruby . [(20180905 929) ((emacs (25)) (polymode (0 1 2))) "Provides poly-ruby-mode" single ((:commit . "794ebb926ace23e9c1398da934701951432dcea2") (:authors ("Akinori MUSHA" . "knu@iDaemons.org")) (:maintainer "Akinori MUSHA" . "knu@iDaemons.org") (:keywords "languages") (:url . "https://github.com/knu/poly-ruby.el"))])
|
||||
(poly-slim . [(20200316 1316) ((emacs (25)) (polymode (0 2 2)) (slim-mode (1 1))) "Polymodes for slim" single ((:commit . "9e9b5164c68955974fd5f5d220aec5af9b5ba3ae") (:authors ("Siavash Sajjadi and Vitalie Spinu")) (:maintainer "Vitalie Spinu") (:keywords "emacs") (:url . "https://github.com/polymode/poly-slim"))])
|
||||
(poly-wdl . [(20190712 529) ((emacs (25)) (polymode (0 2)) (wdl-mode (20170709))) "Polymode for WDL" single ((:commit . "963faa828d15d49cee5a63f619c3c30e162c2d0f") (:authors ("Jean Monlong" . "jean.monlong@gmail.com")) (:maintainer "Jean Monlong" . "jean.monlong@gmail.com") (:keywords "languages") (:url . "https://github.com/jmonlong/poly-wdl"))])
|
||||
(polymode . [(20210413 738) ((emacs (25))) "Extensible framework for multiple major modes" tar ((:commit . "7d0c30c2a9f9c32a13d19299f1c2cf1f1a619da8") (:authors ("Vitalie Spinu")) (:maintainer "Vitalie Spinu") (:keywords "languages" "multi-modes" "processes") (:url . "https://github.com/polymode/polymode"))])
|
||||
(polymode . [(20210413 2004) ((emacs (25))) "Extensible framework for multiple major modes" tar ((:commit . "b50ec54097d279bde6567ee3ba8a22471f466ec0") (:authors ("Vitalie Spinu")) (:maintainer "Vitalie Spinu") (:keywords "languages" "multi-modes" "processes") (:url . "https://github.com/polymode/polymode"))])
|
||||
(pomidor . [(20210111 919) ((emacs (24 3)) (alert (1 2)) (dash (2 17 0))) "Simple and cool pomodoro timer" tar ((:commit . "52134701fa76b12252b06c9d6fd4e8665596a95a") (:authors ("TatriX" . "tatrics@gmail.com")) (:maintainer "TatriX" . "tatrics@gmail.com") (:keywords "tools" "time" "applications" "pomodoro technique") (:url . "https://github.com/TatriX/pomidor"))])
|
||||
(pomodoro . [(20210225 2018) nil "A timer for the Pomodoro Technique" single ((:commit . "ed888b24d0b89a5dec6f5278b1064c530c827321") (:authors ("David Kerschner" . "dkerschner@gmail.com")) (:maintainer "David Kerschner" . "dkerschner@gmail.com"))])
|
||||
(pony-mode . [(20170807 1522) nil "Minor mode for working with Django Projects" tar ((:commit . "760684d30b6c234d1b88c9a4673a808f36f7f341") (:authors ("David Miller" . "david@deadpansincerity.com")) (:maintainer "David Miller" . "david@deadpansincerity.com") (:keywords "python" "django") (:url . "https://github.com/davidmiller/pony-mode"))])
|
||||
|
@ -3855,7 +3855,7 @@
|
|||
(read-aloud . [(20160923 500) ((emacs (24 4))) "A simple interface to TTS engines" single ((:commit . "c662366226abfb07204ab442b4f853ed85438d8a") (:authors ("Alexander Gromnitsky" . "alexander.gromnitsky@gmail.com")) (:maintainer "Alexander Gromnitsky" . "alexander.gromnitsky@gmail.com") (:keywords "multimedia") (:url . "https://github.com/gromnitsky/read-aloud.el"))])
|
||||
(readline-complete . [(20150708 1437) nil "offers completions in shell mode" single ((:commit . "30c020c37b2741160cc37e656e13c85d826a0ebf") (:authors ("Christopher Monsanto" . "chris@monsan.to")) (:maintainer "Christopher Monsanto" . "chris@monsan.to"))])
|
||||
(real-auto-save . [(20200505 1537) ((emacs (24 4))) "Automatically save your buffers/files at regular intervals" single ((:commit . "481a2d1460ab5a9b6df3721dda76ad515923bfd1") (:authors ("Chaoji Li <lichaoji AT gmail DOT com>") ("Anand Reddy Pandikunta <anand21nanda AT gmail DOT com>")) (:maintainer "Chaoji Li <lichaoji AT gmail DOT com>") (:url . "https://github.com/ChillarAnand/real-auto-save"))])
|
||||
(realgud . [(20210411 1241) ((load-relative (1 3 1)) (loc-changes (1 2)) (test-simple (1 3 0)) (emacs (25))) "A modular front-end for interacting with external debuggers" tar ((:commit . "a854b8d4344e4606e77c7e73cc414991e53253d5") (:authors ("Rocky Bernstein" . "rocky@gnu.org")) (:maintainer "Rocky Bernstein" . "rocky@gnu.org") (:keywords "debugger" "gdb" "python" "perl" "go" "bash" "zsh" "bashdb" "zshdb" "remake" "trepan" "perldb" "pdb") (:url . "https://github.com/realgud/realgud/"))])
|
||||
(realgud . [(20210414 235) ((load-relative (1 3 1)) (loc-changes (1 2)) (test-simple (1 3 0)) (emacs (25))) "A modular front-end for interacting with external debuggers" tar ((:commit . "219175e9698d9550a1202be746ba0500f79ddd25") (:authors ("Rocky Bernstein" . "rocky@gnu.org")) (:maintainer "Rocky Bernstein" . "rocky@gnu.org") (:keywords "debugger" "gdb" "python" "perl" "go" "bash" "zsh" "bashdb" "zshdb" "remake" "trepan" "perldb" "pdb") (:url . "https://github.com/realgud/realgud/"))])
|
||||
(realgud-byebug . [(20190520 1140) ((realgud (1 4 5)) (load-relative (1 2)) (cl-lib (0 5)) (emacs (24))) "Realgud front-end to the Ruby byebug debugger" tar ((:commit . "f8f20b92c6b13f75cc9797921c0e28d3def48b1c") (:authors ("Rocky Bernstein")) (:maintainer "Rocky Bernstein") (:url . "http://github.com/rocky/realgud-byebug"))])
|
||||
(realgud-ipdb . [(20200722 1116) ((realgud (1 5 0)) (load-relative (1 3 1)) (emacs (25))) "Realgud front-end to ipdb" tar ((:commit . "f18f907aa4ddd3e59dc19ca296d4ee2dc5e436b0") (:authors ("Rocky Bernstein" . "rocky@gnu.org")) (:maintainer "Rocky Bernstein" . "rocky@gnu.org") (:url . "https://github.com/realgud/realgud-ipdb"))])
|
||||
(realgud-jdb . [(20200722 1120) ((realgud (1 5 0)) (load-relative (1 3 1)) (emacs (25))) "Realgud front-end to Java's jdb debugger\"" tar ((:commit . "1c183b2f8aae0de60942ea01444b896bf182c66a") (:authors ("Rocky Bernstein" . "rocky@gnu.org")) (:maintainer "Rocky Bernstein" . "rocky@gnu.org") (:url . "https://github.com/realgud/realgud-jdb"))])
|
||||
|
@ -3948,7 +3948,7 @@
|
|||
(rivet-mode . [(20201013 1905) ((emacs (24)) (web-mode (16))) "A minor mode for editing Apache Rivet files" single ((:commit . "3dd4fc28f29e4d4f43a881ed5816dea41a912419") (:authors ("Jade Michael Thornton")) (:maintainer "Jade Michael Thornton") (:url . "https://gitlab.com/thornjad/rivet-mode"))])
|
||||
(rjsx-mode . [(20200120 1446) ((emacs (24 4)) (js2-mode (20170504))) "Real support for JSX" single ((:commit . "b697fe4d92cc84fa99a7bcb476f815935ea0d919") (:authors ("Felipe Ochoa" . "felipe@fov.space")) (:maintainer "Felipe Ochoa" . "felipe@fov.space") (:keywords "languages") (:url . "https://github.com/felipeochoa/rjsx-mode/"))])
|
||||
(rmsbolt . [(20191218 257) ((emacs (25 1))) "A compiler output viewer" tar ((:commit . "2bc1afe528b70b8aad4243a3b2b72bcf09a599e1") (:authors ("Jay Kamat" . "jaygkamat@gmail.com")) (:maintainer "Jay Kamat" . "jaygkamat@gmail.com") (:keywords "compilation" "tools") (:url . "http://gitlab.com/jgkamat/rmsbolt"))])
|
||||
(robe . [(20210328 1228) ((inf-ruby (2 5 1)) (emacs (24 4))) "Code navigation, documentation lookup and completion for Ruby" tar ((:commit . "0bc2645d140f65215a42f2b9365f1983cc949c6c") (:authors ("Dmitry Gutov")) (:maintainer "Dmitry Gutov") (:keywords "ruby" "convenience" "rails") (:url . "https://github.com/dgutov/robe"))])
|
||||
(robe . [(20210413 2202) ((inf-ruby (2 5 1)) (emacs (24 4))) "Code navigation, documentation lookup and completion for Ruby" tar ((:commit . "dcde67f020d0efff35b6db9863e4687c08f1b421") (:authors ("Dmitry Gutov")) (:maintainer "Dmitry Gutov") (:keywords "ruby" "convenience" "rails") (:url . "https://github.com/dgutov/robe"))])
|
||||
(robot-mode . [(20201208 1959) ((emacs (26 1))) "Major-mode for Robot Framework files" single ((:commit . "e8ca45ea811a4c6758fa1a086d8f89b8812653ca") (:authors ("Kalle Kankare" . "kalle.kankare@iki.fi")) (:maintainer "Kalle Kankare" . "kalle.kankare@iki.fi") (:keywords "languages" "files") (:url . "https://github.com/kopoli/robot-mode"))])
|
||||
(robots-txt-mode . [(20190812 1858) nil "Major mode for editing robots.txt" single ((:commit . "8bf67285a25a6756607354d184e36583f2847e7d") (:authors ("USAMI Kenta" . "tadsan@zonu.me")) (:maintainer "USAMI Kenta" . "tadsan@zonu.me") (:keywords "languages" "comm" "web") (:url . "https://github.com/emacs-php/robots-txt-mode"))])
|
||||
(roguel-ike . [(20160120 302) ((popup (0 5 0))) "A coffee-break roguelike" tar ((:commit . "706dcb0687e8016d7d776f9d9e5ace9fdbbca43c") (:authors ("Steven Rémot")) (:maintainer "Steven Rémot"))])
|
||||
|
@ -3986,7 +3986,7 @@
|
|||
(rust-auto-use . [(20200608 1359) nil "Utility to automatically insert Rust use statements" single ((:commit . "d5205f7b9b9eae0f7d0893f87d3391464719f9c0") (:authors ("Rotem Yaari" . "rotemy@MBP.local")) (:maintainer "Rotem Yaari" . "rotemy@MBP.local") (:keywords "languages"))])
|
||||
(rust-mode . [(20210226 1106) ((emacs (25 1))) "A major emacs mode for editing Rust source code" single ((:commit . "e9e9e32c4f82a9b895543c120b327ab5536ec42b") (:authors ("Mozilla")) (:maintainer "Mozilla") (:keywords "languages") (:url . "https://github.com/rust-lang/rust-mode"))])
|
||||
(rust-playground . [(20200116 1043) ((emacs (24 3))) "Local Rust playground for short code snippets." single ((:commit . "5a117781dcb66065bea7830dd73618008fc34949") (:authors ("Alexander I.Grafov" . "grafov@gmail.com")) (:maintainer "Alexander I.Grafov" . "grafov@gmail.com") (:keywords "tools" "rust") (:url . "https://github.com/grafov/rust-playground"))])
|
||||
(rustic . [(20210413 1105) ((emacs (26 1)) (xterm-color (1 6)) (dash (2 13 0)) (s (1 10 0)) (f (0 18 2)) (markdown-mode (2 3)) (spinner (1 7 3)) (let-alist (1 0 4)) (seq (2 3)) (ht (2 0)) (project (0 3 0))) "Rust development environment" tar ((:commit . "7b0eba4b1de3f3c3392d3bb5ef5164fd4d45b80e") (:authors ("Mozilla")) (:maintainer "Mozilla") (:keywords "languages"))])
|
||||
(rustic . [(20210414 856) ((emacs (26 1)) (xterm-color (1 6)) (dash (2 13 0)) (s (1 10 0)) (f (0 18 2)) (markdown-mode (2 3)) (spinner (1 7 3)) (let-alist (1 0 4)) (seq (2 3)) (ht (2 0)) (project (0 3 0))) "Rust development environment" tar ((:commit . "c66086fa49d983a49758598b33f6e1585b3d6c74") (:authors ("Mozilla")) (:maintainer "Mozilla") (:keywords "languages"))])
|
||||
(rvm . [(20201222 17) nil "Emacs integration for rvm" single ((:commit . "c1f2642434b0f68d9baa0687127079ecd884ba12") (:authors ("Yves Senn" . "yves.senn@gmx.ch")) (:maintainer "Yves Senn" . "yves.senn@gmx.ch") (:keywords "ruby" "rvm") (:url . "http://www.emacswiki.org/emacs/RvmEl"))])
|
||||
(ryo-modal . [(20201117 1903) ((emacs (25 1))) "Roll your own modal mode" single ((:commit . "f14479e277ac7db75bf6756e0589941f84fdd749") (:authors ("Erik Sjöstrand" . "sjostrand.erik@gmail.com")) (:maintainer "Erik Sjöstrand" . "sjostrand.erik@gmail.com") (:keywords "convenience" "modal" "keys") (:url . "http://github.com/Kungsgeten/ryo-modal"))])
|
||||
(s . [(20180406 808) nil "The long lost Emacs string manipulation library." single ((:commit . "3a5166c81ac9e50eaccf5490c5c632f93452287e") (:authors ("Magnar Sveen" . "magnars@gmail.com")) (:maintainer "Magnar Sveen" . "magnars@gmail.com") (:keywords "strings"))])
|
||||
|
@ -4008,9 +4008,9 @@
|
|||
(say-what-im-doing . [(20160706 1931) nil "dictate what you're doing with text to speech" single ((:commit . "5b2ce6783b02805bcac1107a149bfba3852cd9d5") (:authors ("Benaiah Mischenko")) (:maintainer "Benaiah Mischenko") (:keywords "text to speech" "dumb" "funny") (:url . "http://github.com/benaiah/say-what-im-doing"))])
|
||||
(sayid . [(20200902 703) ((cider (0 21 0))) "sayid nREPL middleware client" single ((:commit . "27f35778de9509067716a7bed14306787334a589") (:authors ("Bill Piel" . "bill@billpiel.com")) (:maintainer "Bill Piel" . "bill@billpiel.com") (:url . "https://github.com/clojure-emacs/sayid"))])
|
||||
(sbt-mode . [(20210409 1528) ((emacs (24 4))) "Interactive support for sbt projects" tar ((:commit . "9a6a8e47b657adeada41c445c9fcda301dbdb9b3") (:keywords "languages") (:url . "https://github.com/hvesalai/emacs-sbt-mode"))])
|
||||
(scad-mode . [(20200830 301) nil "A major mode for editing OpenSCAD code" single ((:commit . "5078c5c5e22f509338d20b7ae448b2bbe02e08f9") (:authors ("Len Trigg, Łukasz Stelmach")) (:maintainer "Len Trigg" . "lenbok@gmail.com") (:keywords "languages") (:url . "https://raw.github.com/openscad/openscad/master/contrib/scad-mode.el"))])
|
||||
(scad-mode . [(20200830 301) nil "A major mode for editing OpenSCAD code" single ((:commit . "d1c445d4c74272abd17c5e52af460dbd249b1d4a") (:authors ("Len Trigg, Łukasz Stelmach")) (:maintainer "Len Trigg" . "lenbok@gmail.com") (:keywords "languages") (:url . "https://raw.github.com/openscad/openscad/master/contrib/scad-mode.el"))])
|
||||
(scad-preview . [(20210306 426) ((scad-mode (91 0)) (emacs (24 4))) "Preview SCAD models in real-time within Emacs" single ((:commit . "8b2e7feb722ab2bde1ce050fe040f72ae0b05cad") (:authors ("zk_phi")) (:maintainer "zk_phi") (:url . "http://zk-phi.gitub.io/"))])
|
||||
(scala-mode . [(20210409 1441) nil "Major mode for editing Scala" tar ((:commit . "6966328dbfcbd1dfb166ff46e5deb9a68379cdf1") (:keywords "languages") (:url . "https://github.com/hvesalai/emacs-scala-mode"))])
|
||||
(scala-mode . [(20210414 1126) nil "Major mode for editing Scala" tar ((:commit . "598cb680f321d9609295aa9b4679040cc703b602") (:keywords "languages") (:url . "https://github.com/hvesalai/emacs-scala-mode"))])
|
||||
(scalariform . [(20190114 215) ((s (1 12 0)) (f (0 20 0))) "Format Scala code with scalariform." single ((:commit . "478a15ccb4f825aba73262bccd3e61ce7017f64b") (:authors ("zwild" . "judezhao@outlook.com")) (:maintainer "zwild" . "judezhao@outlook.com") (:keywords "processes" "scala" "scalariform") (:url . "https://github.com/zwild/scalariform"))])
|
||||
(scf-mode . [(20151122 248) nil "shorten file-names in compilation type buffers" single ((:commit . "dbfcdcd89034f208d65e181af58e0d73ad09f8b2") (:authors ("Le Wang")) (:maintainer "Le Wang") (:keywords "compilation") (:url . "https://github.com/lewang/scf-mode"))])
|
||||
(scheme-complete . [(20201112 442) nil "Smart auto completion for Scheme in Emacs" single ((:commit . "b9a1448c4696f117d9ea4e59b6162dc31112e71a") (:authors ("Alex Shinn")) (:maintainer "Alex Shinn"))])
|
||||
|
@ -4030,7 +4030,7 @@
|
|||
(scratches . [(20151006 416) ((dash (2 11 0)) (f (0 17 0))) "Multiple scratches in any language" single ((:commit . "9441afe6396ca38f08029123fab5d87429cbf315") (:authors ("Zhang Kai Yu" . "yeannylam@gmail.com")) (:maintainer "Zhang Kai Yu" . "yeannylam@gmail.com") (:keywords "scratch"))])
|
||||
(scribble-mode . [(20190912 200) ((emacs (24))) "Major mode for editing Scribble documents" single ((:commit . "5c3ea3cc9bbad585476eee41ea76dc056c2012bb") (:authors ("Mario Rodas" . "marsam@users.noreply.github.com")) (:maintainer "Mario Rodas" . "marsam@users.noreply.github.com") (:keywords "convenience") (:url . "https://github.com/emacs-pe/scribble-mode"))])
|
||||
(scroll-on-drag . [(20201013 123) ((emacs (26 2))) "Interactive scrolling" single ((:commit . "ad94790492d0d66686f3457cea1caeba8bbbdc51") (:authors ("Campbell Barton" . "ideasman42@gmail.com")) (:maintainer "Campbell Barton" . "ideasman42@gmail.com") (:url . "https://gitlab.com/ideasman42/emacs-scroll-on-drag"))])
|
||||
(scroll-on-jump . [(20210103 2120) ((emacs (26 2))) "Scroll when jumping to a new point" single ((:commit . "69c86542a148222a7571506a2515fc52529d209d") (:authors ("Campbell Barton" . "ideasman42@gmail.com")) (:maintainer "Campbell Barton" . "ideasman42@gmail.com") (:url . "https://gitlab.com/ideasman42/emacs-scroll-on-jump"))])
|
||||
(scroll-on-jump . [(20210413 1313) ((emacs (26 2))) "Scroll when jumping to a new point" single ((:commit . "0ce93b3ea64038322927f5bfed90fadd640e19eb") (:authors ("Campbell Barton" . "ideasman42@gmail.com")) (:maintainer "Campbell Barton" . "ideasman42@gmail.com") (:url . "https://gitlab.com/ideasman42/emacs-scroll-on-jump"))])
|
||||
(scrollable-quick-peek . [(20201224 329) ((quick-peek (1 0)) (emacs (24 4))) "Display scrollable overlays" single ((:commit . "3e3492145a61831661d6e97fdcb47b5b66c73287") (:authors ("Pablo Barrantes" . "xjpablobrx@gmail.com")) (:maintainer "Pablo Barrantes" . "xjpablobrx@gmail.com") (:keywords "convenience" "extensions" "help" "tools") (:url . "https://github.com/jpablobr/scrollable-quick-peek"))])
|
||||
(scrollkeeper . [(20190109 629) ((emacs (25 1))) "Custom scrolling commands with visual guidelines" single ((:commit . "3c4ac6b6b44686d31c260ee0b19daaee59bdccd6") (:authors ("Adam Porter" . "adam@alphapapa.net")) (:maintainer "Adam Porter" . "adam@alphapapa.net") (:keywords "convenience") (:url . "https://github.com/alphapapa/scrollkeeper.el"))])
|
||||
(scrooge . [(20180630 1022) ((emacs (24)) (cl-lib (0 5)) (dash (2 13 0)) (thrift (0 9 3))) "Major mode for Twitter Scrooge files" single ((:commit . "0a8c58e9e6708abe4ef7e415bc1e0472318bb1b0") (:authors ("Daniel McClanahan" . "danieldmcclanahan@gmail.com")) (:maintainer "Daniel McClanahan" . "danieldmcclanahan@gmail.com") (:keywords "scrooge" "thrift"))])
|
||||
|
@ -4049,7 +4049,7 @@
|
|||
(select-themes . [(20160221 106) nil "Color theme selection with completing-read" single ((:commit . "236f54287519a3ea6dd7b3992d053e4f4ff5d0fe") (:authors ("Jason Milkins" . "jasonm23@gmail.com")) (:maintainer "Jason Milkins" . "jasonm23@gmail.com") (:url . "https://github.com/jasonm23/emacs-select-themes"))])
|
||||
(selected . [(20200528 606) nil "Keymap for when region is active" single ((:commit . "3043fd2609f7e71d809763ae6e8dd4b6c904e63d") (:authors ("Erik Sjöstrand")) (:maintainer "Erik Sjöstrand") (:keywords "convenience") (:url . "http://github.com/Kungsgeten/selected.el"))])
|
||||
(selectric-mode . [(20200209 2107) nil "IBM Selectric mode for Emacs" tar ((:commit . "1840de71f7414b7cd6ce425747c8e26a413233aa") (:authors ("Ricardo Bánffy" . "rbanffy@gmail.com")) (:maintainer "Ricardo Banffy" . "rbanffy@gmail.com") (:keywords "multimedia" "convenience" "typewriter" "selectric") (:url . "https://github.com/rbanffy/selectric-mode"))])
|
||||
(selectrum . [(20210413 803) ((emacs (26 1))) "Easily select item from list" single ((:commit . "13b71b4c34bdeaf39b5e33a7a81d33c5ec13c13a") (:authors ("Radon Rosborough" . "radon.neon@gmail.com")) (:maintainer "Radon Rosborough" . "radon.neon@gmail.com") (:keywords "extensions") (:url . "https://github.com/raxod502/selectrum"))])
|
||||
(selectrum . [(20210413 803) ((emacs (26 1))) "Easily select item from list" single ((:commit . "d01718e9bbdf385205fb9c713caa64864f249392") (:authors ("Radon Rosborough" . "radon.neon@gmail.com")) (:maintainer "Radon Rosborough" . "radon.neon@gmail.com") (:keywords "extensions") (:url . "https://github.com/raxod502/selectrum"))])
|
||||
(selectrum-prescient . [(20210411 2007) ((emacs (25 1)) (prescient (5 1)) (selectrum (3 1))) "Selectrum integration" single ((:commit . "ed2b762241bbea03e374dc9dcd4fbe207c6b2ea4") (:authors ("Radon Rosborough" . "radon.neon@gmail.com")) (:maintainer "Radon Rosborough" . "radon.neon@gmail.com") (:keywords "extensions") (:url . "https://github.com/raxod502/prescient.el"))])
|
||||
(semaphore . [(20190607 1949) ((emacs (26))) "Semaphore based on condition variables" single ((:commit . "a069b69018b96d284ce7553cd63350a88ea3679c") (:authors ("Herwig Hochleitner" . "herwig@bendlas.net")) (:maintainer "Herwig Hochleitner" . "herwig@bendlas.net") (:keywords "processes" "unix") (:url . "http://github.com/webnf/semaphore.el"))])
|
||||
(semaphore-promise . [(20190607 2115) ((emacs (26)) (semaphore (1)) (promise (1))) "semaphore integration with promise" single ((:commit . "a069b69018b96d284ce7553cd63350a88ea3679c") (:authors ("Herwig Hochleitner" . "herwig@bendlas.net")) (:maintainer "Herwig Hochleitner" . "herwig@bendlas.net") (:keywords "processes" "unix") (:url . "http://github.com/webnf/semaphore.el"))])
|
||||
|
@ -4241,7 +4241,7 @@
|
|||
(sparkline . [(20150101 1319) ((cl-lib (0 3))) "Make sparkline images from a list of numbers" single ((:commit . "a2b5d817d272d6363b67ed8f8cc75499a19fa8d2") (:authors ("Willem Rein Oudshoorn" . "woudshoo@xs4all.nl")) (:maintainer "Willem Rein Oudshoorn" . "woudshoo@xs4all.nl") (:keywords "extensions"))])
|
||||
(sparql-mode . [(20200429 1719) ((cl-lib (0 5)) (emacs (24 3))) "Edit and interactively evaluate SPARQL queries." tar ((:commit . "e8c9345e2e2427282b3dc9cd1e297e3c76d34f7f") (:authors ("Craig Andera <candera at wangdera dot com>")) (:maintainer "Bjarte Johansen <Bjarte dot Johansen at gmail dot com>") (:url . "https://github.com/ljos/sparql-mode"))])
|
||||
(spatial-navigate . [(20201115 1006) ((emacs (26 2))) "Directional navigation between white-space blocks" single ((:commit . "03bf203854f80b6a98a8098e4aed08f585cb1d71") (:authors ("Campbell Barton" . "ideasman42@gmail.com")) (:maintainer "Campbell Barton" . "ideasman42@gmail.com") (:url . "https://gitlab.com/ideasman42/emacs-spatial-navigate"))])
|
||||
(spdx . [(20210306 1600) ((emacs (24 4))) "Insert SPDX license and copyright headers" tar ((:commit . "b9f49bab9551e8ca1232582acffdd0a90aaa35f3") (:authors ("Zhiwei Chen" . "condy0919@gmail.com")) (:maintainer "Zhiwei Chen" . "condy0919@gmail.com") (:keywords "license" "tools") (:url . "https://github.com/condy0919/spdx.el"))])
|
||||
(spdx . [(20210414 1332) ((emacs (24 4))) "Insert SPDX license and copyright headers" tar ((:commit . "4f1e7c565b0f5e0bbf08e53418911a87e31e0f4a") (:authors ("Zhiwei Chen" . "condy0919@gmail.com")) (:maintainer "Zhiwei Chen" . "condy0919@gmail.com") (:keywords "license" "tools") (:url . "https://github.com/condy0919/spdx.el"))])
|
||||
(speech-tagger . [(20170728 1829) ((cl-lib (0 5))) "tag parts of speech using coreNLP" tar ((:commit . "61955b40d4e8b09e66a3e8033e82893f81657c06") (:authors ("Danny McClanahan" . "danieldmcclanahan@gmail.com")) (:maintainer "Danny McClanahan" . "danieldmcclanahan@gmail.com") (:keywords "speech" "tag" "nlp" "language" "corenlp" "parsing" "natural") (:url . "https://github.com/cosmicexplorer/speech-tagger"))])
|
||||
(speechd-el . [(20200706 1236) nil "Client to speech synthesizers and Braille displays." tar ((:commit . "058f91b4d1b0350221218656202ea80cd6827d65"))])
|
||||
(speed-type . [(20191204 1107) ((emacs (24 3)) (cl-lib (0 3))) "Practice touch and speed typing" single ((:commit . "5ef695f7159aa1f20c7c9e55f0c39bcdacce8d21") (:authors ("Gunther Hagleitner")) (:maintainer "Julien Pagès" . "j.parkouss@gmail.com") (:keywords "games") (:url . "https://github.com/parkouss/speed-type"))])
|
||||
|
@ -4344,7 +4344,7 @@
|
|||
(sweetgreen . [(20180605 335) ((dash (2 12 1)) (helm (1 5 6)) (request (0 2 0)) (cl-lib (0 5))) "Order Salads from sweetgreen.com" single ((:commit . "e933fe466b5ef0e976967e203f88bd7a012469d1") (:authors ("Diego Berrocal" . "cestdiego@gmail.com")) (:maintainer "Diego Berrocal" . "cestdiego@gmail.com") (:keywords "salad" "food" "sweetgreen" "request") (:url . "https://www.github.com/CestDiego/sweetgreen.el"))])
|
||||
(swift-helpful . [(20210405 1727) ((emacs (25 1)) (dash (2 12 0)) (lsp-mode (6 0)) (swift-mode (8 0 0))) "Show documentation for Swift programs." tar ((:commit . "ed36ea3d8cd80159f7f90b144c4503411b74ae3e") (:authors ("Daniel Martín" . "mardani29@yahoo.es")) (:maintainer "Daniel Martín" . "mardani29@yahoo.es") (:keywords "help" "swift") (:url . "https://github.com/danielmartin/swift-helpful"))])
|
||||
(swift-mode . [(20210410 723) ((emacs (24 4)) (seq (2 3))) "Major-mode for Apple's Swift programming language" tar ((:commit . "fd3c824c3622aef4ad29983667f34ebad91e9f69") (:keywords "languages" "swift") (:url . "https://github.com/swift-emacs/swift-mode"))])
|
||||
(swift-playground-mode . [(20190730 1707) ((emacs (24 4)) (seq (2 2 0))) "Run Apple's playgrounds in Swift buffers" tar ((:commit . "111cde906508824ee11d774b908df867142a8aec") (:keywords "languages" "swift") (:url . "https://gitlab.com/michael.sanders/swift-playground-mode"))])
|
||||
(swift-playground-mode . [(20190717 2223) ((emacs (24 4)) (seq (2 2 0))) "Run Apple's playgrounds in Swift buffers" tar ((:commit . "111cde906508824ee11d774b908df867142a8aec") (:keywords "languages" "swift") (:url . "https://gitlab.com/michael.sanders/swift-playground-mode"))])
|
||||
(swift3-mode . [(20160918 1250) ((emacs (24 4))) "Major-mode for Apple's Swift programming language." tar ((:commit . "4e51265c6905e17d8910e35b0b37cf51e20ecdfe") (:keywords "languages" "swift") (:url . "https://github.com/taku0/swift3-mode"))])
|
||||
(swiper . [(20210404 1302) ((emacs (24 5)) (ivy (0 13 4))) "Isearch with an overview. Oh, man!" single ((:commit . "471d644d6bdd7d5dc6ca4efb405e6a6389dff245") (:authors ("Oleh Krehel" . "ohwoeowho@gmail.com")) (:maintainer "Oleh Krehel" . "ohwoeowho@gmail.com") (:keywords "matching") (:url . "https://github.com/abo-abo/swiper"))])
|
||||
(swiper-helm . [(20180131 1744) ((emacs (24 1)) (swiper (0 1 0)) (helm (1 5 3))) "Helm version of Swiper." single ((:commit . "93fb6db87bc6a5967898b5fd3286954cc72a0008") (:authors ("Oleh Krehel" . "ohwoeowho@gmail.com")) (:maintainer "Oleh Krehel" . "ohwoeowho@gmail.com") (:keywords "matching") (:url . "https://github.com/abo-abo/swiper-helm"))])
|
||||
|
@ -4447,10 +4447,10 @@
|
|||
(thinks . [(20170802 1128) ((cl-lib (0 5))) "Insert text in a think bubble." single ((:commit . "c02f236abc8c2025d9f01460b09b89ebdc96e28d") (:authors ("Dave Pearson" . "davep@davep.org")) (:maintainer "Dave Pearson" . "davep@davep.org") (:keywords "convenience" "quoting") (:url . "https://github.com/davep/thinks.el"))])
|
||||
(thread-dump . [(20170816 1850) nil "Java thread dump viewer" single ((:commit . "204c9600242756d4b514bb5ff6293e052bf4b49d") (:authors ("Dmitry Neverov")) (:maintainer "Dmitry Neverov") (:url . "http://github.com/nd/thread-dump.el"))])
|
||||
(threes . [(20160820 1242) ((emacs (24)) (seq (1 11))) "A clone of Threes (a tiny puzzle game)" single ((:commit . "6981acb30b856c77cba6aba63fefbf102cbdfbb2") (:authors ("Chunyang Xu" . "xuchunyang.me@gmail.com")) (:maintainer "Chunyang Xu" . "xuchunyang.me@gmail.com") (:keywords "games") (:url . "https://github.com/xuchunyang/threes.el"))])
|
||||
(thrift . [(20200212 1903) ((emacs (24))) "major mode for fbthrift and Apache Thrift files" single ((:commit . "8732809799028fee01cac393c1655578dec6c9cd") (:keywords "languages"))])
|
||||
(thrift . [(20200212 1903) ((emacs (24))) "major mode for fbthrift and Apache Thrift files" single ((:commit . "a85dc6b5b89798c2a0713868dcb5d02eb9bc6a60") (:keywords "languages"))])
|
||||
(thumb-through . [(20120119 534) nil "Plain text reader of HTML documents" single ((:commit . "08d8fb720f93c6172653e035191a8fa9c3305e63") (:keywords "html"))])
|
||||
(tickscript-mode . [(20171219 203) ((emacs (24 1))) "A major mode for Tickscript files" single ((:commit . "f0579f38ff14954df5002ce30ae6d4a2c978d461") (:authors ("Marc Sherry" . "msherry@gmail.com")) (:maintainer "Marc Sherry" . "msherry@gmail.com") (:keywords "languages") (:url . "https://github.com/msherry/tickscript-mode"))])
|
||||
(tidal . [(20210211 1531) ((haskell-mode (16)) (emacs (24))) "Interact with TidalCycles for live coding patterns" single ((:commit . "4f7bbb325631968d6e7b82b25ece810959d4b87f") (:authors (nil . "alex@slab.org")) (:maintainer nil . "alex@slab.org") (:keywords "tools") (:url . "https://github.com/tidalcycles/Tidal"))])
|
||||
(tidal . [(20210211 1531) ((haskell-mode (16)) (emacs (24))) "Interact with TidalCycles for live coding patterns" single ((:commit . "f1b843a9f792d4b87fd316e809c6e8f6fe5f2024") (:authors (nil . "alex@slab.org")) (:maintainer nil . "alex@slab.org") (:keywords "tools") (:url . "https://github.com/tidalcycles/Tidal"))])
|
||||
(tide . [(20210412 1650) ((emacs (25 1)) (dash (2 10 0)) (s (1 11 0)) (flycheck (27)) (typescript-mode (0 1)) (cl-lib (0 5))) "Typescript Interactive Development Environment" tar ((:commit . "ccff099e94beda9f5378ffc2b412cb4257111e8d") (:authors ("Anantha kumaran" . "ananthakumaran@gmail.com")) (:maintainer "Anantha kumaran" . "ananthakumaran@gmail.com") (:keywords "typescript") (:url . "http://github.com/ananthakumaran/tide"))])
|
||||
(tikz . [(20200728 913) ((emacs (24 1))) "A minor mode to edit TikZ pictures" single ((:commit . "f1495516657da6dc2296ffb6c38a3bb4acf118ad") (:authors ("Emilio Torres-Manzanera" . "torres@uniovi.es")) (:maintainer "Emilio Torres-Manzanera" . "torres@uniovi.es") (:keywords "tex") (:url . "https://github.com/emiliotorres/tikz"))])
|
||||
(tile . [(20161225 357) ((emacs (25 1)) (s (1 9 0)) (dash (2 12 0)) (stream (2 2 3))) "Tile windows with layouts" single ((:commit . "22660f21f6e95de5aba55cd5d293d4841e9a4661") (:authors ("Ivan Malison" . "IvanMalison@gmail.com")) (:maintainer "Ivan Malison" . "IvanMalison@gmail.com") (:keywords "tile" "tiling" "window" "manager" "dynamic" "frames") (:url . "https://github.com/IvanMalison/tile"))])
|
||||
|
@ -4673,7 +4673,7 @@
|
|||
(vs-dark-theme . [(20201025 1148) ((emacs (24 1))) "Visual Studio IDE dark theme" single ((:commit . "3d087e1c48872b5b623ac72c85a9bd3d80ec02cd") (:authors ("Jen-Chieh Shen")) (:maintainer "Jen-Chieh Shen") (:url . "https://github.com/jcs090218/vs-dark-theme"))])
|
||||
(vs-light-theme . [(20201025 1148) ((emacs (24 1))) "Visual Studio IDE light theme" single ((:commit . "4e6501118bafb62ecfca8797b6c6d81310d95fd2") (:authors ("Jen-Chieh Shen")) (:maintainer "Jen-Chieh Shen") (:url . "https://github.com/jcs090218/vs-light-theme"))])
|
||||
(vscdark-theme . [(20191212 107) ((emacs (24 1))) "VS Code Dark+ like theme" single ((:commit . "8eba74059e8a9db974e4056ee024e52fe54da485") (:authors ("Alexander L. Belikoff")) (:maintainer "Alexander L. Belikoff") (:url . "https://github.com/abelikoff/vscdark-theme"))])
|
||||
(vscode-dark-plus-theme . [(20210412 325) nil "Default Visual Studio Code Dark+ theme" single ((:commit . "0759510819356e48b0be68f5c8812a5ff318d36a") (:authors ("Ian Y.E. Pan")) (:maintainer "Ian Y.E. Pan") (:url . "https://github.com/ianpan870102/vscode-dark-plus-emacs-theme"))])
|
||||
(vscode-dark-plus-theme . [(20210414 319) nil "Default Visual Studio Code Dark+ theme" single ((:commit . "bb286a02bbd0e579873c45526d70ddb0081fff70") (:authors ("Ian Y.E. Pan")) (:maintainer "Ian Y.E. Pan") (:url . "https://github.com/ianpan870102/vscode-dark-plus-emacs-theme"))])
|
||||
(vscode-icon . [(20201214 2227) ((emacs (25 1))) "Utility package to provide Vscode style icons" tar ((:commit . "909151c8105861aa300f5601e333909d36d0ebf5") (:authors ("James Nguyen" . "james@jojojames.com")) (:maintainer "James Nguyen" . "james@jojojames.com") (:keywords "files" "tools") (:url . "https://github.com/jojojames/vscode-icon-emacs"))])
|
||||
(vterm . [(20210409 1558) ((emacs (25 1))) "Fully-featured terminal emulator" tar ((:commit . "2b1392cb2b14ec5bd0b7355197d5f353aa5d3983") (:authors ("Lukas Fürmetz" . "fuermetz@mailbox.org")) (:maintainer "Lukas Fürmetz" . "fuermetz@mailbox.org") (:keywords "terminals") (:url . "https://github.com/akermu/emacs-libvterm"))])
|
||||
(vterm-toggle . [(20210313 305) ((emacs (25 1)) (vterm (0 0 1))) "Toggles between the vterm buffer and other buffers." single ((:commit . "a0429842e6197a6ec83c0de30701127a4edb9e92") (:authors (nil . "jixiuf jixiuf@qq.com")) (:maintainer nil . "jixiuf jixiuf@qq.com") (:keywords "vterm" "terminals") (:url . "https://github.com/jixiuf/vterm-toggle"))])
|
||||
|
@ -4892,7 +4892,7 @@
|
|||
(zimports . [(20200809 2035) ((emacs (26 1)) (projectile (2 1 0))) "Reformat python imports with zimports" single ((:commit . "4067b20a2ea25327504b0a42f443903728aa7966") (:url . "https://github.com/schmir/zimports.el"))])
|
||||
(zlc . [(20151011 157) nil "Provides zsh like completion system to Emacs" single ((:commit . "4dd2ba267ecdeac845a7cbb3147294ee7daa25f4") (:authors ("mooz" . "stillpedant@gmail.com")) (:maintainer "mooz" . "stillpedant@gmail.com") (:keywords "matching" "convenience"))])
|
||||
(zmq . [(20210402 2340) ((cl-lib (0 5)) (emacs (26))) "ZMQ bindings in elisp" tar ((:commit . "0a186a732b78aeb86599ea8123b36c4885789c7d") (:authors ("Nathaniel Nicandro" . "nathanielnicandro@gmail.com")) (:maintainer "Nathaniel Nicandro" . "nathanielnicandro@gmail.com") (:keywords "comm") (:url . "https://github.com/nnicandro/emacs-zmq"))])
|
||||
(znc . [(20210304 2337) ((cl-lib (0 2))) "ZNC + ERC" single ((:commit . "e795739ec182d217ffaf3c595819c308911540ee") (:authors ("Yaroslav Shirokov")) (:maintainer "Yaroslav Shirokov") (:url . "https://github.com/sshirokov/ZNC.el"))])
|
||||
(znc . [(20210304 2337) ((cl-lib (0 2))) "ZNC + ERC" single ((:commit . "57d89fc1e17d94a8e9f3365b0d647a80520cc4a8") (:authors ("Yaroslav Shirokov")) (:maintainer "Yaroslav Shirokov") (:url . "https://github.com/sshirokov/ZNC.el"))])
|
||||
(zombie . [(20141222 1616) nil "major mode for editing ZOMBIE programs" single ((:commit . "ff8cd1b4cdbb4b0b9b8fd1ec8f6fb93eba249345") (:authors ("zk_phi")) (:maintainer "zk_phi") (:url . "http://hins11.yu-yake.com/"))])
|
||||
(zombie-trellys-mode . [(20150304 1448) ((emacs (24)) (cl-lib (0 5)) (haskell-mode (1 5))) "A minor mode for interaction with Zombie Trellys" single ((:commit . "7f0c45fdda3a44c3b6d1762d116abb1421b8fba2") (:authors ("David Raymond Christiansen" . "david@davidchristiansen.dk")) (:maintainer "David Raymond Christiansen" . "david@davidchristiansen.dk") (:keywords "languages"))])
|
||||
(zone-nyan . [(20200506 1207) ((esxml (0 3 1))) "Zone out with nyan cat" single ((:commit . "253a0484ea5076c0f485c561a3f8370ba560f4f2") (:authors ("Vasilij Schneidermann" . "mail@vasilij.de")) (:maintainer "Vasilij Schneidermann" . "mail@vasilij.de") (:keywords "zone") (:url . "https://depp.brause.cc/zone-nyan"))])
|
||||
|
|
3
elpa/general-20200516.50/.dirs-local.el
Normal file
3
elpa/general-20200516.50/.dirs-local.el
Normal file
|
@ -0,0 +1,3 @@
|
|||
((emacs-lisp-mode . ((fill-column . 80)
|
||||
(indent-tabs-mode . nil)
|
||||
(sentence-end-double-space . nil))))
|
BIN
elpa/general-20200516.50/.dirs-local.elc
Normal file
BIN
elpa/general-20200516.50/.dirs-local.elc
Normal file
Binary file not shown.
423
elpa/general-20200516.50/general-autoloads.el
Normal file
423
elpa/general-20200516.50/general-autoloads.el
Normal file
|
@ -0,0 +1,423 @@
|
|||
;;; general-autoloads.el --- automatically extracted autoloads -*- lexical-binding: t -*-
|
||||
;;
|
||||
;;; Code:
|
||||
|
||||
(add-to-list 'load-path (directory-file-name
|
||||
(or (file-name-directory #$) (car load-path))))
|
||||
|
||||
|
||||
;;;### (autoloads nil "general" "general.el" (0 0 0 0))
|
||||
;;; Generated autoloads from general.el
|
||||
|
||||
(autoload 'general-define-key "general" "\
|
||||
The primary key definition function provided by general.el.
|
||||
|
||||
Define MAPS, optionally using DEFINER, in the keymap(s) corresponding to STATES
|
||||
and KEYMAPS.
|
||||
|
||||
MAPS consists of paired keys (vectors or strings; also see
|
||||
`general-implicit-kbd') and definitions (those mentioned in `define-key''s
|
||||
docstring and general.el's \"extended\" definitions). All pairs (when not
|
||||
ignored) will be recorded and can be later displayed with
|
||||
`general-describe-keybindings'.
|
||||
|
||||
If DEFINER is specified, a custom key definer will be used to bind MAPS. See
|
||||
general.el's documentation/README for more information.
|
||||
|
||||
Unlike with normal key definitions functions, the keymaps in KEYMAPS should be
|
||||
quoted (this allows using the keymap name for other purposes, e.g. deferring
|
||||
keybindings if the keymap symbol is not bound, optionally inferring the
|
||||
corresponding major mode for a symbol by removing \"-map\" for :which-key,
|
||||
easily storing the keymap name for use with `general-describe-keybindings',
|
||||
etc.). Note that general.el provides other key definer macros that do not
|
||||
require quoting keymaps.
|
||||
|
||||
STATES corresponds to the evil state(s) to bind the keys in. Non-evil users
|
||||
should not set STATES. When STATES is non-nil, `evil-define-key*' will be
|
||||
used (the evil auxiliary keymaps corresponding STATES and KEYMAPS will be used);
|
||||
otherwise `define-key' will be used (unless DEFINER is specified). KEYMAPS
|
||||
defaults to 'global. There is also 'local, which create buffer-local
|
||||
keybindings for both evil and non-evil keybindings. There are other special,
|
||||
user-alterable \"shorthand\" symbols for keymaps and states (see
|
||||
`general-keymap-aliases' and `general-state-aliases').
|
||||
|
||||
Note that STATES and KEYMAPS can either be lists or single symbols. If any
|
||||
keymap does not exist, those keybindings will be deferred until the keymap does
|
||||
exist, so using `eval-after-load' is not necessary with this function.
|
||||
|
||||
PREFIX corresponds to a key to prefix keys in MAPS with and defaults to none. To
|
||||
bind/unbind a key specified with PREFIX, \"\" can be specified as a key in
|
||||
MAPS (e.g. ...:prefix \"SPC\" \"\" nil... will unbind space).
|
||||
|
||||
The keywords in this paragraph are only useful for evil users. If
|
||||
NON-NORMAL-PREFIX is specified, this prefix will be used instead of PREFIX for
|
||||
states in `general-non-normal-states' (e.g. the emacs and insert states). This
|
||||
argument will only have an effect if one of these states is in STATES or if
|
||||
corresponding global keymap (e.g. `evil-insert-state-map') is in KEYMAPS.
|
||||
Alternatively, GLOBAL-PREFIX can be used with PREFIX and/or NON-NORMAL-PREFIX to
|
||||
bind keys in all states under the specified prefix. Like with NON-NORMAL-PREFIX,
|
||||
GLOBAL-PREFIX will prevent PREFIX from applying to `general-non-normal-states'.
|
||||
INFIX can be used to append a string to all of the specified prefixes. This is
|
||||
potentially useful when you are using GLOBAL-PREFIX and/or NON-NORMAL-PREFIX so
|
||||
that you can sandwich keys in between all the prefixes and the specified keys in
|
||||
MAPS. This may be particularly useful if you are using default prefixes in a
|
||||
wrapper function/macro so that you can add to them without needing to re-specify
|
||||
all of them. If none of the other prefix keyword arguments are specified, INFIX
|
||||
will have no effect.
|
||||
|
||||
If PREFIX-COMMAND or PREFIX-MAP is specified, a prefix command and/or keymap
|
||||
will be created. PREFIX-NAME can be additionally specified to set the keymap
|
||||
menu name/prompt. If PREFIX-COMMAND is specified, `define-prefix-command' will
|
||||
be used. Otherwise, only a prefix keymap will be created. Previously created
|
||||
prefix commands/keymaps will never be redefined/cleared. All prefixes (including
|
||||
the INFIX key, if specified) will then be bound to PREFIX-COMMAND or PREFIX-MAP.
|
||||
If the user did not specify any PREFIX or manually specify any KEYMAPS, general
|
||||
will bind all MAPS in the prefix keymap corresponding to either PREFIX-MAP or
|
||||
PREFIX-COMMAND instead of in the default keymap.
|
||||
|
||||
PREDICATE corresponds to a predicate to check to determine whether a definition
|
||||
should be active (e.g. \":predicate '(eobp)\"). Definitions created with a
|
||||
predicate will only be active when the predicate is true. When the predicate is
|
||||
false, key lookup will continue to search for a match in lower-precedence
|
||||
keymaps.
|
||||
|
||||
In addition to the normal definitions supported by `define-key', general.el also
|
||||
provides \"extended\" definitions, which are plists containing the normal
|
||||
definition as well as other keywords. For example, PREDICATE can be specified
|
||||
globally or locally in an extended definition. New global (~general-define-key~)
|
||||
and local (extended definition) keywords can be added by the user. See
|
||||
`general-extended-def-keywords' and general.el's documentation/README for more
|
||||
information.
|
||||
|
||||
PACKAGE is the global version of the extended definition keyword that specifies
|
||||
the package a keymap is defined in (used for \"autoloading\" keymaps)
|
||||
|
||||
PROPERTIES, REPEAT, and JUMP are the global versions of the extended definition
|
||||
keywords used for adding evil command properties to commands.
|
||||
|
||||
MAJOR-MODES, WK-MATCH-KEYS, WK-MATCH-BINDINGS, and WK-FULL-KEYS are the
|
||||
corresponding global versions of which-key extended definition keywords. They
|
||||
will only have an effect for extended definitions that specify :which-key or
|
||||
:wk. See the section on extended definitions in the general.el
|
||||
documentation/README for more information.
|
||||
|
||||
LISPY-PLIST and WORF-PLIST are the global versions of extended definition
|
||||
keywords that are used for each corresponding custom DEFINER.
|
||||
|
||||
\(fn &rest MAPS &key DEFINER (STATES general-default-states) (KEYMAPS general-default-keymaps KEYMAPS-SPECIFIED-P) (PREFIX general-default-prefix) (NON-NORMAL-PREFIX general-default-non-normal-prefix) (GLOBAL-PREFIX general-default-global-prefix) INFIX PREFIX-COMMAND PREFIX-MAP PREFIX-NAME PREDICATE PACKAGE PROPERTIES REPEAT JUMP MAJOR-MODES (WK-MATCH-KEYS t) (WK-MATCH-BINDING t) (WK-FULL-KEYS t) LISPY-PLIST WORF-PLIST &allow-other-keys)" nil nil)
|
||||
|
||||
(autoload 'general-emacs-define-key "general" "\
|
||||
A wrapper for `general-define-key' that is similar to `define-key'.
|
||||
It has a positional argument for KEYMAPS (that will not be overridden by a later
|
||||
:keymaps argument). Besides this, it acts the same as `general-define-key', and
|
||||
ARGS can contain keyword arguments in addition to keybindings. This can
|
||||
basically act as a drop-in replacement for `define-key', and unlike with
|
||||
`general-define-key', KEYMAPS does not need to be quoted.
|
||||
|
||||
\(fn KEYMAPS &rest ARGS)" nil t)
|
||||
|
||||
(function-put 'general-emacs-define-key 'lisp-indent-function '1)
|
||||
|
||||
(autoload 'general-evil-define-key "general" "\
|
||||
A wrapper for `general-define-key' that is similar to `evil-define-key'.
|
||||
It has positional arguments for STATES and KEYMAPS (that will not be overridden
|
||||
by a later :keymaps or :states argument). Besides this, it acts the same as
|
||||
`general-define-key', and ARGS can contain keyword arguments in addition to
|
||||
keybindings. This can basically act as a drop-in replacement for
|
||||
`evil-define-key', and unlike with `general-define-key', KEYMAPS does not need
|
||||
to be quoted.
|
||||
|
||||
\(fn STATES KEYMAPS &rest ARGS)" nil t)
|
||||
|
||||
(function-put 'general-evil-define-key 'lisp-indent-function '2)
|
||||
|
||||
(autoload 'general-def "general" "\
|
||||
General definer that takes a variable number of positional arguments in ARGS.
|
||||
This macro will act as `general-define-key', `general-emacs-define-key', or
|
||||
`general-evil-define-key' based on how many of the initial arguments do not
|
||||
correspond to keybindings. All quoted and non-quoted lists and symbols before
|
||||
the first string, vector, or keyword are considered to be positional arguments.
|
||||
This means that you cannot use a function or variable for a key that starts
|
||||
immediately after the positional arguments. If you need to do this, you should
|
||||
use one of the definers that `general-def' dispatches to or explicitly separate
|
||||
the positional arguments from the maps with a bogus keyword pair like
|
||||
\":start-maps t\"
|
||||
|
||||
\(fn &rest ARGS)" nil t)
|
||||
|
||||
(function-put 'general-def 'lisp-indent-function 'defun)
|
||||
|
||||
(autoload 'general-create-definer "general" "\
|
||||
A helper macro to create wrappers for `general-def'.
|
||||
This can be used to create key definers that will use a certain keymap, evil
|
||||
state, prefix key, etc. by default. NAME is the wrapper name and DEFAULTS are
|
||||
the default arguments. WRAPPING can also be optionally specified to use a
|
||||
different definer than `general-def'. It should not be quoted.
|
||||
|
||||
\(fn NAME &rest DEFAULTS &key WRAPPING &allow-other-keys)" nil t)
|
||||
|
||||
(function-put 'general-create-definer 'lisp-indent-function 'defun)
|
||||
|
||||
(autoload 'general-defs "general" "\
|
||||
A wrapper that splits into multiple `general-def's.
|
||||
Each consecutive grouping of positional argument followed by keyword/argument
|
||||
pairs (having only one or the other is fine) marks the start of a new section.
|
||||
Each section corresponds to one use of `general-def'. This means that settings
|
||||
only apply to the keybindings that directly follow.
|
||||
|
||||
Since positional arguments can appear at any point, unqouted symbols are always
|
||||
considered to be positional arguments (e.g. a keymap). This means that variables
|
||||
can never be used for keys with `general-defs'. Variables can still be used for
|
||||
definitions or as arguments to keywords.
|
||||
|
||||
\(fn &rest ARGS)" nil t)
|
||||
|
||||
(function-put 'general-defs 'lisp-indent-function 'defun)
|
||||
|
||||
(autoload 'general-unbind "general" "\
|
||||
A wrapper for `general-def' to unbind multiple keys simultaneously.
|
||||
Insert after all keys in ARGS before passing ARGS to `general-def.' \":with
|
||||
#'func\" can optionally specified to use a custom function instead (e.g.
|
||||
`ignore').
|
||||
|
||||
\(fn &rest ARGS)" nil t)
|
||||
|
||||
(function-put 'general-unbind 'lisp-indent-function 'defun)
|
||||
|
||||
(autoload 'general-describe-keybindings "general" "\
|
||||
Show all keys that have been bound with general in an org buffer.
|
||||
Any local keybindings will be shown first followed by global keybindings.
|
||||
With a non-nil prefix ARG only show bindings in active maps.
|
||||
|
||||
\(fn &optional ARG)" t nil)
|
||||
|
||||
(autoload 'general-key "general" "\
|
||||
Act as KEY's definition in the current context.
|
||||
This uses an extended menu item's capability of dynamically computing a
|
||||
definition. It is recommended over `general-simulate-key' wherever possible. See
|
||||
the docstring of `general-simulate-key' and the readme for information about the
|
||||
benefits and downsides of `general-key'.
|
||||
|
||||
KEY should be a string given in `kbd' notation and should correspond to a single
|
||||
definition (as opposed to a sequence of commands). When STATE is specified, look
|
||||
up KEY with STATE as the current evil state. When specified, DOCSTRING will be
|
||||
the menu item's name/description.
|
||||
|
||||
Let can be used to bind variables around key lookup. For example:
|
||||
\(general-key \"some key\"
|
||||
:let ((some-var some-val)))
|
||||
|
||||
SETUP and TEARDOWN can be used to run certain functions before and after key
|
||||
lookup. For example, something similar to using :state 'emacs would be:
|
||||
\(general-key \"some key\"
|
||||
:setup (evil-local-mode -1)
|
||||
:teardown (evil-local-mode))
|
||||
|
||||
ACCEPT-DEFAULT, NO-REMAP, and POSITION are passed to `key-binding'.
|
||||
|
||||
\(fn KEY &key STATE DOCSTRING LET SETUP TEARDOWN ACCEPT-DEFAULT NO-REMAP POSITION)" nil t)
|
||||
|
||||
(function-put 'general-key 'lisp-indent-function '1)
|
||||
|
||||
(autoload 'general-simulate-keys "general" "\
|
||||
Deprecated. Please use `general-simulate-key' instead.
|
||||
|
||||
\(fn KEYS &optional STATE KEYMAP (LOOKUP t) DOCSTRING NAME)" nil t)
|
||||
|
||||
(autoload 'general-simulate-key "general" "\
|
||||
Create and return a command that simulates KEYS in STATE and KEYMAP.
|
||||
|
||||
`general-key' should be prefered over this whenever possible as it is simpler
|
||||
and has saner functionality in many cases because it does not rely on
|
||||
`unread-command-events' (e.g. \"C-h k\" will show the docstring of the command
|
||||
to be simulated ; see the readme for more information). The main downsides of
|
||||
`general-key' are that it cannot simulate a command followed by keys or
|
||||
subsequent commands, and which-key does not currently work well with it when
|
||||
simulating a prefix key/incomplete key sequence.
|
||||
|
||||
KEYS should be a string given in `kbd' notation. It can also be a list of a
|
||||
single command followed by a string of the key(s) to simulate after calling that
|
||||
command. STATE should only be specified by evil users and should be a quoted
|
||||
evil state. KEYMAP should not be quoted. Both STATE and KEYMAP aliases are
|
||||
supported (but they have to be set when the macro is expanded). When neither
|
||||
STATE or KEYMAP are specified, the key(s) will be simulated in the current
|
||||
context.
|
||||
|
||||
If NAME is specified, it will replace the automatically generated function name.
|
||||
NAME should not be quoted. If DOCSTRING is specified, it will replace the
|
||||
automatically generated docstring.
|
||||
|
||||
Normally the generated function will look up KEY in the correct context to try
|
||||
to match a command. To prevent this lookup, LOOKUP can be specified as nil.
|
||||
Generally, you will want to keep LOOKUP non-nil because this will allow checking
|
||||
the evil repeat property of matched commands to determine whether or not they
|
||||
should be recorded. See the docstring for `general--simulate-keys' for more
|
||||
information about LOOKUP.
|
||||
|
||||
When a WHICH-KEY description is specified, it will replace the command name in
|
||||
the which-key popup.
|
||||
|
||||
When a command name is specified and that command has been remapped (i.e. [remap
|
||||
command] is currently bound), the remapped version will be used instead of the
|
||||
original command unless REMAP is specified as nil (it is true by default).
|
||||
|
||||
The advantages of this over a keyboard macro are as follows:
|
||||
- Prefix arguments are supported
|
||||
- The user can control the context in which the keys are simulated
|
||||
- The user can simulate both a named command and keys
|
||||
- The user can simulate an incomplete key sequence (e.g. for a keymap)
|
||||
|
||||
\(fn KEYS &key STATE KEYMAP NAME DOCSTRING (LOOKUP t) WHICH-KEY (REMAP t))" nil t)
|
||||
|
||||
(function-put 'general-simulate-key 'lisp-indent-function 'defun)
|
||||
|
||||
(autoload 'general-key-dispatch "general" "\
|
||||
Create and return a command that runs FALLBACK-COMMAND or a command in MAPS.
|
||||
MAPS consists of <key> <command> pairs. If a key in MAPS is matched, the
|
||||
corresponding command will be run. Otherwise FALLBACK-COMMAND will be run with
|
||||
the unmatched keys. So, for example, if \"ab\" was pressed, and \"ab\" is not
|
||||
one of the key sequences from MAPS, the FALLBACK-COMMAND will be run followed by
|
||||
the simulated keypresses of \"ab\". Prefix arguments will still work regardless
|
||||
of which command is run. This is useful for binding under non-prefix keys. For
|
||||
example, this can be used to redefine a sequence like \"cw\" or \"cow\" in evil
|
||||
but still have \"c\" work as `evil-change'. If TIMEOUT is specified,
|
||||
FALLBACK-COMMAND will also be run in the case that the user does not press the
|
||||
next key within the TIMEOUT (e.g. 0.5).
|
||||
|
||||
NAME and DOCSTRING are optional keyword arguments. They can be used to replace
|
||||
the automatically generated name and docstring for the created function. By
|
||||
default, `cl-gensym' is used to prevent name clashes (e.g. allows the user to
|
||||
create multiple different commands using `self-insert-command' as the
|
||||
FALLBACK-COMMAND without explicitly specifying NAME to manually prevent
|
||||
clashes).
|
||||
|
||||
When INHERIT-KEYMAP is specified, all the keybindings from that keymap will be
|
||||
inherited in MAPS.
|
||||
|
||||
When a WHICH-KEY description is specified, it will replace the command name in
|
||||
the which-key popup.
|
||||
|
||||
When command to be executed has been remapped (i.e. [remap command] is currently
|
||||
bound), the remapped version will be used instead of the original command unless
|
||||
REMAP is specified as nil (it is true by default).
|
||||
|
||||
\(fn FALLBACK-COMMAND &rest MAPS &key TIMEOUT INHERIT-KEYMAP NAME DOCSTRING WHICH-KEY (REMAP t) &allow-other-keys)" nil t)
|
||||
|
||||
(function-put 'general-key-dispatch 'lisp-indent-function '1)
|
||||
|
||||
(autoload 'general-predicate-dispatch "general" "\
|
||||
|
||||
|
||||
\(fn FALLBACK-DEF &rest DEFS &key DOCSTRING &allow-other-keys)" nil t)
|
||||
|
||||
(function-put 'general-predicate-dispatch 'lisp-indent-function '1)
|
||||
|
||||
(autoload 'general-translate-key "general" "\
|
||||
Translate keys in the keymap(s) corresponding to STATES and KEYMAPS.
|
||||
STATES should be the name of an evil state, a list of states, or nil. KEYMAPS
|
||||
should be a symbol corresponding to the keymap to make the translations in or a
|
||||
list of keymap names. Keymap and state aliases are supported (as well as 'local
|
||||
and 'global for KEYMAPS).
|
||||
|
||||
MAPS corresponds to a list of translations (key replacement pairs). For example,
|
||||
specifying \"a\" \"b\" will bind \"a\" to \"b\"'s definition in the keymap.
|
||||
Specifying nil as a replacement will unbind a key.
|
||||
|
||||
If DESTRUCTIVE is non-nil, the keymap will be destructively altered without
|
||||
creating a backup. If DESTRUCTIVE is nil, store a backup of the keymap on the
|
||||
initial invocation, and for future invocations always look up keys in the
|
||||
original/backup keymap. On the other hand, if DESTRUCTIVE is non-nil, calling
|
||||
this function multiple times with \"a\" \"b\" \"b\" \"a\", for example, would
|
||||
continue to swap and unswap the definitions of these keys. This means that when
|
||||
DESTRUCTIVE is non-nil, all related swaps/cycles should be done in the same
|
||||
invocation.
|
||||
|
||||
If both MAPS and DESCTRUCTIVE are nil, only create the backup keymap.
|
||||
|
||||
\(fn STATES KEYMAPS &rest MAPS &key DESTRUCTIVE &allow-other-keys)" nil nil)
|
||||
|
||||
(function-put 'general-translate-key 'lisp-indent-function 'defun)
|
||||
|
||||
(autoload 'general-swap-key "general" "\
|
||||
Wrapper around `general-translate-key' for swapping keys.
|
||||
STATES, KEYMAPS, and ARGS are passed to `general-translate-key'. ARGS should
|
||||
consist of key swaps (e.g. \"a\" \"b\" is equivalent to \"a\" \"b\" \"b\" \"a\"
|
||||
with `general-translate-key') and optionally keyword arguments for
|
||||
`general-translate-key'.
|
||||
|
||||
\(fn STATES KEYMAPS &rest ARGS)" nil t)
|
||||
|
||||
(function-put 'general-swap-key 'lisp-indent-function 'defun)
|
||||
|
||||
(autoload 'general-auto-unbind-keys "general" "\
|
||||
Advise `define-key' to automatically unbind keys when necessary.
|
||||
This will prevent errors when a sub-sequence of a key is already bound (e.g. the
|
||||
user attempts to bind \"SPC a\" when \"SPC\" is bound, resulting in a \"Key
|
||||
sequnce starts with non-prefix key\" error). When UNDO is non-nil, remove
|
||||
advice.
|
||||
|
||||
\(fn &optional UNDO)" nil nil)
|
||||
|
||||
(autoload 'general-add-hook "general" "\
|
||||
A drop-in replacement for `add-hook'.
|
||||
Unlike `add-hook', HOOKS and FUNCTIONS can be single items or lists. APPEND and
|
||||
LOCAL are passed directly to `add-hook'. When TRANSIENT is non-nil, each
|
||||
function will remove itself from the hook it is in after it is run once. If
|
||||
TRANSIENT is a function, call it on the return value in order to determine
|
||||
whether to remove a function from the hook. For example, if TRANSIENT is
|
||||
#'identity, remove each function only if it returns non-nil. TRANSIENT could
|
||||
alternatively check something external and ignore the function's return value.
|
||||
|
||||
\(fn HOOKS FUNCTIONS &optional APPEND LOCAL TRANSIENT)" nil nil)
|
||||
|
||||
(autoload 'general-remove-hook "general" "\
|
||||
A drop-in replacement for `remove-hook'.
|
||||
Unlike `remove-hook', HOOKS and FUNCTIONS can be single items or lists. LOCAL is
|
||||
passed directly to `remove-hook'.
|
||||
|
||||
\(fn HOOKS FUNCTIONS &optional LOCAL)" nil nil)
|
||||
|
||||
(autoload 'general-advice-add "general" "\
|
||||
A drop-in replacement for `advice-add'.
|
||||
SYMBOLS, WHERE, FUNCTIONS, and PROPS correspond to the arguments for
|
||||
`advice-add'. Unlike `advice-add', SYMBOLS and FUNCTIONS can be single items or
|
||||
lists. When TRANSIENT is non-nil, each function will remove itself as advice
|
||||
after it is run once. If TRANSIENT is a function, call it on the return value in
|
||||
order to determine whether to remove a function as advice. For example, if
|
||||
TRANSIENT is #'identity, remove each function only if it returns non-nil.
|
||||
TRANSIENT could alternatively check something external and ignore the function's
|
||||
return value.
|
||||
|
||||
\(fn SYMBOLS WHERE FUNCTIONS &optional PROPS TRANSIENT)" nil nil)
|
||||
(autoload 'general-add-advice "general")
|
||||
|
||||
(autoload 'general-advice-remove "general" "\
|
||||
A drop-in replacement for `advice-remove'.
|
||||
Unlike `advice-remove', SYMBOLS and FUNCTIONS can be single items or lists.
|
||||
|
||||
\(fn SYMBOLS FUNCTIONS)" nil nil)
|
||||
(autoload 'general-remove-advice "general")
|
||||
|
||||
(autoload 'general-evil-setup "general" "\
|
||||
Set up some basic equivalents for vim mapping functions.
|
||||
This creates global key definition functions for the evil states.
|
||||
Specifying SHORT-NAMES as non-nil will create non-prefixed function
|
||||
aliases such as `nmap' for `general-nmap'.
|
||||
|
||||
\(fn &optional SHORT-NAMES _)" nil nil)
|
||||
|
||||
(register-definition-prefixes "general" '("general-"))
|
||||
|
||||
;;;***
|
||||
|
||||
;;;### (autoloads nil nil ("general-pkg.el") (0 0 0 0))
|
||||
|
||||
;;;***
|
||||
|
||||
;; Local Variables:
|
||||
;; version-control: never
|
||||
;; no-byte-compile: t
|
||||
;; no-update-autoloads: t
|
||||
;; coding: utf-8
|
||||
;; End:
|
||||
;;; general-autoloads.el ends here
|
13
elpa/general-20200516.50/general-pkg.el
Normal file
13
elpa/general-20200516.50/general-pkg.el
Normal file
|
@ -0,0 +1,13 @@
|
|||
(define-package "general" "20200516.50" "Convenience wrappers for keybindings."
|
||||
'((emacs "24.4")
|
||||
(cl-lib "0.5"))
|
||||
:commit "a0b17d207badf462311b2eef7c065b884462cb7c" :authors
|
||||
'(("Fox Kiester" . "noct@posteo.net"))
|
||||
:maintainer
|
||||
'("Fox Kiester" . "noct@posteo.net")
|
||||
:keywords
|
||||
'("vim" "evil" "leader" "keybindings" "keys")
|
||||
:url "https://github.com/noctuid/general.el")
|
||||
;; Local Variables:
|
||||
;; no-byte-compile: t
|
||||
;; End:
|
2735
elpa/general-20200516.50/general.el
Normal file
2735
elpa/general-20200516.50/general.el
Normal file
File diff suppressed because it is too large
Load Diff
BIN
elpa/general-20200516.50/general.elc
Normal file
BIN
elpa/general-20200516.50/general.elc
Normal file
Binary file not shown.
29
elpa/git-commit-20210328.1730/git-commit-autoloads.el
Normal file
29
elpa/git-commit-20210328.1730/git-commit-autoloads.el
Normal file
|
@ -0,0 +1,29 @@
|
|||
;;; git-commit-autoloads.el --- automatically extracted autoloads -*- lexical-binding: t -*-
|
||||
;;
|
||||
;;; Code:
|
||||
|
||||
(add-to-list 'load-path (directory-file-name
|
||||
(or (file-name-directory #$) (car load-path))))
|
||||
|
||||
|
||||
;;;### (autoloads nil "git-commit" "git-commit.el" (0 0 0 0))
|
||||
;;; Generated autoloads from git-commit.el
|
||||
(put 'git-commit-major-mode 'safe-local-variable
|
||||
(lambda (val)
|
||||
(memq val '(text-mode
|
||||
markdown-mode
|
||||
org-mode
|
||||
fundamental-mode
|
||||
git-commit-elisp-text-mode))))
|
||||
|
||||
(register-definition-prefixes "git-commit" '("git-commit-" "global-git-commit-mode"))
|
||||
|
||||
;;;***
|
||||
|
||||
;; Local Variables:
|
||||
;; version-control: never
|
||||
;; no-byte-compile: t
|
||||
;; no-update-autoloads: t
|
||||
;; coding: utf-8
|
||||
;; End:
|
||||
;;; git-commit-autoloads.el ends here
|
2
elpa/git-commit-20210328.1730/git-commit-pkg.el
Normal file
2
elpa/git-commit-20210328.1730/git-commit-pkg.el
Normal file
|
@ -0,0 +1,2 @@
|
|||
;;; Generated package description from git-commit.el -*- no-byte-compile: t -*-
|
||||
(define-package "git-commit" "20210328.1730" "Edit Git commit messages" '((emacs "25.1") (dash "20200524") (transient "20200601") (with-editor "20200522")) :commit "5882df245d3388cd6f443bc11df219a838104df2" :maintainer '("Jonas Bernoulli" . "jonas@bernoul.li") :keywords '("git" "tools" "vc") :url "https://github.com/magit/magit")
|
1055
elpa/git-commit-20210328.1730/git-commit.el
Normal file
1055
elpa/git-commit-20210328.1730/git-commit.el
Normal file
File diff suppressed because it is too large
Load Diff
BIN
elpa/git-commit-20210328.1730/git-commit.elc
Normal file
BIN
elpa/git-commit-20210328.1730/git-commit.elc
Normal file
Binary file not shown.
372
elpa/magit-20210414.1306/AUTHORS.md
Normal file
372
elpa/magit-20210414.1306/AUTHORS.md
Normal file
|
@ -0,0 +1,372 @@
|
|||
Authors
|
||||
=======
|
||||
|
||||
The following people have contributed to Magit, including the
|
||||
libraries `git-commit.el`, `magit-popup.el`, and `with-editor.el`
|
||||
which are distributed as separate Elpa packages.
|
||||
|
||||
For statistics see https://magit.vc/stats/authors.html.
|
||||
|
||||
Names below are sorted alphabetically.
|
||||
|
||||
Author
|
||||
------
|
||||
|
||||
- Marius Vollmer <marius.vollmer@gmail.com>
|
||||
|
||||
Maintainer
|
||||
----------
|
||||
|
||||
- Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
Developers
|
||||
----------
|
||||
|
||||
- Kyle Meyer <kyle@kyleam.com>
|
||||
- Noam Postavsky <npostavs@users.sourceforge.net>
|
||||
|
||||
Retired Maintainers and Developers
|
||||
----------------------------------
|
||||
|
||||
- Nicolas Dudebout <nicolas.dudebout@gatech.edu>
|
||||
- Peter J. Weisberg <pj@irregularexpressions.net>
|
||||
- Pieter Praet <pieter@praet.org>
|
||||
- Phil Jackson <phil@shellarchive.co.uk>
|
||||
- Rémi Vanicat <vanicat@debian.org>
|
||||
- Yann Hodique <yann.hodique@gmail.com>
|
||||
|
||||
Contributors
|
||||
------------
|
||||
|
||||
- Aaron Culich <aculich@gmail.com>
|
||||
- Aaron Madlon-Kay <aaron@madlon-kay.com>
|
||||
- Abdo Roig-Maranges <abdo.roig@gmail.com>
|
||||
- Adam Benanti <0entropy@protonmail.com>
|
||||
- Adam Kruszewski <adam@kruszewski.name>
|
||||
- Adam Porter <adam@alphapapa.net>
|
||||
- Adam Spiers <emacs@adamspiers.org>
|
||||
- Adeodato Simó <dato@net.com.org.es>
|
||||
- Ævar Arnfjörð Bjarmason <avarab@gmail.com>
|
||||
- Alan Falloon <alan.falloon@gmail.com>
|
||||
- Alban Gruin <alban@pa1ch.fr>
|
||||
- Aleksey Uimanov <s9gf4ult@gmail.com>
|
||||
- Alexander Gramiak <fice-t@protonmail.com>
|
||||
- Alexander Miller <alexanderm@web.de>
|
||||
- Alex Branham <alex.branham@gmail.com>
|
||||
- Alex Dunn <adunn@ucsb.edu>
|
||||
- Alexey Voinov <alexey.v.voinov@gmail.com>
|
||||
- Alex Kost <alezost@gmail.com>
|
||||
- Alex Ott <alexott@gmail.com>
|
||||
- Allen <darkfeline@felesatra.moe>
|
||||
- Allen Li <darkfeline@felesatra.moe>
|
||||
- Andreas Fuchs <asf@boinkor.net>
|
||||
- Andreas Liljeqvist <andreas.liljeqvist@robacks.se>
|
||||
- Andreas Rottmann <a.rottmann@gmx.at>
|
||||
- Andrei Chițu <andrei.chitu1@gmail.com>
|
||||
- Andrew Eggenberger <andrew.eggenberger@gmail.com>
|
||||
- Andrew Kirkpatrick <andrew.kirkpatrick@adelaide.edu.au>
|
||||
- Andrew Psaltis <apsaltis@vmware.com>
|
||||
- Andrew Schwartzmeyer <andrew@schwartzmeyer.com>
|
||||
- Andrey Smirnov <andrew.smirnov@gmail.com>
|
||||
- Andriy Kmit' <dev@madand.net>
|
||||
- Andy Sawyer <git@pureabstract.org>
|
||||
- Aria Edmonds <aria@ar1as.space>
|
||||
- Arialdo Martini <arialdomartini@gmail.com>
|
||||
- Arnau Roig Ninerola <arnau.ninerola@outlook.com>
|
||||
- Barak A. Pearlmutter <barak+git@pearlmutter.net>
|
||||
- Bar Magal <bmagamb@gmail.com>
|
||||
- Bart Bakker <bart@thesoftwarecraft.com>
|
||||
- Basil L. Contovounesios <contovob@tcd.ie>
|
||||
- Bastian Beischer <beischer@physik.rwth-aachen.de>
|
||||
- Benjamin Motz <benjamin.motz@mailbox.org>
|
||||
- Ben North <ben@redfrontdoor.org>
|
||||
- Ben Walton <bwalton@artsci.utoronto.ca>
|
||||
- Bob Uhl <buhl@zvelo.com>
|
||||
- Bradley Wright <brad@intranation.com>
|
||||
- Brandon W Maister <quodlibetor@gmail.com>
|
||||
- Brian Leung <leungbk@mailfence.com>
|
||||
- Brian Warner <warner@lothar.com>
|
||||
- Bryan Shell <bryan.shell@orbitz.com>
|
||||
- Buster Copley <buster@buster.me.uk>
|
||||
- Carl Lieberman <liebermancarl@gmail.com>
|
||||
- Chillar Anand <anand21nanda@gmail.com>
|
||||
- Chris Bernard <cebernard@gmail.com>
|
||||
- Chris Done <chrisdone@gmail.com>
|
||||
- Chris LaRose <cjlarose@gmail.com>
|
||||
- Chris Moore <dooglus@gmail.com>
|
||||
- Chris Ring <chris@ringthis.com>
|
||||
- Chris Shoemaker <chris@mojotech.com>
|
||||
- Christian Dietrich <christian.dietrich@informatik.uni-erlangen.de>
|
||||
- Christian Kluge <ckfrakturfreak@web.de>
|
||||
- Christophe Junke <junke.christophe@gmail.com>
|
||||
- Christopher Monsanto <chris@monsan.to>
|
||||
- Clément Pit-Claudel <clement.pitclaudel@live.com>
|
||||
- Cornelius Mika <cornelius.mika@gmail.com>
|
||||
- Craig Andera <candera@wangdera.com>
|
||||
- Dale Hagglund <dale.hagglund@gmail.com>
|
||||
- Damien Cassou <damien@cassou.me>
|
||||
- Dan Davison <dandavison7@gmail.com>
|
||||
- Dan Erikson <derikson3@gmail.com>
|
||||
- Daniel Brockman <daniel@gointeractive.se>
|
||||
- Daniel Farina <drfarina@acm.org>
|
||||
- Daniel Fleischer <daniel.fleischer@amobee.com>
|
||||
- Daniel Gröber <daniel@dps.uibk.ac.at>
|
||||
- Daniel Hackney <dan@haxney.org>
|
||||
- Daniel Kraus <daniel@kraus.my>
|
||||
- Daniel Mai <daniel@danielmai.net>
|
||||
- Daniel Martín <mardani29@yahoo.es>
|
||||
- Dan LaManna <dan.lamanna@gmail.com>
|
||||
- Danny Zhu <dzhu@dzhu.us>
|
||||
- Dato Simó <dato@net.com.org.es>
|
||||
- David Abrahams <dave@boostpro.com>
|
||||
- David Ellison <davidehellison@gmail.com>
|
||||
- David Ellison <davide@voicebox.com>
|
||||
- David Hull <david.hull@openx.com>
|
||||
- David L. Rager <ragerdl@gmail.com>
|
||||
- David Wallin <david.wallin@gmail.com>
|
||||
- Dean Kariniemi <8913263+d3k4r@users.noreply.github.com>
|
||||
- Dennis Paskorz <dennis@walltowall.com>
|
||||
- Divye Kapoor <divye@google.com>
|
||||
- Dominique Quatravaux <dominique.quatravaux@epfl.ch>
|
||||
- Dominique Quatravaux <domq@google.com>
|
||||
- Duianto Vebotci <vebotci@openmailbox.org>
|
||||
- Eli Barzilay <eli@barzilay.org>
|
||||
- Eric Davis <ed@npri.org>
|
||||
- Eric <e.a.gebhart@gmail.com>
|
||||
- Eric Prud'hommeaux <eric@w3.org>
|
||||
- Eric Schulte <schulte.eric@gmail.com>
|
||||
- Erik Anderson <erikbpanderson@gmail.com>
|
||||
- Evan Torrie <etorrie@gmail.com>
|
||||
- Evgkeni Sampelnikof <esabof@gmail.com>
|
||||
- Eyal Lotem <eyal.lotem@gmail.com>
|
||||
- Fabian Wiget <fabacino@gmail.com>
|
||||
- Felix Geller <fgeller@gmail.com>
|
||||
- Felix Yan <felixonmars@archlinux.org>
|
||||
- Feng Li <fengli@blackmagicdesign.com>
|
||||
- Florian Ragwitz <rafl@debian.org>
|
||||
- Fritz Grabo <fritz.grabo@gmail.com>
|
||||
- Fritz Stelzer <brotzeitmacher@gmail.com>
|
||||
- Geoff Shannon <geoffpshannon@gmail.com>
|
||||
- George Kadianakis <desnacked@gmail.com>
|
||||
- Graham Clark <grclark@gmail.com>
|
||||
- Graham Dobbins <gdobbins@protonmail.com>
|
||||
- Greg A. Woods <woods@planix.com>
|
||||
- Greg Lucas <greg@glucas.net>
|
||||
- Gregory Heytings <ghe@sdf.org>
|
||||
- Greg Sexton <gregsexton@gmail.com>
|
||||
- Guillaume Martres <smarter@ubuntu.com>
|
||||
- Hannu Koivisto <azure@iki.fi>
|
||||
- Hans-Peter Deifel <hpdeifel@gmx.de>
|
||||
- Hussein Ait-Lahcen <hussein.ait-lahcen@fretlink.com>
|
||||
- Ian Eure <ian.eure@gmail.com>
|
||||
- Ian Milligan <ianmllgn@gmail.com>
|
||||
- Ilya Grigoriev <ilyagr@users.noreply.github.com>
|
||||
- Ingmar Sittl <ingmar.sittl@elektrobit.com>
|
||||
- Ingo Lohmar <i.lohmar@gmail.com>
|
||||
- Ioan-Adrian Ratiu <adi@adirat.com>
|
||||
- Ivan Brennan <ivan.brennan@gmail.com>
|
||||
- Jan Tatarik <jan.tatarik@xing.com>
|
||||
- Jasper St. Pierre <jstpierre@mecheye.net>
|
||||
- Jeff Bellegarde <jbellegarde@whitepages.com>
|
||||
- Jeff Dairiki <dairiki@dairiki.org>
|
||||
- Jeremy Meng <yumeng@microsoft.com>
|
||||
- Jesse Alama <jesse.alama@gmail.com>
|
||||
- Jim Blandy <jimb@red-bean.com>
|
||||
- Joakim Jalap <JOJA@stoneridge.com>
|
||||
- Johannes Altmanninger <aclopte@gmail.com>
|
||||
- Johann Klähn <johann@jklaehn.de>
|
||||
- John Mastro <john.b.mastro@gmail.com>
|
||||
- John Morris <john@zultron.com>
|
||||
- John Wiegley <johnw@newartisans.com>
|
||||
- Jonas Bernoulli <jonas@bernoul.li>
|
||||
- Jonas Galvão Xavier <jonas.agx@gmail.com>
|
||||
- Jonathan Arnett <jonathan@scriptdrop.co>
|
||||
- Jonathan del Strother <me@delstrother.com>
|
||||
- Jonathan Leech-Pepin <jonathan.leechpepin@gmail.com>
|
||||
- Jonathan Roes <jroes@jroes.net>
|
||||
- Jon Vanderwijk <jonathn@github.com>
|
||||
- Jordan Galby <gravemind2a@gmail.com>
|
||||
- Jordan Greenberg <jordan@softwareslave.com>
|
||||
- Josh Elsasser <jelsasser@appneta.com>
|
||||
- Josiah Schwab <jschwab@gmail.com>
|
||||
- Julien Danjou <julien@danjou.info>
|
||||
- Justin Burkett <justin@burkett.cc>
|
||||
- Justin Caratzas <justin.caratzas@gmail.com>
|
||||
- Justin Guenther <jguenther@gmail.com>
|
||||
- Justin Thomas <justin.thomas1@gmail.com>
|
||||
- Kan-Ru Chen <kanru@kanru.info>
|
||||
- Kenny Ballou <kballou@devnulllabs.io>
|
||||
- Keshav Kini <keshav.kini@gmail.com>
|
||||
- Kevin Brubeck Unhammer <unhammer@fsfe.org>
|
||||
- Kevin J. Foley <kfoley15@gmail.com>
|
||||
- Kévin Le Gouguec <kevin.legouguec@gmail.com>
|
||||
- Kimberly Wolk <kimwolk@hotmail.com>
|
||||
- Knut Olav Bøhmer <bohmer@gmail.com>
|
||||
- Kyle Meyer <kyle@kyleam.com>
|
||||
- Laurent Laffont <laurent.laffont@gmail.com>
|
||||
- Laverne Schrock <laverne@schrock.email>
|
||||
- Leandro Facchinetti <me@leafac.com>
|
||||
- Lele Gaifax <lele@metapensiero.it>
|
||||
- Leo Liu <sdl.web@gmail.com>
|
||||
- Leonardo Etcheverry <leo@kalio.net>
|
||||
- Leo Vivier <leo.vivier+dev@gmail.com>
|
||||
- Lingchao Xin <douglarek@users.noreply.github.com>
|
||||
- Li-Yun Chang <michael142536@gmail.com>
|
||||
- Lluís Vilanova <vilanova@ac.upc.edu>
|
||||
- Loic Dachary <loic@dachary.org>
|
||||
- Louis Roché <louis@louisroche.net>
|
||||
- Luís Oliveira <luismbo@gmail.com>
|
||||
- Luke Amdor <luke.amdor@gmail.com>
|
||||
- Magnus Malm <magnusmalm@gmail.com>
|
||||
- Mak Kolybabi <mak@kolybabi.com>
|
||||
- Manuel Vázquez Acosta <mva.led@gmail.com>
|
||||
- Marcel Wolf <mwolf@ml1.net>
|
||||
- Marc Herbert <marc.herbert@gmail.com>
|
||||
- Marcin Bachry <hegel666@gmail.com>
|
||||
- Marco Craveiro <marco.craveiro@gmail.com>
|
||||
- Marco Wahl <marcowahlsoft@gmail.com>
|
||||
- Marc Sherry <msherry@gmail.com>
|
||||
- Marian Schubert <marian.schubert@gmail.com>
|
||||
- Mario Rodas <marsam@users.noreply.github.com>
|
||||
- Marius Vollmer <marius.vollmer@gmail.com>
|
||||
- Mark Hepburn <Mark.Hepburn@csiro.au>
|
||||
- Mark Karpov <markkarpov@opmbx.org>
|
||||
- Mark Oteiza <mvoteiza@udel.edu>
|
||||
- Martin Joerg <martin.joerg@gmail.com>
|
||||
- Martin Polden <mpolden@yahoo-inc.com>
|
||||
- Matthew Fluet <matthew.fluet@gmail.com>
|
||||
- Matthew Kraai <kraai@ftbfs.org>
|
||||
- Matthieu Hauglustaine <matt.hauglustaine@gmail.com>
|
||||
- Matus Goljer <dota.keys@gmail.com>
|
||||
- Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||
- Michael Fogleman <michaelwfogleman@gmail.com>
|
||||
- Michael Griffiths <mikey@cich.li>
|
||||
- Michael Heerdegen <michael_heerdegen@web.de>
|
||||
- Michal Sojka <sojkam1@fel.cvut.cz>
|
||||
- Miciah Masters <miciah.masters@gmail.com>
|
||||
- Miles Bader <miles@gnu.org>
|
||||
- Miloš Mošić <mosic.milos@gmail.com>
|
||||
- Mitchel Humpherys <mitch.special@gmail.com>
|
||||
- Moritz Bunkus <moritz@bunkus.org>
|
||||
- Naoya Yamashita <conao3@gmail.com>
|
||||
- Natalie Weizenbaum <nex342@gmail.com>
|
||||
- Nguyễn Tuấn Anh <ubolonton@gmail.com>
|
||||
- Nic Ferier <nic@ferrier.me.uk>
|
||||
- Nick Alcock <nick.alcock@oracle.com>
|
||||
- Nick Alexander <nalexander@mozilla.com>
|
||||
- Nick Dimiduk <ndimiduk@gmail.com>
|
||||
- Nicklas Lindgren <nili@gulmohar.se>
|
||||
- Nicolas Dudebout <nicolas.dudebout@gatech.edu>
|
||||
- Nicolas Petton <nicolas@petton.fr>
|
||||
- Nicolas Richard <theonewiththeevillook@yahoo.fr>
|
||||
- Nikolay Martynov <mar.kolya@gmail.com>
|
||||
- Noam Postavsky <npostavs@users.sourceforge.net>
|
||||
- N. Troy de Freitas <me@ntdef.com>
|
||||
- Ola x Nilsson <olani@axis.com>
|
||||
- Ole Arndt <oliver.arndt@cegedim.com>
|
||||
- Oleh Krehel <ohwoeowho@gmail.com>
|
||||
- Orivej Desh <orivej@gmx.fr>
|
||||
- Óscar Fuentes <ofv@wanadoo.es>
|
||||
- Pancho Horrillo <pancho@pancho.name>
|
||||
- Paul Stadig <paul@stadig.name>
|
||||
- Pavel Holejsovsky <pavel.holejsovsky@upek.com>
|
||||
- Pekka Pessi <nospam@pessi.fi>
|
||||
- Peter Eisentraut <peter@eisentraut.org>
|
||||
- Peter Jaros <peter.a.jaros@gmail.com>
|
||||
- Peter J. Weisberg <pj@irregularexpressions.net>
|
||||
- Peter Vasil <mail@petervasil.net>
|
||||
- Philippe Vaucher <philippe.vaucher@gmail.com>
|
||||
- Philipp Fehre <pfehre@twitter.com>
|
||||
- Philipp Haselwarter <philipp@haselwarter.org>
|
||||
- Philipp Stephani <phst@google.com>
|
||||
- Philip Weaver <philip.weaver@gmail.com>
|
||||
- Phil Jackson <phil@shellarchive.co.uk>
|
||||
- Phil Sainty <phil@catalyst.net.nz>
|
||||
- Pierre Neidhardt <ambrevar@gmail.com>
|
||||
- Pieter Praet <pieter@praet.org>
|
||||
- Prathamesh Sonpatki <csonpatki@gmail.com>
|
||||
- Pritam Baral <pritam@pritambaral.com>
|
||||
- rabio <rabiodev@o2.pl>
|
||||
- Radon Rosborough <radon.neon@gmail.com>
|
||||
- Rafael Laboissiere <rafael@laboissiere.net>
|
||||
- Raimon Grau <raimon@3scale.net>
|
||||
- Ramkumar Ramachandra <artagnon@gmail.com>
|
||||
- Remco van 't Veer <rwvtveer@xs4all.nl>
|
||||
- Rémi Vanicat <vanicat@debian.org>
|
||||
- René Stadler <mail@renestadler.de>
|
||||
- Richard Kim <emacs18@gmail.com>
|
||||
- Robert Boone <robo4288@gmail.com>
|
||||
- Robin Green <greenrd@greenrd.org>
|
||||
- Roey Darwish Dror <roey.ghost@gmail.com>
|
||||
- Roger Crew <crew@cs.stanford.edu>
|
||||
- Romain Francoise <romain@orebokech.com>
|
||||
- Ron Parker <rparker@a123systems.com>
|
||||
- Roy Crihfield <rscrihf@gmail.com>
|
||||
- Rüdiger Sonderfeld <ruediger@c-plusplus.net>
|
||||
- Russell Black <black.russell@gmail.com>
|
||||
- Ryan C. Thompson <rct@thompsonclan.org>
|
||||
- Samuel Bronson <naesten@gmail.com>
|
||||
- Samuel W. Flint <swflint@flintfam.org>
|
||||
- Sanjoy Das <sanjoy@playingwithpointers.com>
|
||||
- Sean Allred <code@seanallred.com>
|
||||
- Sean Bryant <sbryant@hackinggibsons.com>
|
||||
- Sean Whitton <spwhitton@spwhitton.name>
|
||||
- Sebastian Wiesner <lunaryorn@gmail.com>
|
||||
- Sébastien Gross <seb@chezwam.org>
|
||||
- Seong-Kook Shin <cinsky@gmail.com>
|
||||
- Sergey Pashinin <sergey@pashinin.com>
|
||||
- Sergey Vinokurov <serg.foo@gmail.com>
|
||||
- Servilio Afre Puentes <afrepues@mcmaster.ca>
|
||||
- Silent Sphere <silentsphere110@gmail.com>
|
||||
- Simon Pintarelli <simon.pintarelli@cscs.ch>
|
||||
- Štěpán Němec <stepnem@gmail.com>
|
||||
- Steven Chow <steve@myfreestuffapp.com>
|
||||
- Steven E. Harris <seh@panix.com>
|
||||
- Steven Thomas <sthomas314@gmail.com>
|
||||
- Steven Vancoillie <steven.vancoillie@runbox.com>
|
||||
- Steve Purcell <steve@sanityinc.com>
|
||||
- Suhail Shergill <suhailshergill@gmail.com>
|
||||
- Sylvain Rousseau <thisirs@gmail.com>
|
||||
- Syohei Yoshida <syohex@gmail.com>
|
||||
- Szunti <Szunti@users.noreply.github.com>
|
||||
- Takafumi Arakaki <aka.tkf@gmail.com>
|
||||
- Tassilo Horn <tsdh@gnu.org>
|
||||
- Teemu Likonen <tlikonen@iki.fi>
|
||||
- Teruki Shigitani <teruki.shigitani@gmail.com>
|
||||
- Thierry Volpiatto <thievol@posteo.net>
|
||||
- Thomas A Caswell <tcaswell@gmail.com>
|
||||
- Thomas Fini Hansen <xen@xen.dk>
|
||||
- Thomas Frössman <thomasf@jossystem.se>
|
||||
- Thomas Jost <thomas.jost@gmail.com>
|
||||
- Thomas Riccardi <riccardi.thomas@gmail.com>
|
||||
- Tibor Simko <tibor.simko@cern.ch>
|
||||
- Timo Juhani Lindfors <timo.lindfors@iki.fi>
|
||||
- Tim Perkins <tprk77@gmail.com>
|
||||
- Tim Wraight <tim@wraight.net>
|
||||
- Ting-Yu Lin <aethanyc@gmail.com>
|
||||
- Tom Feist <shabble@metavore.org>
|
||||
- Topi Miettinen <toiwoton@gmail.com>
|
||||
- Troy Hinckley <t.macman@gmail.com>
|
||||
- Tsuyoshi Kitamoto <tsuyoshi.kitamoto@gmail.com>
|
||||
- Tunc Uzlu <bb2020@users.noreply.github.com>
|
||||
- Vineet Naik <vineet@helpshift.com>
|
||||
- Vitaly Ostashov <hotosho@yandex-team.ru>
|
||||
- Vladimir Panteleev <git@thecybershadow.net>
|
||||
- Vladimir Sedach <vas@oneofus.la>
|
||||
- Wei Huang <weih@opera.com>
|
||||
- Wilfred Hughes <me@wilfred.me.uk>
|
||||
- Win Treese <treese@acm.org>
|
||||
- Wojciech Siewierski <wojciech@siewierski.eu>
|
||||
- Wouter Bolsterlee <wouter@bolsterl.ee>
|
||||
- Xavier Noria <fxn@hashref.com>
|
||||
- Xu Chunyang <mail@xuchunyang.me>
|
||||
- Yann Herklotz <git@yannherklotz.com>
|
||||
- Yann Hodique <yann.hodique@gmail.com>
|
||||
- Ynilu <ynilu.chang@gmail.com>
|
||||
- York Zhao <gtdplatform@gmail.com>
|
||||
- Yuichi Higashi <aaa707b@gmail.com>
|
||||
- Yuri Khan <yurivkhan@gmail.com>
|
||||
- Zach Latta <zach@zachlatta.com>
|
||||
- zakora <zakora@users.noreply.github.com>
|
||||
- Zhu Zihao <all_but_last@163.com>
|
||||
- zilongshanren <guanghui8827@126.com>
|
674
elpa/magit-20210414.1306/LICENSE
Normal file
674
elpa/magit-20210414.1306/LICENSE
Normal file
|
@ -0,0 +1,674 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"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.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
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
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
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
|
||||
|
||||
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
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program 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 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
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
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
18
elpa/magit-20210414.1306/dir
Normal file
18
elpa/magit-20210414.1306/dir
Normal file
|
@ -0,0 +1,18 @@
|
|||
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<Return>" 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: (magit). Using Git from Emacs with Magit.
|
828
elpa/magit-20210414.1306/git-rebase.el
Normal file
828
elpa/magit-20210414.1306/git-rebase.el
Normal file
|
@ -0,0 +1,828 @@
|
|||
;;; git-rebase.el --- Edit Git rebase files -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2010-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
|
||||
;; Author: Phil Jackson <phil@shellarchive.co.uk>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
;; This file is not part of GNU Emacs.
|
||||
|
||||
;; 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
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
|
||||
;; This file is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with this file. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; This package assists the user in editing the list of commits to be
|
||||
;; rewritten during an interactive rebase.
|
||||
|
||||
;; When the user initiates an interactive rebase, e.g. using "r e" in
|
||||
;; a Magit buffer or on the command line using "git rebase -i REV",
|
||||
;; Git invokes the `$GIT_SEQUENCE_EDITOR' (or if that is undefined
|
||||
;; `$GIT_EDITOR' or even `$EDITOR') letting the user rearrange, drop,
|
||||
;; reword, edit, and squash commits.
|
||||
|
||||
;; This package provides the major-mode `git-rebase-mode' which makes
|
||||
;; doing so much more fun, by making the buffer more colorful and
|
||||
;; providing the following commands:
|
||||
;;
|
||||
;; C-c C-c Tell Git to make it happen.
|
||||
;; C-c C-k Tell Git that you changed your mind, i.e. abort.
|
||||
;;
|
||||
;; p Move point to previous line.
|
||||
;; n Move point to next line.
|
||||
;;
|
||||
;; M-p Move the commit at point up.
|
||||
;; M-n Move the commit at point down.
|
||||
;;
|
||||
;; k Drop the commit at point.
|
||||
;; c Don't drop the commit at point.
|
||||
;; r Change the message of the commit at point.
|
||||
;; e Edit the commit at point.
|
||||
;; s Squash the commit at point, into the one above.
|
||||
;; f Like "s" but don't also edit the commit message.
|
||||
;; b Break for editing at this point in the sequence.
|
||||
;; x Add a script to be run with the commit at point
|
||||
;; being checked out.
|
||||
;; z Add noop action at point.
|
||||
;;
|
||||
;; SPC Show the commit at point in another buffer.
|
||||
;; RET Show the commit at point in another buffer and
|
||||
;; select its window.
|
||||
;; C-/ Undo last change.
|
||||
;;
|
||||
;; Commands for --rebase-merges:
|
||||
;; l Associate label with current HEAD in sequence.
|
||||
;; MM Merge specified revisions into HEAD.
|
||||
;; Mt Toggle whether the merge will invoke an editor
|
||||
;; before committing.
|
||||
;; t Reset HEAD to the specified label.
|
||||
|
||||
;; You should probably also read the `git-rebase' manpage.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'magit)
|
||||
|
||||
(require 'easymenu)
|
||||
(require 'server)
|
||||
(require 'with-editor)
|
||||
|
||||
(defvar recentf-exclude)
|
||||
|
||||
;;; Options
|
||||
;;;; Variables
|
||||
|
||||
(defgroup git-rebase nil
|
||||
"Edit Git rebase sequences."
|
||||
:link '(info-link "(magit)Editing Rebase Sequences")
|
||||
:group 'tools)
|
||||
|
||||
(defcustom git-rebase-auto-advance t
|
||||
"Whether to move to next line after changing a line."
|
||||
:group 'git-rebase
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom git-rebase-show-instructions t
|
||||
"Whether to show usage instructions inside the rebase buffer."
|
||||
:group 'git-rebase
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom git-rebase-confirm-cancel t
|
||||
"Whether confirmation is required to cancel."
|
||||
:group 'git-rebase
|
||||
:type 'boolean)
|
||||
|
||||
;;;; Faces
|
||||
|
||||
(defgroup git-rebase-faces nil
|
||||
"Faces used by Git-Rebase mode."
|
||||
:group 'faces
|
||||
:group 'git-rebase)
|
||||
|
||||
(defface git-rebase-hash '((t (:inherit magit-hash)))
|
||||
"Face for commit hashes."
|
||||
:group 'git-rebase-faces)
|
||||
|
||||
(defface git-rebase-label '((t (:inherit magit-refname)))
|
||||
"Face for labels in label, merge, and reset lines."
|
||||
:group 'git-rebase-faces)
|
||||
|
||||
(defface git-rebase-description nil
|
||||
"Face for commit descriptions."
|
||||
:group 'git-rebase-faces)
|
||||
|
||||
(defface git-rebase-killed-action
|
||||
'((t (:inherit font-lock-comment-face :strike-through t)))
|
||||
"Face for commented commit action lines."
|
||||
:group 'git-rebase-faces)
|
||||
|
||||
(defface git-rebase-comment-hash
|
||||
'((t (:inherit git-rebase-hash :weight bold)))
|
||||
"Face for commit hashes in commit message comments."
|
||||
:group 'git-rebase-faces)
|
||||
|
||||
(defface git-rebase-comment-heading
|
||||
'((t :inherit font-lock-keyword-face))
|
||||
"Face for headings in rebase message comments."
|
||||
:group 'git-commit-faces)
|
||||
|
||||
;;; Keymaps
|
||||
|
||||
(defvar git-rebase-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(set-keymap-parent map special-mode-map)
|
||||
(define-key map (kbd "C-m") 'git-rebase-show-commit)
|
||||
(define-key map (kbd "p") 'git-rebase-backward-line)
|
||||
(define-key map (kbd "n") 'forward-line)
|
||||
(define-key map (kbd "M-p") 'git-rebase-move-line-up)
|
||||
(define-key map (kbd "M-n") 'git-rebase-move-line-down)
|
||||
(define-key map (kbd "c") 'git-rebase-pick)
|
||||
(define-key map (kbd "k") 'git-rebase-kill-line)
|
||||
(define-key map (kbd "C-k") 'git-rebase-kill-line)
|
||||
(define-key map (kbd "b") 'git-rebase-break)
|
||||
(define-key map (kbd "e") 'git-rebase-edit)
|
||||
(define-key map (kbd "l") 'git-rebase-label)
|
||||
(define-key map (kbd "MM") 'git-rebase-merge)
|
||||
(define-key map (kbd "Mt") 'git-rebase-merge-toggle-editmsg)
|
||||
(define-key map (kbd "m") 'git-rebase-edit)
|
||||
(define-key map (kbd "f") 'git-rebase-fixup)
|
||||
(define-key map (kbd "q") 'undefined)
|
||||
(define-key map (kbd "r") 'git-rebase-reword)
|
||||
(define-key map (kbd "w") 'git-rebase-reword)
|
||||
(define-key map (kbd "s") 'git-rebase-squash)
|
||||
(define-key map (kbd "t") 'git-rebase-reset)
|
||||
(define-key map (kbd "x") 'git-rebase-exec)
|
||||
(define-key map (kbd "y") 'git-rebase-insert)
|
||||
(define-key map (kbd "z") 'git-rebase-noop)
|
||||
(define-key map (kbd "SPC") 'git-rebase-show-or-scroll-up)
|
||||
(define-key map (kbd "DEL") 'git-rebase-show-or-scroll-down)
|
||||
(define-key map (kbd "C-x C-t") 'git-rebase-move-line-up)
|
||||
(define-key map [M-up] 'git-rebase-move-line-up)
|
||||
(define-key map [M-down] 'git-rebase-move-line-down)
|
||||
(define-key map [remap undo] 'git-rebase-undo)
|
||||
map)
|
||||
"Keymap for Git-Rebase mode.")
|
||||
|
||||
(put 'git-rebase-reword :advertised-binding (kbd "r"))
|
||||
(put 'git-rebase-move-line-up :advertised-binding (kbd "M-p"))
|
||||
(put 'git-rebase-kill-line :advertised-binding (kbd "k"))
|
||||
|
||||
(easy-menu-define git-rebase-mode-menu git-rebase-mode-map
|
||||
"Git-Rebase mode menu"
|
||||
'("Rebase"
|
||||
["Pick" git-rebase-pick t]
|
||||
["Reword" git-rebase-reword t]
|
||||
["Edit" git-rebase-edit t]
|
||||
["Squash" git-rebase-squash t]
|
||||
["Fixup" git-rebase-fixup t]
|
||||
["Kill" git-rebase-kill-line t]
|
||||
["Noop" git-rebase-noop t]
|
||||
["Execute" git-rebase-exec t]
|
||||
["Move Down" git-rebase-move-line-down t]
|
||||
["Move Up" git-rebase-move-line-up t]
|
||||
"---"
|
||||
["Cancel" with-editor-cancel t]
|
||||
["Finish" with-editor-finish t]))
|
||||
|
||||
(defvar git-rebase-command-descriptions
|
||||
'((with-editor-finish . "tell Git to make it happen")
|
||||
(with-editor-cancel . "tell Git that you changed your mind, i.e. abort")
|
||||
(git-rebase-backward-line . "move point to previous line")
|
||||
(forward-line . "move point to next line")
|
||||
(git-rebase-move-line-up . "move the commit at point up")
|
||||
(git-rebase-move-line-down . "move the commit at point down")
|
||||
(git-rebase-show-or-scroll-up . "show the commit at point in another buffer")
|
||||
(git-rebase-show-commit
|
||||
. "show the commit at point in another buffer and select its window")
|
||||
(undo . "undo last change")
|
||||
(git-rebase-kill-line . "drop the commit at point")
|
||||
(git-rebase-insert . "insert a line for an arbitrary commit")
|
||||
(git-rebase-noop . "add noop action at point")))
|
||||
|
||||
;;; Commands
|
||||
|
||||
(defun git-rebase-pick ()
|
||||
"Use commit on current line.
|
||||
If the region is active, act on all lines touched by the region."
|
||||
(interactive)
|
||||
(git-rebase-set-action "pick"))
|
||||
|
||||
(defun git-rebase-reword ()
|
||||
"Edit message of commit on current line.
|
||||
If the region is active, act on all lines touched by the region."
|
||||
(interactive)
|
||||
(git-rebase-set-action "reword"))
|
||||
|
||||
(defun git-rebase-edit ()
|
||||
"Stop at the commit on the current line.
|
||||
If the region is active, act on all lines touched by the region."
|
||||
(interactive)
|
||||
(git-rebase-set-action "edit"))
|
||||
|
||||
(defun git-rebase-squash ()
|
||||
"Meld commit on current line into previous commit, edit message.
|
||||
If the region is active, act on all lines touched by the region."
|
||||
(interactive)
|
||||
(git-rebase-set-action "squash"))
|
||||
|
||||
(defun git-rebase-fixup ()
|
||||
"Meld commit on current line into previous commit, discard its message.
|
||||
If the region is active, act on all lines touched by the region."
|
||||
(interactive)
|
||||
(git-rebase-set-action "fixup"))
|
||||
|
||||
(defvar-local git-rebase-comment-re nil)
|
||||
|
||||
(defvar git-rebase-short-options
|
||||
'((?b . "break")
|
||||
(?e . "edit")
|
||||
(?f . "fixup")
|
||||
(?l . "label")
|
||||
(?m . "merge")
|
||||
(?p . "pick")
|
||||
(?r . "reword")
|
||||
(?s . "squash")
|
||||
(?t . "reset")
|
||||
(?x . "exec"))
|
||||
"Alist mapping single key of an action to the full name.")
|
||||
|
||||
(defclass git-rebase-action ()
|
||||
(;; action-type: commit, exec, bare, label, merge
|
||||
(action-type :initarg :action-type :initform nil)
|
||||
;; Examples for each action type:
|
||||
;; | action | action options | target | trailer |
|
||||
;; |--------+----------------+---------+---------|
|
||||
;; | pick | | hash | subject |
|
||||
;; | exec | | command | |
|
||||
;; | noop | | | |
|
||||
;; | reset | | name | subject |
|
||||
;; | merge | -C hash | name | subject |
|
||||
(action :initarg :action :initform nil)
|
||||
(action-options :initarg :action-options :initform nil)
|
||||
(target :initarg :target :initform nil)
|
||||
(trailer :initarg :trailer :initform nil)
|
||||
(comment-p :initarg :comment-p :initform nil)))
|
||||
|
||||
(defvar git-rebase-line-regexps
|
||||
`((commit . ,(concat
|
||||
(regexp-opt '("e" "edit"
|
||||
"f" "fixup"
|
||||
"p" "pick"
|
||||
"r" "reword"
|
||||
"s" "squash")
|
||||
"\\(?1:")
|
||||
" \\(?3:[^ \n]+\\) ?\\(?4:.*\\)"))
|
||||
(exec . "\\(?1:x\\|exec\\) \\(?3:.*\\)")
|
||||
(bare . ,(concat (regexp-opt '("b" "break" "noop") "\\(?1:")
|
||||
" *$"))
|
||||
(label . ,(concat (regexp-opt '("l" "label"
|
||||
"t" "reset")
|
||||
"\\(?1:")
|
||||
" \\(?3:[^ \n]+\\) ?\\(?4:.*\\)"))
|
||||
(merge . ,(concat "\\(?1:m\\|merge\\) "
|
||||
"\\(?:\\(?2:-[cC] [^ \n]+\\) \\)?"
|
||||
"\\(?3:[^ \n]+\\)"
|
||||
" ?\\(?4:.*\\)"))))
|
||||
|
||||
;;;###autoload
|
||||
(defun git-rebase-current-line ()
|
||||
"Parse current line into a `git-rebase-action' instance.
|
||||
If the current line isn't recognized as a rebase line, an
|
||||
instance with all nil values is returned."
|
||||
(save-excursion
|
||||
(goto-char (line-beginning-position))
|
||||
(if-let ((re-start (concat "^\\(?5:" (regexp-quote comment-start)
|
||||
"\\)? *"))
|
||||
(type (seq-some (lambda (arg)
|
||||
(let ((case-fold-search nil))
|
||||
(and (looking-at (concat re-start (cdr arg)))
|
||||
(car arg))))
|
||||
git-rebase-line-regexps)))
|
||||
(git-rebase-action
|
||||
:action-type type
|
||||
:action (when-let ((action (match-string-no-properties 1)))
|
||||
(or (cdr (assoc action git-rebase-short-options))
|
||||
action))
|
||||
:action-options (match-string-no-properties 2)
|
||||
:target (match-string-no-properties 3)
|
||||
:trailer (match-string-no-properties 4)
|
||||
:comment-p (and (match-string 5) t))
|
||||
;; Use default empty class rather than nil to ease handling.
|
||||
(git-rebase-action))))
|
||||
|
||||
(defun git-rebase-set-action (action)
|
||||
"Set action of commit line to ACTION.
|
||||
If the region is active, operate on all lines that it touches.
|
||||
Otherwise, operate on the current line. As a special case, an
|
||||
ACTION of nil comments the rebase line, regardless of its action
|
||||
type."
|
||||
(pcase (git-rebase-region-bounds t)
|
||||
(`(,beg ,end)
|
||||
(let ((end-marker (copy-marker end))
|
||||
(pt-below-p (and mark-active (< (mark) (point)))))
|
||||
(set-marker-insertion-type end-marker t)
|
||||
(goto-char beg)
|
||||
(while (< (point) end-marker)
|
||||
(with-slots (action-type target trailer comment-p)
|
||||
(git-rebase-current-line)
|
||||
(cond
|
||||
((and action (eq action-type 'commit))
|
||||
(let ((inhibit-read-only t))
|
||||
(magit-delete-line)
|
||||
(insert (concat action " " target " " trailer "\n"))))
|
||||
((and action-type (not (or action comment-p)))
|
||||
(let ((inhibit-read-only t))
|
||||
(insert comment-start " "))
|
||||
(forward-line))
|
||||
(t
|
||||
;; In the case of --rebase-merges, commit lines may have
|
||||
;; other lines with other action types, empty lines, and
|
||||
;; "Branch" comments interspersed. Move along.
|
||||
(forward-line)))))
|
||||
(goto-char
|
||||
(if git-rebase-auto-advance
|
||||
end-marker
|
||||
(if pt-below-p (1- end-marker) beg)))
|
||||
(goto-char (line-beginning-position))))
|
||||
(_ (ding))))
|
||||
|
||||
(defun git-rebase-line-p (&optional pos)
|
||||
(save-excursion
|
||||
(when pos (goto-char pos))
|
||||
(and (oref (git-rebase-current-line) action-type)
|
||||
t)))
|
||||
|
||||
(defun git-rebase-region-bounds (&optional fallback)
|
||||
"Return region bounds if both ends touch rebase lines.
|
||||
Each bound is extended to include the entire line touched by the
|
||||
point or mark. If the region isn't active and FALLBACK is
|
||||
non-nil, return the beginning and end of the current rebase line,
|
||||
if any."
|
||||
(cond
|
||||
((use-region-p)
|
||||
(let ((beg (save-excursion (goto-char (region-beginning))
|
||||
(line-beginning-position)))
|
||||
(end (save-excursion (goto-char (region-end))
|
||||
(line-end-position))))
|
||||
(when (and (git-rebase-line-p beg)
|
||||
(git-rebase-line-p end))
|
||||
(list beg (1+ end)))))
|
||||
((and fallback (git-rebase-line-p))
|
||||
(list (line-beginning-position)
|
||||
(1+ (line-end-position))))))
|
||||
|
||||
(defun git-rebase-move-line-down (n)
|
||||
"Move the current commit (or command) N lines down.
|
||||
If N is negative, move the commit up instead. With an active
|
||||
region, move all the lines that the region touches, not just the
|
||||
current line."
|
||||
(interactive "p")
|
||||
(pcase-let* ((`(,beg ,end)
|
||||
(or (git-rebase-region-bounds)
|
||||
(list (line-beginning-position)
|
||||
(1+ (line-end-position)))))
|
||||
(pt-offset (- (point) beg))
|
||||
(mark-offset (and mark-active (- (mark) beg))))
|
||||
(save-restriction
|
||||
(narrow-to-region
|
||||
(point-min)
|
||||
(1-
|
||||
(if git-rebase-show-instructions
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(while (or (git-rebase-line-p)
|
||||
;; The output for --rebase-merges has empty
|
||||
;; lines and "Branch" comments interspersed.
|
||||
(looking-at-p "^$")
|
||||
(looking-at-p (concat git-rebase-comment-re
|
||||
" Branch")))
|
||||
(forward-line))
|
||||
(line-beginning-position))
|
||||
(point-max))))
|
||||
(if (or (and (< n 0) (= beg (point-min)))
|
||||
(and (> n 0) (= end (point-max)))
|
||||
(> end (point-max)))
|
||||
(ding)
|
||||
(goto-char (if (< n 0) beg end))
|
||||
(forward-line n)
|
||||
(atomic-change-group
|
||||
(let ((inhibit-read-only t))
|
||||
(insert (delete-and-extract-region beg end)))
|
||||
(let ((new-beg (- (point) (- end beg))))
|
||||
(when (use-region-p)
|
||||
(setq deactivate-mark nil)
|
||||
(set-mark (+ new-beg mark-offset)))
|
||||
(goto-char (+ new-beg pt-offset))))))))
|
||||
|
||||
(defun git-rebase-move-line-up (n)
|
||||
"Move the current commit (or command) N lines up.
|
||||
If N is negative, move the commit down instead. With an active
|
||||
region, move all the lines that the region touches, not just the
|
||||
current line."
|
||||
(interactive "p")
|
||||
(git-rebase-move-line-down (- n)))
|
||||
|
||||
(defun git-rebase-highlight-region (start end window rol)
|
||||
(let ((inhibit-read-only t)
|
||||
(deactivate-mark nil)
|
||||
(bounds (git-rebase-region-bounds)))
|
||||
(mapc #'delete-overlay magit-section-highlight-overlays)
|
||||
(when bounds
|
||||
(magit-section-make-overlay (car bounds) (cadr bounds)
|
||||
'magit-section-heading-selection))
|
||||
(if (and bounds (not magit-keep-region-overlay))
|
||||
(funcall (default-value 'redisplay-unhighlight-region-function) rol)
|
||||
(funcall (default-value 'redisplay-highlight-region-function)
|
||||
start end window rol))))
|
||||
|
||||
(defun git-rebase-unhighlight-region (rol)
|
||||
(mapc #'delete-overlay magit-section-highlight-overlays)
|
||||
(funcall (default-value 'redisplay-unhighlight-region-function) rol))
|
||||
|
||||
(defun git-rebase-kill-line ()
|
||||
"Kill the current action line.
|
||||
If the region is active, act on all lines touched by the region."
|
||||
(interactive)
|
||||
(git-rebase-set-action nil))
|
||||
|
||||
(defun git-rebase-insert (rev)
|
||||
"Read an arbitrary commit and insert it below current line."
|
||||
(interactive (list (magit-read-branch-or-commit "Insert revision")))
|
||||
(forward-line)
|
||||
(--if-let (magit-rev-format "%h %s" rev)
|
||||
(let ((inhibit-read-only t))
|
||||
(insert "pick " it ?\n))
|
||||
(user-error "Unknown revision")))
|
||||
|
||||
(defun git-rebase-set-noncommit-action (action value-fn arg)
|
||||
(goto-char (line-beginning-position))
|
||||
(pcase-let* ((inhibit-read-only t)
|
||||
(`(,initial ,trailer ,comment-p)
|
||||
(and (not arg)
|
||||
(with-slots ((ln-action action)
|
||||
target trailer comment-p)
|
||||
(git-rebase-current-line)
|
||||
(and (equal ln-action action)
|
||||
(list target trailer comment-p)))))
|
||||
(value (funcall value-fn initial)))
|
||||
(pcase (list value initial comment-p)
|
||||
(`("" nil ,_)
|
||||
(ding))
|
||||
(`("" ,_ ,_)
|
||||
(magit-delete-line))
|
||||
(_
|
||||
(if initial
|
||||
(magit-delete-line)
|
||||
(forward-line))
|
||||
(insert (concat action " " value
|
||||
(and (equal value initial)
|
||||
trailer
|
||||
(concat " " trailer))
|
||||
"\n"))
|
||||
(unless git-rebase-auto-advance
|
||||
(forward-line -1))))))
|
||||
|
||||
(defun git-rebase-exec (arg)
|
||||
"Insert a shell command to be run after the current commit.
|
||||
|
||||
If there already is such a command on the current line, then edit
|
||||
that instead. With a prefix argument insert a new command even
|
||||
when there already is one on the current line. With empty input
|
||||
remove the command on the current line, if any."
|
||||
(interactive "P")
|
||||
(git-rebase-set-noncommit-action
|
||||
"exec"
|
||||
(lambda (initial) (read-shell-command "Execute: " initial))
|
||||
arg))
|
||||
|
||||
(defun git-rebase-label (arg)
|
||||
"Add a label after the current commit.
|
||||
If there already is a label on the current line, then edit that
|
||||
instead. With a prefix argument, insert a new label even when
|
||||
there is already a label on the current line. With empty input,
|
||||
remove the label on the current line, if any."
|
||||
(interactive "P")
|
||||
(git-rebase-set-noncommit-action
|
||||
"label"
|
||||
(lambda (initial)
|
||||
(read-from-minibuffer
|
||||
"Label: " initial magit-minibuffer-local-ns-map))
|
||||
arg))
|
||||
|
||||
(defun git-rebase-buffer-labels ()
|
||||
(let (labels)
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward "^\\(?:l\\|label\\) \\([^ \n]+\\)" nil t)
|
||||
(push (match-string-no-properties 1) labels)))
|
||||
(nreverse labels)))
|
||||
|
||||
(defun git-rebase-reset (arg)
|
||||
"Reset the current HEAD to a label.
|
||||
If there already is a reset command on the current line, then
|
||||
edit that instead. With a prefix argument, insert a new reset
|
||||
line even when point is already on a reset line. With empty
|
||||
input, remove the reset command on the current line, if any."
|
||||
(interactive "P")
|
||||
(git-rebase-set-noncommit-action
|
||||
"reset"
|
||||
(lambda (initial)
|
||||
(or (magit-completing-read "Label" (git-rebase-buffer-labels)
|
||||
nil t initial)
|
||||
""))
|
||||
arg))
|
||||
|
||||
(defun git-rebase-merge (arg)
|
||||
"Add a merge command after the current commit.
|
||||
If there is already a merge command on the current line, then
|
||||
replace that command instead. With a prefix argument, insert a
|
||||
new merge command even when there is already one on the current
|
||||
line. With empty input, remove the merge command on the current
|
||||
line, if any."
|
||||
(interactive "P")
|
||||
(git-rebase-set-noncommit-action
|
||||
"merge"
|
||||
(lambda (_)
|
||||
(or (magit-completing-read "Merge" (git-rebase-buffer-labels))
|
||||
""))
|
||||
arg))
|
||||
|
||||
(defun git-rebase-merge-toggle-editmsg ()
|
||||
"Toggle whether an editor is invoked when performing the merge at point.
|
||||
When a merge command uses a lower-case -c, the message for the
|
||||
specified commit will be opened in an editor before creating the
|
||||
commit. For an upper-case -C, the message will be used as is."
|
||||
(interactive)
|
||||
(with-slots (action-type target action-options trailer)
|
||||
(git-rebase-current-line)
|
||||
(if (eq action-type 'merge)
|
||||
(let ((inhibit-read-only t))
|
||||
(magit-delete-line)
|
||||
(insert
|
||||
(format "merge %s %s %s\n"
|
||||
(replace-regexp-in-string
|
||||
"-[cC]" (lambda (c)
|
||||
(if (equal c "-c") "-C" "-c"))
|
||||
action-options t t)
|
||||
target
|
||||
trailer)))
|
||||
(ding))))
|
||||
|
||||
(defun git-rebase-set-bare-action (action arg)
|
||||
(goto-char (line-beginning-position))
|
||||
(with-slots ((ln-action action) comment-p)
|
||||
(git-rebase-current-line)
|
||||
(let ((same-action-p (equal action ln-action))
|
||||
(inhibit-read-only t))
|
||||
(when (or arg
|
||||
(not ln-action)
|
||||
(not same-action-p)
|
||||
(and same-action-p comment-p))
|
||||
(unless (or arg (not same-action-p))
|
||||
(magit-delete-line))
|
||||
(insert action ?\n)
|
||||
(unless git-rebase-auto-advance
|
||||
(forward-line -1))))))
|
||||
|
||||
(defun git-rebase-noop (&optional arg)
|
||||
"Add noop action at point.
|
||||
|
||||
If the current line already contains a noop action, leave it
|
||||
unchanged. If there is a commented noop action present, remove
|
||||
the comment. Otherwise add a new noop action. With a prefix
|
||||
argument insert a new noop action regardless of what is already
|
||||
present on the current line.
|
||||
|
||||
A noop action can be used to make git perform a rebase even if
|
||||
no commits are selected. Without the noop action present, git
|
||||
would see an empty file and therefore do nothing."
|
||||
(interactive "P")
|
||||
(git-rebase-set-bare-action "noop" arg))
|
||||
|
||||
(defun git-rebase-break (&optional arg)
|
||||
"Add break action at point.
|
||||
|
||||
If there is a commented break action present, remove the comment.
|
||||
If the current line already contains a break action, add another
|
||||
break action only if a prefix argument is given.
|
||||
|
||||
A break action can be used to interrupt the rebase at the
|
||||
specified point. It is particularly useful for pausing before
|
||||
the first commit in the sequence. For other cases, the
|
||||
equivalent behavior can be achieved with `git-rebase-edit'."
|
||||
(interactive "P")
|
||||
(git-rebase-set-bare-action "break" arg))
|
||||
|
||||
(defun git-rebase-undo (&optional arg)
|
||||
"Undo some previous changes.
|
||||
Like `undo' but works in read-only buffers."
|
||||
(interactive "P")
|
||||
(let ((inhibit-read-only t))
|
||||
(undo arg)))
|
||||
|
||||
(defun git-rebase--show-commit (&optional scroll)
|
||||
(let ((disable-magit-save-buffers t))
|
||||
(save-excursion
|
||||
(goto-char (line-beginning-position))
|
||||
(--if-let (with-slots (action-type target) (git-rebase-current-line)
|
||||
(and (eq action-type 'commit)
|
||||
target))
|
||||
(pcase scroll
|
||||
(`up (magit-diff-show-or-scroll-up))
|
||||
(`down (magit-diff-show-or-scroll-down))
|
||||
(_ (apply #'magit-show-commit it
|
||||
(magit-diff-arguments 'magit-revision-mode))))
|
||||
(ding)))))
|
||||
|
||||
(defun git-rebase-show-commit ()
|
||||
"Show the commit on the current line if any."
|
||||
(interactive)
|
||||
(git-rebase--show-commit))
|
||||
|
||||
(defun git-rebase-show-or-scroll-up ()
|
||||
"Update the commit buffer for commit on current line.
|
||||
|
||||
Either show the commit at point in the appropriate buffer, or if
|
||||
that buffer is already being displayed in the current frame and
|
||||
contains information about that commit, then instead scroll the
|
||||
buffer up."
|
||||
(interactive)
|
||||
(git-rebase--show-commit 'up))
|
||||
|
||||
(defun git-rebase-show-or-scroll-down ()
|
||||
"Update the commit buffer for commit on current line.
|
||||
|
||||
Either show the commit at point in the appropriate buffer, or if
|
||||
that buffer is already being displayed in the current frame and
|
||||
contains information about that commit, then instead scroll the
|
||||
buffer down."
|
||||
(interactive)
|
||||
(git-rebase--show-commit 'down))
|
||||
|
||||
(defun git-rebase-backward-line (&optional n)
|
||||
"Move N lines backward (forward if N is negative).
|
||||
Like `forward-line' but go into the opposite direction."
|
||||
(interactive "p")
|
||||
(forward-line (- (or n 1))))
|
||||
|
||||
;;; Mode
|
||||
|
||||
;;;###autoload
|
||||
(define-derived-mode git-rebase-mode special-mode "Git Rebase"
|
||||
"Major mode for editing of a Git rebase file.
|
||||
|
||||
Rebase files are generated when you run 'git rebase -i' or run
|
||||
`magit-interactive-rebase'. They describe how Git should perform
|
||||
the rebase. See the documentation for git-rebase (e.g., by
|
||||
running 'man git-rebase' at the command line) for details."
|
||||
:group 'git-rebase
|
||||
(setq comment-start (or (magit-get "core.commentChar") "#"))
|
||||
(setq git-rebase-comment-re (concat "^" (regexp-quote comment-start)))
|
||||
(setq font-lock-defaults (list (git-rebase-mode-font-lock-keywords) t t))
|
||||
(unless git-rebase-show-instructions
|
||||
(let ((inhibit-read-only t))
|
||||
(flush-lines git-rebase-comment-re)))
|
||||
(unless with-editor-mode
|
||||
;; Maybe already enabled when using `shell-command' or an Emacs shell.
|
||||
(with-editor-mode 1))
|
||||
(when git-rebase-confirm-cancel
|
||||
(add-hook 'with-editor-cancel-query-functions
|
||||
'git-rebase-cancel-confirm nil t))
|
||||
(setq-local redisplay-highlight-region-function 'git-rebase-highlight-region)
|
||||
(setq-local redisplay-unhighlight-region-function 'git-rebase-unhighlight-region)
|
||||
(add-hook 'with-editor-pre-cancel-hook 'git-rebase-autostash-save nil t)
|
||||
(add-hook 'with-editor-post-cancel-hook 'git-rebase-autostash-apply nil t)
|
||||
(setq imenu-prev-index-position-function
|
||||
#'magit-imenu--rebase-prev-index-position-function)
|
||||
(setq imenu-extract-index-name-function
|
||||
#'magit-imenu--rebase-extract-index-name-function)
|
||||
(when (boundp 'save-place)
|
||||
(setq save-place nil)))
|
||||
|
||||
(defun git-rebase-cancel-confirm (force)
|
||||
(or (not (buffer-modified-p))
|
||||
force
|
||||
(magit-confirm 'abort-rebase "Abort this rebase" nil 'noabort)))
|
||||
|
||||
(defun git-rebase-autostash-save ()
|
||||
(--when-let (magit-file-line (magit-git-dir "rebase-merge/autostash"))
|
||||
(push (cons 'stash it) with-editor-cancel-alist)))
|
||||
|
||||
(defun git-rebase-autostash-apply ()
|
||||
(--when-let (cdr (assq 'stash with-editor-cancel-alist))
|
||||
(magit-stash-apply it)))
|
||||
|
||||
(defun git-rebase-match-comment-line (limit)
|
||||
(re-search-forward (concat git-rebase-comment-re ".*") limit t))
|
||||
|
||||
(defun git-rebase-mode-font-lock-keywords ()
|
||||
"Font lock keywords for Git-Rebase mode."
|
||||
`((,(concat "^" (cdr (assq 'commit git-rebase-line-regexps)))
|
||||
(1 'font-lock-keyword-face)
|
||||
(3 'git-rebase-hash)
|
||||
(4 'git-rebase-description))
|
||||
(,(concat "^" (cdr (assq 'exec git-rebase-line-regexps)))
|
||||
(1 'font-lock-keyword-face)
|
||||
(3 'git-rebase-description))
|
||||
(,(concat "^" (cdr (assq 'bare git-rebase-line-regexps)))
|
||||
(1 'font-lock-keyword-face))
|
||||
(,(concat "^" (cdr (assq 'label git-rebase-line-regexps)))
|
||||
(1 'font-lock-keyword-face)
|
||||
(3 'git-rebase-label)
|
||||
(4 'font-lock-comment-face))
|
||||
("^\\(m\\(?:erge\\)?\\) -[Cc] \\([^ \n]+\\) \\([^ \n]+\\)\\( #.*\\)?"
|
||||
(1 'font-lock-keyword-face)
|
||||
(2 'git-rebase-hash)
|
||||
(3 'git-rebase-label)
|
||||
(4 'font-lock-comment-face))
|
||||
("^\\(m\\(?:erge\\)?\\) \\([^ \n]+\\)"
|
||||
(1 'font-lock-keyword-face)
|
||||
(2 'git-rebase-label))
|
||||
(,(concat git-rebase-comment-re " *"
|
||||
(cdr (assq 'commit git-rebase-line-regexps)))
|
||||
0 'git-rebase-killed-action t)
|
||||
(git-rebase-match-comment-line 0 'font-lock-comment-face)
|
||||
("\\[[^[]*\\]"
|
||||
0 'magit-keyword t)
|
||||
("\\(?:fixup!\\|squash!\\)"
|
||||
0 'magit-keyword-squash t)
|
||||
(,(format "^%s Rebase \\([^ ]*\\) onto \\([^ ]*\\)" comment-start)
|
||||
(1 'git-rebase-comment-hash t)
|
||||
(2 'git-rebase-comment-hash t))
|
||||
(,(format "^%s \\(Commands:\\)" comment-start)
|
||||
(1 'git-rebase-comment-heading t))
|
||||
(,(format "^%s Branch \\(.*\\)" comment-start)
|
||||
(1 'git-rebase-label t))))
|
||||
|
||||
(defun git-rebase-mode-show-keybindings ()
|
||||
"Modify the \"Commands:\" section of the comment Git generates
|
||||
at the bottom of the file so that in place of the one-letter
|
||||
abbreviation for the command, it shows the command's keybinding.
|
||||
By default, this is the same except for the \"pick\" command."
|
||||
(let ((inhibit-read-only t))
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(when (and git-rebase-show-instructions
|
||||
(re-search-forward
|
||||
(concat git-rebase-comment-re "\\s-+p, pick")
|
||||
nil t))
|
||||
(goto-char (line-beginning-position))
|
||||
(pcase-dolist (`(,cmd . ,desc) git-rebase-command-descriptions)
|
||||
(insert (format "%s %-8s %s\n"
|
||||
comment-start
|
||||
(substitute-command-keys (format "\\[%s]" cmd))
|
||||
desc)))
|
||||
(while (re-search-forward (concat git-rebase-comment-re
|
||||
"\\( ?\\)\\([^\n,],\\) "
|
||||
"\\([^\n ]+\\) ")
|
||||
nil t)
|
||||
(let ((cmd (intern (concat "git-rebase-" (match-string 3)))))
|
||||
(if (not (fboundp cmd))
|
||||
(delete-region (line-beginning-position) (1+ (line-end-position)))
|
||||
(replace-match " " t t nil 1)
|
||||
(replace-match
|
||||
(format "%-8s"
|
||||
(mapconcat #'key-description
|
||||
(--remove (eq (elt it 0) 'menu-bar)
|
||||
(reverse (where-is-internal
|
||||
cmd git-rebase-mode-map)))
|
||||
", "))
|
||||
t t nil 2))))))))
|
||||
|
||||
(add-hook 'git-rebase-mode-hook 'git-rebase-mode-show-keybindings t)
|
||||
|
||||
(defun git-rebase-mode-disable-before-save-hook ()
|
||||
(set (make-local-variable 'before-save-hook) nil))
|
||||
|
||||
(add-hook 'git-rebase-mode-hook 'git-rebase-mode-disable-before-save-hook)
|
||||
|
||||
;;;###autoload
|
||||
(defconst git-rebase-filename-regexp "/git-rebase-todo\\'")
|
||||
;;;###autoload
|
||||
(add-to-list 'auto-mode-alist
|
||||
(cons git-rebase-filename-regexp 'git-rebase-mode))
|
||||
|
||||
(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))
|
||||
|
||||
(add-to-list 'with-editor-file-name-history-exclude git-rebase-filename-regexp)
|
||||
|
||||
;;; _
|
||||
(provide 'git-rebase)
|
||||
;;; git-rebase.el ends here
|
BIN
elpa/magit-20210414.1306/git-rebase.elc
Normal file
BIN
elpa/magit-20210414.1306/git-rebase.elc
Normal file
Binary file not shown.
733
elpa/magit-20210414.1306/magit-apply.el
Normal file
733
elpa/magit-20210414.1306/magit-apply.el
Normal file
|
@ -0,0 +1,733 @@
|
|||
;;; magit-apply.el --- apply Git diffs -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2010-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
|
||||
;; Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
;; Magit is free software; you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
;;
|
||||
;; Magit is distributed in the hope that it will be useful, but WITHOUT
|
||||
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
;; License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Magit. If not, see http://www.gnu.org/licenses.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; This library implements commands for applying Git diffs or parts
|
||||
;; of such a diff. The supported "apply variants" are apply, stage,
|
||||
;; unstage, discard, and reverse - more than Git itself knows about,
|
||||
;; at least at the porcelain level.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'magit-core)
|
||||
(require 'magit-diff)
|
||||
(require 'magit-wip)
|
||||
|
||||
(require 'transient) ; See #3732.
|
||||
|
||||
;; For `magit-apply'
|
||||
(declare-function magit-am "magit-sequence" ())
|
||||
(declare-function magit-patch-apply "magit-files" ())
|
||||
;; For `magit-discard-files'
|
||||
(declare-function magit-checkout-stage "magit-merge" (file arg))
|
||||
(declare-function magit-checkout-read-stage "magit-merge" (file))
|
||||
(defvar auto-revert-verbose)
|
||||
;; For `magit-stage-untracked'
|
||||
(declare-function magit-submodule-add-1 "magit-submodule"
|
||||
(url &optional path name args))
|
||||
(declare-function magit-submodule-read-name-for-path "magit-submodule"
|
||||
(path &optional prefer-short))
|
||||
(declare-function borg--maybe-absorb-gitdir "borg" (pkg))
|
||||
(declare-function borg--sort-submodule-sections "borg" (file))
|
||||
(declare-function borg-assimilate "borg" (package url &optional partially))
|
||||
(defvar borg-user-emacs-directory)
|
||||
|
||||
;;; Options
|
||||
|
||||
(defcustom magit-delete-by-moving-to-trash t
|
||||
"Whether Magit uses the system's trash can.
|
||||
|
||||
You should absolutely not disable this and also remove `discard'
|
||||
from `magit-no-confirm'. You shouldn't do that even if you have
|
||||
all of the Magit-Wip modes enabled, because those modes do not
|
||||
track any files that are not tracked in the proper branch."
|
||||
:package-version '(magit . "2.1.0")
|
||||
:group 'magit-essentials
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom magit-unstage-committed t
|
||||
"Whether unstaging a committed change reverts it instead.
|
||||
|
||||
A committed change cannot be unstaged, because staging and
|
||||
unstaging are actions that are concerned with the differences
|
||||
between the index and the working tree, not with committed
|
||||
changes.
|
||||
|
||||
If this option is non-nil (the default), then typing \"u\"
|
||||
\(`magit-unstage') on a committed change, causes it to be
|
||||
reversed in the index but not the working tree. For more
|
||||
information see command `magit-reverse-in-index'."
|
||||
:package-version '(magit . "2.4.1")
|
||||
:group 'magit-commands
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom magit-reverse-atomically nil
|
||||
"Whether to reverse changes atomically.
|
||||
|
||||
If some changes can be reversed while others cannot, then nothing
|
||||
is reversed if the value of this option is non-nil. But when it
|
||||
is nil, then the changes that can be reversed are reversed and
|
||||
for the other changes diff files are created that contain the
|
||||
rejected reversals."
|
||||
:package-version '(magit . "2.7.0")
|
||||
:group 'magit-commands
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom magit-post-stage-hook nil
|
||||
"Hook run after staging changes.
|
||||
This hook is run by `magit-refresh' if `this-command'
|
||||
is a member of `magit-post-stage-hook-commands'."
|
||||
:package-version '(magit . "2.90.0")
|
||||
:group 'magit-commands
|
||||
:type 'hook)
|
||||
|
||||
(defvar magit-post-stage-hook-commands
|
||||
'(magit-stage magit-stage-file magit-stage-modified))
|
||||
|
||||
(defcustom magit-post-unstage-hook nil
|
||||
"Hook run after unstaging changes.
|
||||
This hook is run by `magit-refresh' if `this-command'
|
||||
is a member of `magit-post-unstage-hook-commands'."
|
||||
:package-version '(magit . "2.90.0")
|
||||
:group 'magit-commands
|
||||
:type 'hook)
|
||||
|
||||
(defvar magit-post-unstage-hook-commands
|
||||
'(magit-unstage magit-unstage-file magit-unstage-all))
|
||||
|
||||
;;; Commands
|
||||
;;;; Apply
|
||||
|
||||
(defun magit-apply (&rest args)
|
||||
"Apply the change at point to the working tree.
|
||||
With a prefix argument fallback to a 3-way merge. Doing
|
||||
so causes the change to be applied to the index as well."
|
||||
(interactive (and current-prefix-arg (list "--3way")))
|
||||
(--when-let (magit-apply--get-selection)
|
||||
(pcase (list (magit-diff-type) (magit-diff-scope))
|
||||
(`(,(or `unstaged `staged) ,_)
|
||||
(user-error "Change is already in the working tree"))
|
||||
(`(untracked ,(or `file `files))
|
||||
(call-interactively 'magit-am))
|
||||
(`(,_ region) (magit-apply-region it args))
|
||||
(`(,_ hunk) (magit-apply-hunk it args))
|
||||
(`(,_ hunks) (magit-apply-hunks it args))
|
||||
(`(rebase-sequence file)
|
||||
(call-interactively 'magit-patch-apply))
|
||||
(`(,_ file) (magit-apply-diff it args))
|
||||
(`(,_ files) (magit-apply-diffs it args)))))
|
||||
|
||||
(defun magit-apply--section-content (section)
|
||||
(buffer-substring-no-properties (if (magit-hunk-section-p section)
|
||||
(oref section start)
|
||||
(oref section content))
|
||||
(oref section end)))
|
||||
|
||||
(defun magit-apply-diffs (sections &rest args)
|
||||
(setq sections (magit-apply--get-diffs sections))
|
||||
(magit-apply-patch sections args
|
||||
(mapconcat
|
||||
(lambda (s)
|
||||
(concat (magit-diff-file-header s)
|
||||
(magit-apply--section-content s)))
|
||||
sections "")))
|
||||
|
||||
(defun magit-apply-diff (section &rest args)
|
||||
(setq section (car (magit-apply--get-diffs (list section))))
|
||||
(magit-apply-patch section args
|
||||
(concat (magit-diff-file-header section)
|
||||
(magit-apply--section-content section))))
|
||||
|
||||
(defun magit-apply--adjust-hunk-new-starts (hunks)
|
||||
"Adjust new line numbers in headers of HUNKS for partial application.
|
||||
HUNKS should be a list of ordered, contiguous hunks to be applied
|
||||
from a file. For example, if there is a sequence of hunks with
|
||||
the headers
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
@@ -10,6 +11,7 @@
|
||||
@@ -18,6 +20,7 @@
|
||||
|
||||
and only the second and third are to be applied, they would be
|
||||
adjusted as \"@@ -10,6 +10,7 @@\" and \"@@ -18,6 +19,7 @@\"."
|
||||
(let* ((first-hunk (car hunks))
|
||||
(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"))))
|
||||
(if (= offset 0)
|
||||
hunks
|
||||
(mapcar (lambda (hunk)
|
||||
(if (string-match diff-hunk-header-re-unified hunk)
|
||||
(replace-match (number-to-string
|
||||
(- (string-to-number (match-string 3 hunk))
|
||||
offset))
|
||||
t t hunk 3)
|
||||
(error "Hunk does not have expected header")))
|
||||
hunks))))
|
||||
|
||||
(defun magit-apply--adjust-hunk-new-start (hunk)
|
||||
(car (magit-apply--adjust-hunk-new-starts (list hunk))))
|
||||
|
||||
(defun magit-apply-hunks (sections &rest args)
|
||||
(let ((section (oref (car sections) parent)))
|
||||
(when (string-match "^diff --cc" (oref section value))
|
||||
(user-error "Cannot un-/stage resolution hunks. Stage the whole file"))
|
||||
(magit-apply-patch
|
||||
section args
|
||||
(concat (oref section header)
|
||||
(mapconcat #'identity
|
||||
(magit-apply--adjust-hunk-new-starts
|
||||
(mapcar #'magit-apply--section-content sections))
|
||||
"")))))
|
||||
|
||||
(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)))))
|
||||
|
||||
(defun magit-apply-region (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-diff-hunk-region-patch section args)))))
|
||||
|
||||
(defun magit-apply-patch (section:s args patch)
|
||||
(let* ((files (if (atom section:s)
|
||||
(list (oref section:s value))
|
||||
(--map (oref it value) section:s)))
|
||||
(command (symbol-name this-command))
|
||||
(command (if (and command (string-match "^magit-\\([^-]+\\)" command))
|
||||
(match-string 1 command)
|
||||
"apply"))
|
||||
(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 magit-inhibit-refresh))
|
||||
(magit-wip-commit-before-change files (concat " before " command)))
|
||||
(with-temp-buffer
|
||||
(insert patch)
|
||||
(magit-run-git-with-input
|
||||
"apply" args "-p0"
|
||||
(and ignore-context "-C0")
|
||||
"--ignore-space-change" "-"))
|
||||
(unless magit-inhibit-refresh
|
||||
(when magit-wip-after-apply-mode
|
||||
(magit-wip-commit-after-apply files (concat " after " command)))
|
||||
(magit-refresh))))
|
||||
|
||||
(defun magit-apply--get-selection ()
|
||||
(or (magit-region-sections '(hunk file module) t)
|
||||
(let ((section (magit-current-section)))
|
||||
(pcase (oref section type)
|
||||
((or `hunk `file `module) section)
|
||||
((or `staged `unstaged `untracked
|
||||
`stashed-index `stashed-worktree `stashed-untracked)
|
||||
(oref section children))
|
||||
(_ (user-error "Cannot apply this, it's not a change"))))))
|
||||
|
||||
(defun magit-apply--get-diffs (sections)
|
||||
(magit-section-case
|
||||
([file diffstat]
|
||||
(--map (or (magit-get-section
|
||||
(append `((file . ,(oref it value)))
|
||||
(magit-section-ident magit-root-section)))
|
||||
(error "Cannot get required diff headers"))
|
||||
sections))
|
||||
(t sections)))
|
||||
|
||||
(defun magit-apply--diff-ignores-whitespace-p ()
|
||||
(and (cl-intersection magit-buffer-diff-args
|
||||
'("--ignore-space-at-eol"
|
||||
"--ignore-space-change"
|
||||
"--ignore-all-space"
|
||||
"--ignore-blank-lines")
|
||||
:test #'equal)
|
||||
t))
|
||||
|
||||
;;;; Stage
|
||||
|
||||
(defun magit-stage (&optional intent)
|
||||
"Add the change at point to the staging area.
|
||||
With a prefix argument, INTENT, and an untracked file (or files)
|
||||
at point, stage the file but not its content."
|
||||
(interactive "P")
|
||||
(--if-let (and (derived-mode-p 'magit-mode) (magit-apply--get-selection))
|
||||
(pcase (list (magit-diff-type)
|
||||
(magit-diff-scope)
|
||||
(magit-apply--diff-ignores-whitespace-p))
|
||||
(`(untracked ,_ ,_) (magit-stage-untracked intent))
|
||||
(`(unstaged region ,_) (magit-apply-region it "--cached"))
|
||||
(`(unstaged hunk ,_) (magit-apply-hunk it "--cached"))
|
||||
(`(unstaged hunks ,_) (magit-apply-hunks it "--cached"))
|
||||
(`(unstaged file t) (magit-apply-diff it "--cached"))
|
||||
(`(unstaged files t) (magit-apply-diffs it "--cached"))
|
||||
(`(unstaged list t) (magit-apply-diffs it "--cached"))
|
||||
(`(unstaged file nil) (magit-stage-1 "-u" (list (oref it value))))
|
||||
(`(unstaged files nil) (magit-stage-1 "-u" (magit-region-values nil t)))
|
||||
(`(unstaged list nil) (magit-stage-modified))
|
||||
(`(staged ,_ ,_) (user-error "Already staged"))
|
||||
(`(committed ,_ ,_) (user-error "Cannot stage committed changes"))
|
||||
(`(undefined ,_ ,_) (user-error "Cannot stage this change")))
|
||||
(call-interactively 'magit-stage-file)))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-stage-file (file)
|
||||
"Stage all changes to FILE.
|
||||
With a prefix argument or when there is no file at point ask for
|
||||
the file to be staged. Otherwise stage the file at point without
|
||||
requiring confirmation."
|
||||
(interactive
|
||||
(let* ((atpoint (magit-section-value-if 'file))
|
||||
(current (magit-file-relative-name))
|
||||
(choices (nconc (magit-unstaged-files)
|
||||
(magit-untracked-files)))
|
||||
(default (car (member (or atpoint current) choices))))
|
||||
(list (if (or current-prefix-arg (not default))
|
||||
(magit-completing-read "Stage file" choices
|
||||
nil t nil nil default)
|
||||
default))))
|
||||
(magit-with-toplevel
|
||||
(magit-stage-1 nil (list file))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-stage-modified (&optional all)
|
||||
"Stage all changes to files modified in the worktree.
|
||||
Stage all new content of tracked files and remove tracked files
|
||||
that no longer exist in the working tree from the index also.
|
||||
With a prefix argument also stage previously untracked (but not
|
||||
ignored) files."
|
||||
(interactive "P")
|
||||
(when (magit-anything-staged-p)
|
||||
(magit-confirm 'stage-all-changes))
|
||||
(magit-with-toplevel
|
||||
(magit-stage-1 (if all "--all" "-u") magit-buffer-diff-files)))
|
||||
|
||||
(defun magit-stage-1 (arg &optional files)
|
||||
(magit-wip-commit-before-change files " before stage")
|
||||
(magit-run-git "add" arg (if files (cons "--" files) "."))
|
||||
(when magit-auto-revert-mode
|
||||
(mapc #'magit-turn-on-auto-revert-mode-if-desired files))
|
||||
(magit-wip-commit-after-apply files " after stage"))
|
||||
|
||||
(defun magit-stage-untracked (&optional intent)
|
||||
(let* ((section (magit-current-section))
|
||||
(files (pcase (magit-diff-scope)
|
||||
(`file (list (oref section value)))
|
||||
(`files (magit-region-values nil t))
|
||||
(`list (magit-untracked-files))))
|
||||
plain repos)
|
||||
(dolist (file files)
|
||||
(if (and (not (file-symlink-p file))
|
||||
(magit-git-repo-p file t))
|
||||
(push file repos)
|
||||
(push file plain)))
|
||||
(magit-wip-commit-before-change files " before stage")
|
||||
(when plain
|
||||
(magit-run-git "add" (and intent "--intent-to-add")
|
||||
"--" plain)
|
||||
(when magit-auto-revert-mode
|
||||
(mapc #'magit-turn-on-auto-revert-mode-if-desired plain)))
|
||||
(dolist (repo repos)
|
||||
(save-excursion
|
||||
(goto-char (oref (magit-get-section
|
||||
`((file . ,repo) (untracked) (status)))
|
||||
start))
|
||||
(let* ((topdir (magit-toplevel))
|
||||
(url (let ((default-directory
|
||||
(file-name-as-directory (expand-file-name repo))))
|
||||
(or (magit-get "remote" (magit-get-some-remote) "url")
|
||||
(concat (file-name-as-directory ".") repo))))
|
||||
(package
|
||||
(and (equal (bound-and-true-p borg-user-emacs-directory)
|
||||
topdir)
|
||||
(file-name-nondirectory (directory-file-name repo)))))
|
||||
(if (and package
|
||||
(y-or-n-p (format "Also assimilate `%s' drone?" package)))
|
||||
(borg-assimilate package url)
|
||||
(magit-submodule-add-1
|
||||
url repo (magit-submodule-read-name-for-path repo package))
|
||||
(when package
|
||||
(borg--sort-submodule-sections
|
||||
(expand-file-name ".gitmodules" topdir))
|
||||
(let ((default-directory borg-user-emacs-directory))
|
||||
(borg--maybe-absorb-gitdir package)))))))
|
||||
(magit-wip-commit-after-apply files " after stage")))
|
||||
|
||||
;;;; Unstage
|
||||
|
||||
(defun magit-unstage ()
|
||||
"Remove the change at point from the staging area."
|
||||
(interactive)
|
||||
(--when-let (magit-apply--get-selection)
|
||||
(pcase (list (magit-diff-type)
|
||||
(magit-diff-scope)
|
||||
(magit-apply--diff-ignores-whitespace-p))
|
||||
(`(untracked ,_ ,_) (user-error "Cannot unstage untracked changes"))
|
||||
(`(unstaged file ,_) (magit-unstage-intent (list (oref it value))))
|
||||
(`(unstaged files ,_) (magit-unstage-intent (magit-region-values nil t)))
|
||||
(`(unstaged ,_ ,_) (user-error "Already unstaged"))
|
||||
(`(staged region ,_) (magit-apply-region it "--reverse" "--cached"))
|
||||
(`(staged hunk ,_) (magit-apply-hunk it "--reverse" "--cached"))
|
||||
(`(staged hunks ,_) (magit-apply-hunks it "--reverse" "--cached"))
|
||||
(`(staged file t) (magit-apply-diff it "--reverse" "--cached"))
|
||||
(`(staged files t) (magit-apply-diffs it "--reverse" "--cached"))
|
||||
(`(staged list t) (magit-apply-diffs it "--reverse" "--cached"))
|
||||
(`(staged file nil) (magit-unstage-1 (list (oref it value))))
|
||||
(`(staged files nil) (magit-unstage-1 (magit-region-values nil t)))
|
||||
(`(staged list nil) (magit-unstage-all))
|
||||
(`(committed ,_ ,_) (if magit-unstage-committed
|
||||
(magit-reverse-in-index)
|
||||
(user-error "Cannot unstage committed changes")))
|
||||
(`(undefined ,_ ,_) (user-error "Cannot unstage this change")))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-unstage-file (file)
|
||||
"Unstage all changes to FILE.
|
||||
With a prefix argument or when there is no file at point ask for
|
||||
the file to be unstaged. Otherwise unstage the file at point
|
||||
without requiring confirmation."
|
||||
(interactive
|
||||
(let* ((atpoint (magit-section-value-if 'file))
|
||||
(current (magit-file-relative-name))
|
||||
(choices (magit-staged-files))
|
||||
(default (car (member (or atpoint current) choices))))
|
||||
(list (if (or current-prefix-arg (not default))
|
||||
(magit-completing-read "Unstage file" choices
|
||||
nil t nil nil default)
|
||||
default))))
|
||||
(magit-with-toplevel
|
||||
(magit-unstage-1 (list file))))
|
||||
|
||||
(defun magit-unstage-1 (files)
|
||||
(magit-wip-commit-before-change files " before unstage")
|
||||
(if (magit-no-commit-p)
|
||||
(magit-run-git "rm" "--cached" "--" files)
|
||||
(magit-run-git "reset" "HEAD" "--" files))
|
||||
(magit-wip-commit-after-apply files " after unstage"))
|
||||
|
||||
(defun magit-unstage-intent (files)
|
||||
(if-let ((staged (magit-staged-files))
|
||||
(intent (--filter (member it staged) files)))
|
||||
(magit-unstage-1 intent)
|
||||
(user-error "Already unstaged")))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-unstage-all ()
|
||||
"Remove all changes from the staging area."
|
||||
(interactive)
|
||||
(when (or (magit-anything-unstaged-p)
|
||||
(magit-untracked-files))
|
||||
(magit-confirm 'unstage-all-changes))
|
||||
(magit-wip-commit-before-change nil " before unstage")
|
||||
(magit-run-git "reset" "HEAD" "--" magit-buffer-diff-files)
|
||||
(magit-wip-commit-after-apply nil " after unstage"))
|
||||
|
||||
;;;; Discard
|
||||
|
||||
(defun magit-discard ()
|
||||
"Remove the change at point."
|
||||
(interactive)
|
||||
(--when-let (magit-apply--get-selection)
|
||||
(pcase (list (magit-diff-type) (magit-diff-scope))
|
||||
(`(committed ,_) (user-error "Cannot discard committed changes"))
|
||||
(`(undefined ,_) (user-error "Cannot discard this change"))
|
||||
(`(,_ region) (magit-discard-region it))
|
||||
(`(,_ hunk) (magit-discard-hunk it))
|
||||
(`(,_ hunks) (magit-discard-hunks it))
|
||||
(`(,_ file) (magit-discard-file it))
|
||||
(`(,_ files) (magit-discard-files it))
|
||||
(`(,_ list) (magit-discard-files it)))))
|
||||
|
||||
(defun magit-discard-region (section)
|
||||
(magit-confirm 'discard "Discard region")
|
||||
(magit-discard-apply section 'magit-apply-region))
|
||||
|
||||
(defun magit-discard-hunk (section)
|
||||
(magit-confirm 'discard "Discard hunk")
|
||||
(magit-discard-apply section 'magit-apply-hunk))
|
||||
|
||||
(defun magit-discard-apply (section apply)
|
||||
(if (eq (magit-diff-type section) 'unstaged)
|
||||
(funcall apply section "--reverse")
|
||||
(if (magit-anything-unstaged-p
|
||||
nil (if (magit-file-section-p section)
|
||||
(oref section value)
|
||||
(magit-section-parent-value section)))
|
||||
(progn (let ((magit-inhibit-refresh t))
|
||||
(funcall apply section "--reverse" "--cached")
|
||||
(funcall apply section "--reverse" "--reject"))
|
||||
(magit-refresh))
|
||||
(funcall apply section "--reverse" "--index"))))
|
||||
|
||||
(defun magit-discard-hunks (sections)
|
||||
(magit-confirm 'discard (format "Discard %s hunks from %s"
|
||||
(length sections)
|
||||
(magit-section-parent-value (car sections))))
|
||||
(magit-discard-apply-n sections 'magit-apply-hunks))
|
||||
|
||||
(defun magit-discard-apply-n (sections apply)
|
||||
(let ((section (car sections)))
|
||||
(if (eq (magit-diff-type section) 'unstaged)
|
||||
(funcall apply sections "--reverse")
|
||||
(if (magit-anything-unstaged-p
|
||||
nil (if (magit-file-section-p section)
|
||||
(oref section value)
|
||||
(magit-section-parent-value section)))
|
||||
(progn (let ((magit-inhibit-refresh t))
|
||||
(funcall apply sections "--reverse" "--cached")
|
||||
(funcall apply sections "--reverse" "--reject"))
|
||||
(magit-refresh))
|
||||
(funcall apply sections "--reverse" "--index")))))
|
||||
|
||||
(defun magit-discard-file (section)
|
||||
(magit-discard-files (list section)))
|
||||
|
||||
(defun magit-discard-files (sections)
|
||||
(let ((auto-revert-verbose nil)
|
||||
(type (magit-diff-type (car sections)))
|
||||
(status (magit-file-status))
|
||||
files delete resurrect rename discard discard-new resolve)
|
||||
(dolist (section sections)
|
||||
(let ((file (oref section value)))
|
||||
(push file files)
|
||||
(pcase (cons (pcase type
|
||||
(`staged ?X)
|
||||
(`unstaged ?Y)
|
||||
(`untracked ?Z))
|
||||
(cddr (assoc file status)))
|
||||
(`(?Z) (dolist (f (magit-untracked-files nil file))
|
||||
(push f delete)))
|
||||
((or `(?Z ?? ??) `(?Z ?! ?!)) (push file delete))
|
||||
((or `(?Z ?D ? ) `(,_ ?D ?D)) (push file delete))
|
||||
((or `(,_ ?U ,_) `(,_ ,_ ?U)) (push file resolve))
|
||||
(`(,_ ?A ?A) (push file resolve))
|
||||
(`(?X ?M ,(or ? ?M ?D)) (push section discard))
|
||||
(`(?Y ,_ ?M ) (push section discard))
|
||||
(`(?X ?A ?M ) (push file discard-new))
|
||||
(`(?X ?C ?M ) (push file discard-new))
|
||||
(`(?X ?A ,(or ? ?D)) (push file delete))
|
||||
(`(?X ?C ,(or ? ?D)) (push file delete))
|
||||
(`(?X ?D ,(or ? ?M )) (push file resurrect))
|
||||
(`(?Y ,_ ?D ) (push file resurrect))
|
||||
(`(?X ?R ,(or ? ?M ?D)) (push file rename)))))
|
||||
(unwind-protect
|
||||
(let ((magit-inhibit-refresh t))
|
||||
(magit-wip-commit-before-change files " before discard")
|
||||
(when resolve
|
||||
(magit-discard-files--resolve (nreverse resolve)))
|
||||
(when resurrect
|
||||
(magit-discard-files--resurrect (nreverse resurrect)))
|
||||
(when delete
|
||||
(magit-discard-files--delete (nreverse delete) status))
|
||||
(when rename
|
||||
(magit-discard-files--rename (nreverse rename) status))
|
||||
(when (or discard discard-new)
|
||||
(magit-discard-files--discard (nreverse discard)
|
||||
(nreverse discard-new)))
|
||||
(magit-wip-commit-after-apply files " after discard"))
|
||||
(magit-refresh))))
|
||||
|
||||
(defun magit-discard-files--resolve (files)
|
||||
(if-let ((arg (and (cdr files)
|
||||
(magit-read-char-case
|
||||
(format "For these %i files\n%s\ncheckout:\n"
|
||||
(length files)
|
||||
(mapconcat (lambda (file)
|
||||
(concat " " file))
|
||||
files "\n"))
|
||||
t
|
||||
(?o "[o]ur stage" "--ours")
|
||||
(?t "[t]heir stage" "--theirs")
|
||||
(?c "[c]onflict" "--merge")
|
||||
(?i "decide [i]ndividually" nil)))))
|
||||
(dolist (file files)
|
||||
(magit-checkout-stage file arg))
|
||||
(dolist (file files)
|
||||
(magit-checkout-stage file (magit-checkout-read-stage file)))))
|
||||
|
||||
(defun magit-discard-files--resurrect (files)
|
||||
(magit-confirm-files 'resurrect files)
|
||||
(if (eq (magit-diff-type) 'staged)
|
||||
(magit-call-git "reset" "--" files)
|
||||
(magit-call-git "checkout" "--" files)))
|
||||
|
||||
(defun magit-discard-files--delete (files status)
|
||||
(magit-confirm-files (if magit-delete-by-moving-to-trash 'trash 'delete)
|
||||
files)
|
||||
(let ((delete-by-moving-to-trash magit-delete-by-moving-to-trash))
|
||||
(dolist (file files)
|
||||
(when (string-match-p "\\`\\\\?~" file)
|
||||
(error "Refusing to delete %S, too dangerous" file))
|
||||
(pcase (nth 3 (assoc file status))
|
||||
((guard (memq (magit-diff-type) '(unstaged untracked)))
|
||||
(dired-delete-file file dired-recursive-deletes
|
||||
magit-delete-by-moving-to-trash)
|
||||
(dired-clean-up-after-deletion file))
|
||||
(?\s (delete-file file t)
|
||||
(magit-call-git "rm" "--cached" "--" file))
|
||||
(?M (let ((temp (magit-git-string "checkout-index" "--temp" file)))
|
||||
(string-match
|
||||
(format "\\(.+?\\)\t%s" (regexp-quote file)) temp)
|
||||
(rename-file (match-string 1 temp)
|
||||
(setq temp (concat file ".~{index}~")))
|
||||
(delete-file temp t))
|
||||
(magit-call-git "rm" "--cached" "--force" "--" file))
|
||||
(?D (magit-call-git "checkout" "--" file)
|
||||
(delete-file file t)
|
||||
(magit-call-git "rm" "--cached" "--force" "--" file))))))
|
||||
|
||||
(defun magit-discard-files--rename (files status)
|
||||
(magit-confirm 'rename "Undo rename %s" "Undo %i renames" nil
|
||||
(mapcar (lambda (file)
|
||||
(setq file (assoc file status))
|
||||
(format "%s -> %s" (cadr file) (car file)))
|
||||
files))
|
||||
(dolist (file files)
|
||||
(let ((orig (cadr (assoc file status))))
|
||||
(if (file-exists-p file)
|
||||
(progn
|
||||
(--when-let (file-name-directory orig)
|
||||
(make-directory it t))
|
||||
(magit-call-git "mv" file orig))
|
||||
(magit-call-git "rm" "--cached" "--" file)
|
||||
(magit-call-git "reset" "--" orig)))))
|
||||
|
||||
(defun magit-discard-files--discard (sections new-files)
|
||||
(let ((files (--map (oref it value) sections)))
|
||||
(magit-confirm-files 'discard (append files new-files)
|
||||
(format "Discard %s changes in" (magit-diff-type)))
|
||||
(if (eq (magit-diff-type (car sections)) 'unstaged)
|
||||
(magit-call-git "checkout" "--" files)
|
||||
(when new-files
|
||||
(magit-call-git "add" "--" new-files)
|
||||
(magit-call-git "reset" "--" new-files))
|
||||
(let ((binaries (magit-binary-files "--cached")))
|
||||
(when binaries
|
||||
(setq sections
|
||||
(--remove (member (oref it value) binaries)
|
||||
sections)))
|
||||
(cond ((= (length sections) 1)
|
||||
(magit-discard-apply (car sections) 'magit-apply-diff))
|
||||
(sections
|
||||
(magit-discard-apply-n sections 'magit-apply-diffs)))
|
||||
(when binaries
|
||||
(let ((modified (magit-unstaged-files t)))
|
||||
(setq binaries (--separate (member it modified) binaries)))
|
||||
(when (cadr binaries)
|
||||
(magit-call-git "reset" "--" (cadr binaries)))
|
||||
(when (car binaries)
|
||||
(user-error
|
||||
(concat
|
||||
"Cannot discard staged changes to binary files, "
|
||||
"which also have unstaged changes. Unstage instead."))))))))
|
||||
|
||||
;;;; Reverse
|
||||
|
||||
(defun magit-reverse (&rest args)
|
||||
"Reverse the change at point in the working tree.
|
||||
With a prefix argument fallback to a 3-way merge. Doing
|
||||
so causes the change to be applied to the index as well."
|
||||
(interactive (and current-prefix-arg (list "--3way")))
|
||||
(--when-let (magit-apply--get-selection)
|
||||
(pcase (list (magit-diff-type) (magit-diff-scope))
|
||||
(`(untracked ,_) (user-error "Cannot reverse untracked changes"))
|
||||
(`(unstaged ,_) (user-error "Cannot reverse unstaged changes"))
|
||||
(`(,_ region) (magit-reverse-region it args))
|
||||
(`(,_ hunk) (magit-reverse-hunk it args))
|
||||
(`(,_ hunks) (magit-reverse-hunks it args))
|
||||
(`(,_ file) (magit-reverse-file it args))
|
||||
(`(,_ files) (magit-reverse-files it args))
|
||||
(`(,_ list) (magit-reverse-files it args)))))
|
||||
|
||||
(defun magit-reverse-region (section args)
|
||||
(magit-confirm 'reverse "Reverse region")
|
||||
(magit-reverse-apply section 'magit-apply-region args))
|
||||
|
||||
(defun magit-reverse-hunk (section args)
|
||||
(magit-confirm 'reverse "Reverse hunk")
|
||||
(magit-reverse-apply section 'magit-apply-hunk args))
|
||||
|
||||
(defun magit-reverse-hunks (sections args)
|
||||
(magit-confirm 'reverse
|
||||
(format "Reverse %s hunks from %s"
|
||||
(length sections)
|
||||
(magit-section-parent-value (car sections))))
|
||||
(magit-reverse-apply sections 'magit-apply-hunks args))
|
||||
|
||||
(defun magit-reverse-file (section args)
|
||||
(magit-reverse-files (list section) args))
|
||||
|
||||
(defun magit-reverse-files (sections args)
|
||||
(pcase-let ((`(,binaries ,sections)
|
||||
(let ((bs (magit-binary-files
|
||||
(cond ((derived-mode-p 'magit-revision-mode)
|
||||
magit-buffer-range)
|
||||
((derived-mode-p 'magit-diff-mode)
|
||||
magit-buffer-range)
|
||||
(t
|
||||
"--cached")))))
|
||||
(--separate (member (oref it value) bs)
|
||||
sections))))
|
||||
(magit-confirm-files 'reverse (--map (oref it value) sections))
|
||||
(cond ((= (length sections) 1)
|
||||
(magit-reverse-apply (car sections) 'magit-apply-diff args))
|
||||
(sections
|
||||
(magit-reverse-apply sections 'magit-apply-diffs args)))
|
||||
(when binaries
|
||||
(user-error "Cannot reverse binary files"))))
|
||||
|
||||
(defun magit-reverse-apply (section:s apply args)
|
||||
(funcall apply section:s "--reverse" args
|
||||
(and (not magit-reverse-atomically)
|
||||
(not (member "--3way" args))
|
||||
"--reject")))
|
||||
|
||||
(defun magit-reverse-in-index (&rest args)
|
||||
"Reverse the change at point in the index but not the working tree.
|
||||
|
||||
Use this command to extract a change from `HEAD', while leaving
|
||||
it in the working tree, so that it can later be committed using
|
||||
a separate commit. A typical workflow would be:
|
||||
|
||||
0. Optionally make sure that there are no uncommitted changes.
|
||||
1. Visit the `HEAD' commit and navigate to the change that should
|
||||
not have been included in that commit.
|
||||
2. Type \"u\" (`magit-unstage') to reverse it in the index.
|
||||
This assumes that `magit-unstage-committed-changes' is non-nil.
|
||||
3. Type \"c e\" to extend `HEAD' with the staged changes,
|
||||
including those that were already staged before.
|
||||
4. Optionally stage the remaining changes using \"s\" or \"S\"
|
||||
and then type \"c c\" to create a new commit."
|
||||
(interactive)
|
||||
(magit-reverse (cons "--cached" args)))
|
||||
|
||||
;;; _
|
||||
(provide 'magit-apply)
|
||||
;;; magit-apply.el ends here
|
BIN
elpa/magit-20210414.1306/magit-apply.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-apply.elc
Normal file
Binary file not shown.
2521
elpa/magit-20210414.1306/magit-autoloads.el
Normal file
2521
elpa/magit-20210414.1306/magit-autoloads.el
Normal file
File diff suppressed because it is too large
Load Diff
266
elpa/magit-20210414.1306/magit-autorevert.el
Normal file
266
elpa/magit-20210414.1306/magit-autorevert.el
Normal file
|
@ -0,0 +1,266 @@
|
|||
;;; magit-autorevert.el --- revert buffers when files in repository change -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2010-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
|
||||
;; Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
;; Magit is free software; you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
;;
|
||||
;; Magit is distributed in the hope that it will be useful, but WITHOUT
|
||||
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
;; License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Magit. If not, see http://www.gnu.org/licenses.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'magit-git)
|
||||
|
||||
(require 'autorevert)
|
||||
|
||||
;;; Options
|
||||
|
||||
(defgroup magit-auto-revert nil
|
||||
"Revert buffers when files in repository change."
|
||||
:link '(custom-group-link auto-revert)
|
||||
:link '(info-link "(magit)Automatic Reverting of File-Visiting Buffers")
|
||||
:group 'auto-revert
|
||||
:group 'magit-essentials
|
||||
:group 'magit-modes)
|
||||
|
||||
(defcustom auto-revert-buffer-list-filter nil
|
||||
"Filter that determines which buffers `auto-revert-buffers' reverts.
|
||||
|
||||
This option is provided by Magit, which also advises
|
||||
`auto-revert-buffers' to respect it. Magit users who do not turn
|
||||
on the local mode `auto-revert-mode' themselves, are best served
|
||||
by setting the value to `magit-auto-revert-repository-buffer-p'.
|
||||
|
||||
However the default is nil, so as not to disturb users who do use
|
||||
the local mode directly. If you experience delays when running
|
||||
Magit commands, then you should consider using one of the
|
||||
predicates provided by Magit - especially if you also use Tramp.
|
||||
|
||||
Users who do turn on `auto-revert-mode' in buffers in which Magit
|
||||
doesn't do that for them, should likely not use any filter.
|
||||
Users who turn on `global-auto-revert-mode', do not have to worry
|
||||
about this option, because it is disregarded if the global mode
|
||||
is enabled."
|
||||
:package-version '(magit . "2.4.2")
|
||||
:group 'auto-revert
|
||||
:group 'magit-auto-revert
|
||||
:group 'magit-related
|
||||
:type '(radio (const :tag "No filter" nil)
|
||||
(function-item magit-auto-revert-buffer-p)
|
||||
(function-item magit-auto-revert-repository-buffer-p)
|
||||
function))
|
||||
|
||||
(defcustom magit-auto-revert-tracked-only t
|
||||
"Whether `magit-auto-revert-mode' only reverts tracked files."
|
||||
:package-version '(magit . "2.4.0")
|
||||
:group 'magit-auto-revert
|
||||
:type 'boolean
|
||||
:set (lambda (var val)
|
||||
(set var val)
|
||||
(when (and (bound-and-true-p magit-auto-revert-mode)
|
||||
(featurep 'magit-autorevert))
|
||||
(magit-auto-revert-mode -1)
|
||||
(magit-auto-revert-mode))))
|
||||
|
||||
(defcustom magit-auto-revert-immediately t
|
||||
"Whether Magit reverts buffers immediately.
|
||||
|
||||
If this is non-nil and either `global-auto-revert-mode' or
|
||||
`magit-auto-revert-mode' is enabled, then Magit immediately
|
||||
reverts buffers by explicitly calling `auto-revert-buffers'
|
||||
after running Git for side-effects.
|
||||
|
||||
If `auto-revert-use-notify' is non-nil (and file notifications
|
||||
are actually supported), then `magit-auto-revert-immediately'
|
||||
does not have to be non-nil, because the reverts happen
|
||||
immediately anyway.
|
||||
|
||||
If `magit-auto-revert-immediately' and `auto-revert-use-notify'
|
||||
are both nil, then reverts happen after `auto-revert-interval'
|
||||
seconds of user inactivity. That is not desirable."
|
||||
:package-version '(magit . "2.4.0")
|
||||
:group 'magit-auto-revert
|
||||
:type 'boolean)
|
||||
|
||||
;;; Mode
|
||||
|
||||
(defun magit-turn-on-auto-revert-mode-if-desired (&optional file)
|
||||
(if file
|
||||
(--when-let (find-buffer-visiting file)
|
||||
(with-current-buffer it
|
||||
(magit-turn-on-auto-revert-mode-if-desired)))
|
||||
(when (and buffer-file-name
|
||||
(file-readable-p buffer-file-name)
|
||||
(or (< emacs-major-version 27)
|
||||
(with-no-warnings
|
||||
(condition-case nil
|
||||
(executable-find magit-git-executable t) ; see #3684
|
||||
(wrong-number-of-arguments t)))) ; very old 27 built
|
||||
(magit-toplevel)
|
||||
(or (not magit-auto-revert-tracked-only)
|
||||
(magit-file-tracked-p buffer-file-name))
|
||||
(not auto-revert-mode) ; see #3014
|
||||
(not global-auto-revert-mode)) ; see #3460
|
||||
(auto-revert-mode 1))))
|
||||
|
||||
;;;###autoload
|
||||
(define-globalized-minor-mode magit-auto-revert-mode auto-revert-mode
|
||||
magit-turn-on-auto-revert-mode-if-desired
|
||||
:package-version '(magit . "2.4.0")
|
||||
:link '(info-link "(magit)Automatic Reverting of File-Visiting Buffers")
|
||||
:group 'magit-auto-revert
|
||||
:group 'magit-essentials
|
||||
;; - When `global-auto-revert-mode' is enabled, then this mode is
|
||||
;; redundant.
|
||||
;; - In all other cases enable the mode because if buffers are not
|
||||
;; automatically reverted that would make many very common tasks
|
||||
;; much more cumbersome.
|
||||
:init-value (not (or global-auto-revert-mode
|
||||
noninteractive)))
|
||||
;; - Unfortunately `:init-value t' only sets the value of the mode
|
||||
;; variable but does not cause the mode function to be called.
|
||||
;; - I don't think it works like this on purpose, but since one usually
|
||||
;; should not enable global modes by default, it is understandable.
|
||||
;; - If the user has set the variable `magit-auto-revert-mode' to nil
|
||||
;; after loading magit (instead of doing so before loading magit or
|
||||
;; by using the function), then we should still respect that setting.
|
||||
;; - If the user sets one of these variables after loading magit and
|
||||
;; after `after-init-hook' has run, then that won't have an effect
|
||||
;; and there is nothing we can do about it.
|
||||
(defun magit-auto-revert-mode--init-kludge ()
|
||||
"This is an internal kludge to be used on `after-init-hook'.
|
||||
Do not use this function elsewhere, and don't remove it from
|
||||
the `after-init-hook'. For more information see the comments
|
||||
and code surrounding the definition of this function."
|
||||
(if magit-auto-revert-mode
|
||||
(let ((start (current-time)))
|
||||
(magit-message "Turning on magit-auto-revert-mode...")
|
||||
(magit-auto-revert-mode 1)
|
||||
(magit-message
|
||||
"Turning on magit-auto-revert-mode...done%s"
|
||||
(let ((elapsed (float-time (time-subtract nil start))))
|
||||
(if (> elapsed 0.2)
|
||||
(format " (%.3fs, %s buffers checked)" elapsed
|
||||
(length (buffer-list)))
|
||||
""))))
|
||||
(magit-auto-revert-mode -1)))
|
||||
(if after-init-time
|
||||
;; Since `after-init-hook' has already been
|
||||
;; run, turn the mode on or off right now.
|
||||
(magit-auto-revert-mode--init-kludge)
|
||||
;; By the time the init file has been fully loaded the
|
||||
;; values of the relevant variables might have changed.
|
||||
(add-hook 'after-init-hook #'magit-auto-revert-mode--init-kludge t))
|
||||
|
||||
(put 'magit-auto-revert-mode 'function-documentation
|
||||
"Toggle Magit Auto Revert mode.
|
||||
If called interactively, enable Magit Auto Revert mode if ARG is
|
||||
positive, and disable it if ARG is zero or negative. If called
|
||||
from Lisp, also enable the mode if ARG is omitted or nil, and
|
||||
toggle it if ARG is `toggle'; disable the mode otherwise.
|
||||
|
||||
Magit Auto Revert mode is a global minor mode that reverts
|
||||
buffers associated with a file that is located inside a Git
|
||||
repository when the file changes on disk. Use `auto-revert-mode'
|
||||
to revert a particular buffer. Or use `global-auto-revert-mode'
|
||||
to revert all file-visiting buffers, not just those that visit
|
||||
a file located inside a Git repository.
|
||||
|
||||
This global mode works by turning on the buffer-local mode
|
||||
`auto-revert-mode' at the time a buffer is first created. The
|
||||
local mode is turned on if the visited file is being tracked in
|
||||
a Git repository at the time when the buffer is created.
|
||||
|
||||
If `magit-auto-revert-tracked-only' is non-nil (the default),
|
||||
then only tracked files are reverted. But if you stage a
|
||||
previously untracked file using `magit-stage', then this mode
|
||||
notices that.
|
||||
|
||||
Unlike `global-auto-revert-mode', this mode never reverts any
|
||||
buffers that are not visiting files.
|
||||
|
||||
The behavior of this mode can be customized using the options
|
||||
in the `autorevert' and `magit-autorevert' groups.
|
||||
|
||||
This function calls the hook `magit-auto-revert-mode-hook'.
|
||||
|
||||
Like nearly every mode, this mode should be enabled or disabled
|
||||
by calling the respective mode function, the reason being that
|
||||
changing the state of a mode involves more than merely toggling
|
||||
a single switch, so setting the mode variable is not enough.
|
||||
Also, you should not use `after-init-hook' to disable this mode.")
|
||||
|
||||
(defun magit-auto-revert-buffers ()
|
||||
(when (and magit-auto-revert-immediately
|
||||
(or global-auto-revert-mode
|
||||
(and magit-auto-revert-mode auto-revert-buffer-list)))
|
||||
(let ((auto-revert-buffer-list-filter
|
||||
(or auto-revert-buffer-list-filter
|
||||
#'magit-auto-revert-repository-buffer-p)))
|
||||
(auto-revert-buffers))))
|
||||
|
||||
(defvar magit-auto-revert-toplevel nil)
|
||||
|
||||
(defvar magit-auto-revert-counter 1
|
||||
"Incremented each time `auto-revert-buffers' is called.")
|
||||
|
||||
(defun magit-auto-revert-buffer-p (buffer)
|
||||
"Return non-nil if BUFFER visits a file inside the current repository.
|
||||
The current repository is the one containing `default-directory'.
|
||||
If there is no current repository, then return t for any BUFFER."
|
||||
(magit-auto-revert-repository-buffer-p buffer t))
|
||||
|
||||
(defun magit-auto-revert-repository-buffer-p (buffer &optional fallback)
|
||||
"Return non-nil if BUFFER visits a file inside the current repository.
|
||||
The current repository is the one containing `default-directory'.
|
||||
If there is no current repository, then return FALLBACK (which
|
||||
defaults to nil) for any BUFFER."
|
||||
;; Call `magit-toplevel' just once per cycle.
|
||||
(unless (and magit-auto-revert-toplevel
|
||||
(= (cdr magit-auto-revert-toplevel)
|
||||
magit-auto-revert-counter))
|
||||
(setq magit-auto-revert-toplevel
|
||||
(cons (or (magit-toplevel) 'no-repo)
|
||||
magit-auto-revert-counter)))
|
||||
(let ((top (car magit-auto-revert-toplevel)))
|
||||
(if (eq top 'no-repo)
|
||||
fallback
|
||||
(let ((dir (buffer-local-value 'default-directory buffer)))
|
||||
(and (equal (file-remote-p dir)
|
||||
(file-remote-p top))
|
||||
;; ^ `tramp-handle-file-in-directory-p' lacks this optimization.
|
||||
(file-in-directory-p dir top))))))
|
||||
|
||||
(defun auto-revert-buffers--buffer-list-filter (fn)
|
||||
(cl-incf magit-auto-revert-counter)
|
||||
(if (or global-auto-revert-mode
|
||||
(not auto-revert-buffer-list)
|
||||
(not auto-revert-buffer-list-filter))
|
||||
(funcall fn)
|
||||
(let ((auto-revert-buffer-list
|
||||
(-filter auto-revert-buffer-list-filter
|
||||
auto-revert-buffer-list)))
|
||||
(funcall fn))
|
||||
(unless auto-revert-timer
|
||||
(auto-revert-set-timer))))
|
||||
|
||||
(advice-add 'auto-revert-buffers :around
|
||||
'auto-revert-buffers--buffer-list-filter)
|
||||
|
||||
;;; _
|
||||
(provide 'magit-autorevert)
|
||||
;;; magit-autorevert.el ends here
|
BIN
elpa/magit-20210414.1306/magit-autorevert.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-autorevert.elc
Normal file
Binary file not shown.
299
elpa/magit-20210414.1306/magit-bisect.el
Normal file
299
elpa/magit-20210414.1306/magit-bisect.el
Normal file
|
@ -0,0 +1,299 @@
|
|||
;;; magit-bisect.el --- bisect support for Magit -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2011-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
|
||||
;; Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
;; Magit is free software; you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
;;
|
||||
;; Magit is distributed in the hope that it will be useful, but WITHOUT
|
||||
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
;; License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Magit. If not, see http://www.gnu.org/licenses.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Use a binary search to find the commit that introduced a bug.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'magit)
|
||||
|
||||
;;; Options
|
||||
|
||||
(defcustom magit-bisect-show-graph t
|
||||
"Whether to use `--graph' in the log showing commits yet to be bisected."
|
||||
:package-version '(magit . "2.8.0")
|
||||
:group 'magit-status
|
||||
:type 'boolean)
|
||||
|
||||
(defface magit-bisect-good
|
||||
'((t :foreground "DarkOliveGreen"))
|
||||
"Face for good bisect revisions."
|
||||
:group 'magit-faces)
|
||||
|
||||
(defface magit-bisect-skip
|
||||
'((t :foreground "DarkGoldenrod"))
|
||||
"Face for skipped bisect revisions."
|
||||
:group 'magit-faces)
|
||||
|
||||
(defface magit-bisect-bad
|
||||
'((t :foreground "IndianRed4"))
|
||||
"Face for bad bisect revisions."
|
||||
:group 'magit-faces)
|
||||
|
||||
;;; Commands
|
||||
|
||||
;;;###autoload (autoload 'magit-bisect "magit-bisect" nil t)
|
||||
(transient-define-prefix magit-bisect ()
|
||||
"Narrow in on the commit that introduced a bug."
|
||||
:man-page "git-bisect"
|
||||
[:class transient-subgroups
|
||||
:if-not magit-bisect-in-progress-p
|
||||
["Arguments"
|
||||
("-n" "Don't checkout commits" "--no-checkout")
|
||||
("-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))))
|
||||
(6 magit-bisect:--term-new
|
||||
:if (lambda () (version<= "2.7" (magit-git-version))))]
|
||||
["Actions"
|
||||
("B" "Start" magit-bisect-start)
|
||||
("s" "Start script" magit-bisect-run)]]
|
||||
["Actions"
|
||||
:if magit-bisect-in-progress-p
|
||||
("B" "Bad" magit-bisect-bad)
|
||||
("g" "Good" magit-bisect-good)
|
||||
(6 "m" "Mark" magit-bisect-mark
|
||||
:if (lambda () (version<= "2.7" (magit-git-version))))
|
||||
("k" "Skip" magit-bisect-skip)
|
||||
("r" "Reset" magit-bisect-reset)
|
||||
("s" "Run script" magit-bisect-run)])
|
||||
|
||||
(transient-define-argument magit-bisect:--term-old ()
|
||||
:description "Old/good term"
|
||||
:class 'transient-option
|
||||
:key "=o"
|
||||
:argument "--term-old=")
|
||||
|
||||
(transient-define-argument magit-bisect:--term-new ()
|
||||
:description "New/bad term"
|
||||
:class 'transient-option
|
||||
:key "=n"
|
||||
:argument "--term-new=")
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-bisect-start (bad good args)
|
||||
"Start a bisect session.
|
||||
|
||||
Bisecting a bug means to find the commit that introduced it.
|
||||
This command starts such a bisect session by asking for a known
|
||||
good and a known bad commit. To move the session forward use the
|
||||
other actions from the bisect transient command (\
|
||||
\\<magit-status-mode-map>\\[magit-bisect])."
|
||||
(interactive (if (magit-bisect-in-progress-p)
|
||||
(user-error "Already bisecting")
|
||||
(magit-bisect-start-read-args)))
|
||||
(unless (magit-rev-ancestor-p good bad)
|
||||
(user-error
|
||||
"The %s revision (%s) has to be an ancestor of the %s one (%s)"
|
||||
(or (transient-arg-value "--term-old=" args) "good")
|
||||
good
|
||||
(or (transient-arg-value "--term-new=" args) "bad")
|
||||
bad))
|
||||
(when (magit-anything-modified-p)
|
||||
(user-error "Cannot bisect with uncommitted changes"))
|
||||
(magit-git-bisect "start" (list args bad good) t))
|
||||
|
||||
(defun magit-bisect-start-read-args ()
|
||||
(let* ((args (transient-args 'magit-bisect))
|
||||
(bad (magit-read-branch-or-commit
|
||||
(format "Start bisect with %s revision"
|
||||
(or (transient-arg-value "--term-new=" args)
|
||||
"bad")))))
|
||||
(list bad
|
||||
(magit-read-other-branch-or-commit
|
||||
(format "%s revision" (or (transient-arg-value "--term-old=" args)
|
||||
"Good"))
|
||||
bad)
|
||||
args)))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-bisect-reset ()
|
||||
"After bisecting, cleanup bisection state and return to original `HEAD'."
|
||||
(interactive)
|
||||
(magit-confirm 'reset-bisect)
|
||||
(magit-run-git "bisect" "reset")
|
||||
(ignore-errors (delete-file (magit-git-dir "BISECT_CMD_OUTPUT"))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-bisect-good ()
|
||||
"While bisecting, mark the current commit as good.
|
||||
Use this after you have asserted that the commit does not contain
|
||||
the bug in question."
|
||||
(interactive)
|
||||
(magit-git-bisect (or (cadr (magit-bisect-terms))
|
||||
(user-error "Not bisecting"))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-bisect-bad ()
|
||||
"While bisecting, mark the current commit as bad.
|
||||
Use this after you have asserted that the commit does contain the
|
||||
bug in question."
|
||||
(interactive)
|
||||
(magit-git-bisect (or (car (magit-bisect-terms))
|
||||
(user-error "Not bisecting"))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-bisect-mark ()
|
||||
"While bisecting, mark the current commit with a bisect term.
|
||||
During a bisect using alternate terms, commits can still be
|
||||
marked with `magit-bisect-good' and `magit-bisect-bad', as those
|
||||
commands map to the correct term (\"good\" to --term-old's value
|
||||
and \"bad\" to --term-new's). However, in some cases, it can be
|
||||
difficult to keep that mapping straight in your head; this
|
||||
command provides an interface that exposes the underlying terms."
|
||||
(interactive)
|
||||
(magit-git-bisect
|
||||
(pcase-let ((`(,term-new ,term-old) (or (magit-bisect-terms)
|
||||
(user-error "Not bisecting"))))
|
||||
(pcase (read-char-choice
|
||||
(format "Mark HEAD as %s ([n]ew) or %s ([o]ld)"
|
||||
term-new term-old)
|
||||
(list ?n ?o))
|
||||
(?n term-new)
|
||||
(?o term-old)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-bisect-skip ()
|
||||
"While bisecting, skip the current commit.
|
||||
Use this if for some reason the current commit is not a good one
|
||||
to test. This command lets Git choose a different one."
|
||||
(interactive)
|
||||
(magit-git-bisect "skip"))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-bisect-run (cmdline &optional bad good args)
|
||||
"Bisect automatically by running commands after each step.
|
||||
|
||||
Unlike `git bisect run' this can be used before bisecting has
|
||||
begun. In that case it behaves like `git bisect start; git
|
||||
bisect run'."
|
||||
(interactive (let ((args (and (not (magit-bisect-in-progress-p))
|
||||
(magit-bisect-start-read-args))))
|
||||
(cons (read-shell-command "Bisect shell command: ") args)))
|
||||
(when (and bad good)
|
||||
(magit-bisect-start bad good args))
|
||||
(magit-git-bisect "run" (list shell-file-name shell-command-switch cmdline)))
|
||||
|
||||
(defun magit-git-bisect (subcommand &optional args no-assert)
|
||||
(unless (or no-assert (magit-bisect-in-progress-p))
|
||||
(user-error "Not bisecting"))
|
||||
(message "Bisecting...")
|
||||
(magit-with-toplevel
|
||||
(magit-run-git-async "bisect" subcommand args))
|
||||
(set-process-sentinel
|
||||
magit-this-process
|
||||
(lambda (process event)
|
||||
(when (memq (process-status process) '(exit signal))
|
||||
(if (> (process-exit-status process) 0)
|
||||
(magit-process-sentinel process event)
|
||||
(process-put process 'inhibit-refresh t)
|
||||
(magit-process-sentinel process event)
|
||||
(when (buffer-live-p (process-buffer process))
|
||||
(with-current-buffer (process-buffer process)
|
||||
(when-let ((section (get-text-property (point) 'magit-section))
|
||||
(output (buffer-substring-no-properties
|
||||
(oref section content)
|
||||
(oref section end))))
|
||||
(with-temp-file (magit-git-dir "BISECT_CMD_OUTPUT")
|
||||
(insert output)))))
|
||||
(magit-refresh))
|
||||
(message "Bisecting...done")))))
|
||||
|
||||
;;; Sections
|
||||
|
||||
(defun magit-bisect-in-progress-p ()
|
||||
(file-exists-p (magit-git-dir "BISECT_LOG")))
|
||||
|
||||
(defun magit-bisect-terms ()
|
||||
(magit-file-lines (magit-git-dir "BISECT_TERMS")))
|
||||
|
||||
(defun magit-insert-bisect-output ()
|
||||
"While bisecting, insert section with output from `git bisect'."
|
||||
(when (magit-bisect-in-progress-p)
|
||||
(let* ((lines
|
||||
(or (magit-file-lines (magit-git-dir "BISECT_CMD_OUTPUT"))
|
||||
(list "Bisecting: (no saved bisect output)"
|
||||
"It appears you have invoked `git bisect' from a shell."
|
||||
"There is nothing wrong with that, we just cannot display"
|
||||
"anything useful here. Consult the shell output instead.")))
|
||||
(done-re "^\\([a-z0-9]\\{40\\}\\) is the first bad commit$")
|
||||
(bad-line (or (and (string-match done-re (car lines))
|
||||
(pop lines))
|
||||
(--first (string-match done-re it) lines))))
|
||||
(magit-insert-section ((eval (if bad-line 'commit 'bisect-output))
|
||||
(and bad-line (match-string 1 bad-line)))
|
||||
(magit-insert-heading
|
||||
(propertize (or bad-line (pop lines))
|
||||
'font-lock-face 'magit-section-heading))
|
||||
(dolist (line lines)
|
||||
(insert line "\n"))))
|
||||
(insert "\n")))
|
||||
|
||||
(defun magit-insert-bisect-rest ()
|
||||
"While bisecting, insert section visualizing the bisect state."
|
||||
(when (magit-bisect-in-progress-p)
|
||||
(magit-insert-section (bisect-view)
|
||||
(magit-insert-heading "Bisect Rest:")
|
||||
(magit-git-wash (apply-partially 'magit-log-wash-log 'bisect-vis)
|
||||
"bisect" "visualize" "git" "log"
|
||||
"--format=%h%x00%D%x00%s" "--decorate=full"
|
||||
(and magit-bisect-show-graph "--graph")))))
|
||||
|
||||
(defun magit-insert-bisect-log ()
|
||||
"While bisecting, insert section logging bisect progress."
|
||||
(when (magit-bisect-in-progress-p)
|
||||
(magit-insert-section (bisect-log)
|
||||
(magit-insert-heading "Bisect Log:")
|
||||
(magit-git-wash #'magit-wash-bisect-log "bisect" "log")
|
||||
(insert ?\n))))
|
||||
|
||||
(defun magit-wash-bisect-log (_args)
|
||||
(let (beg)
|
||||
(while (progn (setq beg (point-marker))
|
||||
(re-search-forward "^\\(git bisect [^\n]+\n\\)" nil t))
|
||||
(magit-bind-match-strings (heading) nil
|
||||
(magit-delete-match)
|
||||
(save-restriction
|
||||
(narrow-to-region beg (point))
|
||||
(goto-char (point-min))
|
||||
(magit-insert-section (bisect-item heading t)
|
||||
(insert (propertize heading 'font-lock-face
|
||||
'magit-section-secondary-heading))
|
||||
(magit-insert-heading)
|
||||
(magit-wash-sequence
|
||||
(apply-partially 'magit-log-wash-rev 'bisect-log
|
||||
(magit-abbrev-length)))
|
||||
(insert ?\n)))))
|
||||
(when (re-search-forward
|
||||
"# first bad commit: \\[\\([a-z0-9]\\{40\\}\\)\\] [^\n]+\n" nil t)
|
||||
(magit-bind-match-strings (hash) nil
|
||||
(magit-delete-match)
|
||||
(magit-insert-section (bisect-item)
|
||||
(insert hash " is the first bad commit\n"))))))
|
||||
|
||||
;;; _
|
||||
(provide 'magit-bisect)
|
||||
;;; magit-bisect.el ends here
|
BIN
elpa/magit-20210414.1306/magit-bisect.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-bisect.elc
Normal file
Binary file not shown.
944
elpa/magit-20210414.1306/magit-blame.el
Normal file
944
elpa/magit-20210414.1306/magit-blame.el
Normal file
|
@ -0,0 +1,944 @@
|
|||
;;; magit-blame.el --- blame support for Magit -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2012-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
|
||||
;; Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
;; Magit is free software; you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
;;
|
||||
;; Magit is distributed in the hope that it will be useful, but WITHOUT
|
||||
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
;; License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Magit. If not, see http://www.gnu.org/licenses.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Annotates each line in file-visiting buffer with information from
|
||||
;; the revision which last modified the line.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'magit)
|
||||
|
||||
;;; Options
|
||||
|
||||
(defgroup magit-blame nil
|
||||
"Blame support for Magit."
|
||||
:link '(info-link "(magit)Blaming")
|
||||
:group 'magit-modes)
|
||||
|
||||
(defcustom magit-blame-styles
|
||||
'((headings
|
||||
(heading-format . "%-20a %C %s\n"))
|
||||
(margin
|
||||
(margin-format . (" %s%f" " %C %a" " %H"))
|
||||
(margin-width . 42)
|
||||
(margin-face . magit-blame-margin)
|
||||
(margin-body-face . (magit-blame-dimmed)))
|
||||
(highlight
|
||||
(highlight-face . magit-blame-highlight))
|
||||
(lines
|
||||
(show-lines . t)
|
||||
(show-message . t)))
|
||||
"List of styles used to visualize blame information.
|
||||
|
||||
Each entry has the form (IDENT (KEY . VALUE)...). IDENT has
|
||||
to be a symbol uniquely identifying the style. The following
|
||||
KEYs are recognized:
|
||||
|
||||
`show-lines'
|
||||
Whether to prefix each chunk of lines with a thin line.
|
||||
This has no effect if `heading-format' is non-nil.
|
||||
`show-message'
|
||||
Whether to display a commit's summary line in the echo area
|
||||
when crossing chunks.
|
||||
`highlight-face'
|
||||
Face used to highlight the first line of each chunk.
|
||||
If this is nil, then those lines are not highlighted.
|
||||
`heading-format'
|
||||
String specifying the information to be shown above each
|
||||
chunk of lines. It must end with a newline character.
|
||||
`margin-format'
|
||||
String specifying the information to be shown in the left
|
||||
buffer margin. It must NOT end with a newline character.
|
||||
This can also be a list of formats used for the lines at
|
||||
the same positions within the chunk. If the chunk has
|
||||
more lines than formats are specified, then the last is
|
||||
repeated.
|
||||
`margin-width'
|
||||
Width of the margin, provided `margin-format' is non-nil.
|
||||
`margin-face'
|
||||
Face used in the margin, provided `margin-format' is
|
||||
non-nil. This face is used in combination with the faces
|
||||
that are specific to the used %-specs. If this is nil,
|
||||
then `magit-blame-margin' is used.
|
||||
`margin-body-face'
|
||||
Face used in the margin for all but first line of a chunk.
|
||||
This face is used in combination with the faces that are
|
||||
specific to the used %-specs. This can also be a list of
|
||||
faces (usually one face), in which case only these faces
|
||||
are used and the %-spec faces are ignored. A good value
|
||||
might be `(magit-blame-dimmed)'. If this is nil, then
|
||||
the same face as for the first line is used.
|
||||
|
||||
The following %-specs can be used in `heading-format' and
|
||||
`margin-format':
|
||||
|
||||
%H hash using face `magit-blame-hash'
|
||||
%s summary using face `magit-blame-summary'
|
||||
%a author using face `magit-blame-name'
|
||||
%A author time using face `magit-blame-date'
|
||||
%c committer using face `magit-blame-name'
|
||||
%C committer time using face `magit-blame-date'
|
||||
|
||||
Additionally if `margin-format' ends with %f, then the string
|
||||
that is displayed in the margin is made at least `margin-width'
|
||||
characters wide, which may be desirable if the used face sets
|
||||
the background color.
|
||||
|
||||
The style used in the current buffer can be cycled from the blame
|
||||
popup. Blame commands (except `magit-blame-echo') use the first
|
||||
style as the initial style when beginning to blame in a buffer."
|
||||
:package-version '(magit . "2.13.0")
|
||||
:group 'magit-blame
|
||||
:type 'string)
|
||||
|
||||
(defcustom magit-blame-echo-style 'lines
|
||||
"The blame visualization style used by `magit-blame-echo'.
|
||||
A symbol that has to be used as the identifier for one of the
|
||||
styles defined in `magit-blame-styles'."
|
||||
:package-version '(magit . "2.13.0")
|
||||
:group 'magit-blame
|
||||
:type 'symbol)
|
||||
|
||||
(defcustom magit-blame-time-format "%F %H:%M"
|
||||
"Format for time strings in blame headings."
|
||||
:group 'magit-blame
|
||||
:type 'string)
|
||||
|
||||
(defcustom magit-blame-read-only t
|
||||
"Whether to initially make the blamed buffer read-only."
|
||||
:package-version '(magit . "2.13.0")
|
||||
:group 'magit-blame
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom magit-blame-disable-modes '(fci-mode yascroll-bar-mode)
|
||||
"List of modes not compatible with Magit-Blame mode.
|
||||
This modes are turned off when Magit-Blame mode is turned on,
|
||||
and then turned on again when turning off the latter."
|
||||
:group 'magit-blame
|
||||
:type '(repeat (symbol :tag "Mode")))
|
||||
|
||||
(defcustom magit-blame-mode-lighter " Blame"
|
||||
"The mode-line lighter of the Magit-Blame mode."
|
||||
:group 'magit-blame
|
||||
:type '(choice (const :tag "No lighter" "") string))
|
||||
|
||||
(defcustom magit-blame-goto-chunk-hook
|
||||
'(magit-blame-maybe-update-revision-buffer
|
||||
magit-blame-maybe-show-message)
|
||||
"Hook run after point entered another chunk."
|
||||
:package-version '(magit . "2.13.0")
|
||||
:group 'magit-blame
|
||||
:type 'hook
|
||||
:get 'magit-hook-custom-get
|
||||
:options '(magit-blame-maybe-update-revision-buffer
|
||||
magit-blame-maybe-show-message))
|
||||
|
||||
;;; Faces
|
||||
|
||||
(defface magit-blame-highlight
|
||||
`((((class color) (background light))
|
||||
,@(and (>= emacs-major-version 27) '(:extend t))
|
||||
:background "grey80"
|
||||
:foreground "black")
|
||||
(((class color) (background dark))
|
||||
,@(and (>= emacs-major-version 27) '(:extend t))
|
||||
:background "grey25"
|
||||
:foreground "white"))
|
||||
"Face used for highlighting when blaming.
|
||||
Also see option `magit-blame-styles'."
|
||||
:group 'magit-faces)
|
||||
|
||||
(defface magit-blame-margin
|
||||
'((t :inherit magit-blame-highlight
|
||||
:weight normal
|
||||
:slant normal))
|
||||
"Face used for the blame margin by default when blaming.
|
||||
Also see option `magit-blame-styles'."
|
||||
:group 'magit-faces)
|
||||
|
||||
(defface magit-blame-dimmed
|
||||
'((t :inherit magit-dimmed
|
||||
:weight normal
|
||||
:slant normal))
|
||||
"Face used for the blame margin in some cases when blaming.
|
||||
Also see option `magit-blame-styles'."
|
||||
:group 'magit-faces)
|
||||
|
||||
(defface magit-blame-heading
|
||||
`((t ,@(and (>= emacs-major-version 27) '(:extend t))
|
||||
:inherit magit-blame-highlight
|
||||
:weight normal
|
||||
:slant normal))
|
||||
"Face used for blame headings by default when blaming.
|
||||
Also see option `magit-blame-styles'."
|
||||
:group 'magit-faces)
|
||||
|
||||
(defface magit-blame-summary nil
|
||||
"Face used for commit summaries when blaming."
|
||||
:group 'magit-faces)
|
||||
|
||||
(defface magit-blame-hash nil
|
||||
"Face used for commit hashes when blaming."
|
||||
:group 'magit-faces)
|
||||
|
||||
(defface magit-blame-name nil
|
||||
"Face used for author and committer names when blaming."
|
||||
:group 'magit-faces)
|
||||
|
||||
(defface magit-blame-date nil
|
||||
"Face used for dates when blaming."
|
||||
:group 'magit-faces)
|
||||
|
||||
;;; Chunks
|
||||
|
||||
(defclass magit-blame-chunk ()
|
||||
(;; <orig-rev> <orig-line> <final-line> <num-lines>
|
||||
(orig-rev :initarg :orig-rev)
|
||||
(orig-line :initarg :orig-line)
|
||||
(final-line :initarg :final-line)
|
||||
(num-lines :initarg :num-lines)
|
||||
;; previous <prev-rev> <prev-file>
|
||||
(prev-rev :initform nil)
|
||||
(prev-file :initform nil)
|
||||
;; filename <orig-file>
|
||||
(orig-file)))
|
||||
|
||||
(defun magit-current-blame-chunk (&optional type)
|
||||
(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))))))))
|
||||
|
||||
(defun magit-blame-chunk-at (pos)
|
||||
(--some (overlay-get it 'magit-blame-chunk)
|
||||
(overlays-at pos)))
|
||||
|
||||
(defun magit-blame--overlay-at (&optional pos key)
|
||||
(unless pos
|
||||
(setq pos (point)))
|
||||
(--first (overlay-get it (or key 'magit-blame-chunk))
|
||||
(nconc (overlays-at pos)
|
||||
(overlays-in pos pos))))
|
||||
|
||||
;;; Keymaps
|
||||
|
||||
(defvar magit-blame-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map (kbd "C-c C-q") 'magit-blame-quit)
|
||||
map)
|
||||
"Keymap for `magit-blame-mode'.
|
||||
Note that most blaming key bindings are defined
|
||||
in `magit-blame-read-only-mode-map' instead.")
|
||||
|
||||
(defvar magit-blame-read-only-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map (kbd "C-m") 'magit-show-commit)
|
||||
(define-key map (kbd "p") 'magit-blame-previous-chunk)
|
||||
(define-key map (kbd "P") 'magit-blame-previous-chunk-same-commit)
|
||||
(define-key map (kbd "n") 'magit-blame-next-chunk)
|
||||
(define-key map (kbd "N") 'magit-blame-next-chunk-same-commit)
|
||||
(define-key map (kbd "b") 'magit-blame-addition)
|
||||
(define-key map (kbd "r") 'magit-blame-removal)
|
||||
(define-key map (kbd "f") 'magit-blame-reverse)
|
||||
(define-key map (kbd "B") 'magit-blame)
|
||||
(define-key map (kbd "c") 'magit-blame-cycle-style)
|
||||
(define-key map (kbd "q") 'magit-blame-quit)
|
||||
(define-key map (kbd "M-w") 'magit-blame-copy-hash)
|
||||
(define-key map (kbd "SPC") 'magit-diff-show-or-scroll-up)
|
||||
(define-key map (kbd "S-SPC") 'magit-diff-show-or-scroll-down)
|
||||
(define-key map (kbd "DEL") 'magit-diff-show-or-scroll-down)
|
||||
map)
|
||||
"Keymap for `magit-blame-read-only-mode'.")
|
||||
|
||||
;;; Modes
|
||||
;;;; Variables
|
||||
|
||||
(defvar-local magit-blame-buffer-read-only nil)
|
||||
(defvar-local magit-blame-cache nil)
|
||||
(defvar-local magit-blame-disabled-modes nil)
|
||||
(defvar-local magit-blame-process nil)
|
||||
(defvar-local magit-blame-recursive-p nil)
|
||||
(defvar-local magit-blame-type nil)
|
||||
(defvar-local magit-blame-separator nil)
|
||||
(defvar-local magit-blame-previous-chunk nil)
|
||||
|
||||
(defvar-local magit-blame--style nil)
|
||||
|
||||
(defsubst magit-blame--style-get (key)
|
||||
(cdr (assoc key (cdr magit-blame--style))))
|
||||
|
||||
;;;; Base Mode
|
||||
|
||||
(define-minor-mode magit-blame-mode
|
||||
"Display blame information inline."
|
||||
:lighter magit-blame-mode-lighter
|
||||
(cond (magit-blame-mode
|
||||
(when (called-interactively-p 'any)
|
||||
(setq magit-blame-mode nil)
|
||||
(user-error
|
||||
(concat "Don't call `magit-blame-mode' directly; "
|
||||
"instead use `magit-blame'")))
|
||||
(add-hook 'after-save-hook 'magit-blame--refresh t t)
|
||||
(add-hook 'post-command-hook 'magit-blame-goto-chunk-hook t t)
|
||||
(add-hook 'before-revert-hook 'magit-blame--remove-overlays t t)
|
||||
(add-hook 'after-revert-hook 'magit-blame--refresh t t)
|
||||
(add-hook 'read-only-mode-hook 'magit-blame-toggle-read-only t t)
|
||||
(setq magit-blame-buffer-read-only buffer-read-only)
|
||||
(when (or magit-blame-read-only magit-buffer-file-name)
|
||||
(read-only-mode 1))
|
||||
(dolist (mode magit-blame-disable-modes)
|
||||
(when (and (boundp mode) (symbol-value mode))
|
||||
(funcall mode -1)
|
||||
(push mode magit-blame-disabled-modes)))
|
||||
(setq magit-blame-separator (magit-blame--format-separator))
|
||||
(unless magit-blame--style
|
||||
(setq magit-blame--style (car magit-blame-styles)))
|
||||
(magit-blame--update-margin))
|
||||
(t
|
||||
(when (process-live-p magit-blame-process)
|
||||
(kill-process magit-blame-process)
|
||||
(while magit-blame-process
|
||||
(sit-for 0.01))) ; avoid racing the sentinel
|
||||
(remove-hook 'after-save-hook 'magit-blame--refresh t)
|
||||
(remove-hook 'post-command-hook 'magit-blame-goto-chunk-hook t)
|
||||
(remove-hook 'before-revert-hook 'magit-blame--remove-overlays t)
|
||||
(remove-hook 'after-revert-hook 'magit-blame--refresh t)
|
||||
(remove-hook 'read-only-mode-hook 'magit-blame-toggle-read-only t)
|
||||
(unless magit-blame-buffer-read-only
|
||||
(read-only-mode -1))
|
||||
(magit-blame-read-only-mode -1)
|
||||
(dolist (mode magit-blame-disabled-modes)
|
||||
(funcall mode 1))
|
||||
(kill-local-variable 'magit-blame-disabled-modes)
|
||||
(kill-local-variable 'magit-blame-type)
|
||||
(kill-local-variable 'magit-blame--style)
|
||||
(magit-blame--update-margin)
|
||||
(magit-blame--remove-overlays))))
|
||||
|
||||
(defun magit-blame--refresh ()
|
||||
(magit-blame--run (magit-blame-arguments)))
|
||||
|
||||
(defun magit-blame-goto-chunk-hook ()
|
||||
(let ((chunk (magit-blame-chunk-at (point))))
|
||||
(when (cl-typep chunk 'magit-blame-chunk)
|
||||
(unless (eq chunk magit-blame-previous-chunk)
|
||||
(run-hooks 'magit-blame-goto-chunk-hook))
|
||||
(setq magit-blame-previous-chunk chunk))))
|
||||
|
||||
(defun magit-blame-toggle-read-only ()
|
||||
(magit-blame-read-only-mode (if buffer-read-only 1 -1)))
|
||||
|
||||
;;;; Read-Only Mode
|
||||
|
||||
(define-minor-mode magit-blame-read-only-mode
|
||||
"Provide keybindings for Magit-Blame mode.
|
||||
|
||||
This minor-mode provides the key bindings for Magit-Blame mode,
|
||||
but only when Read-Only mode is also enabled because these key
|
||||
bindings would otherwise conflict badly with regular bindings.
|
||||
|
||||
When both Magit-Blame mode and Read-Only mode are enabled, then
|
||||
this mode gets automatically enabled too and when one of these
|
||||
modes is toggled, then this mode also gets toggled automatically.
|
||||
|
||||
\\{magit-blame-read-only-mode-map}")
|
||||
|
||||
;;;; Kludges
|
||||
|
||||
(defun magit-blame-put-keymap-before-view-mode ()
|
||||
"Put `magit-blame-read-only-mode' ahead of `view-mode' in `minor-mode-map-alist'."
|
||||
(--when-let (assq 'magit-blame-read-only-mode
|
||||
(cl-member 'view-mode minor-mode-map-alist :key #'car))
|
||||
(setq minor-mode-map-alist
|
||||
(cons it (delq it minor-mode-map-alist))))
|
||||
(remove-hook 'view-mode-hook #'magit-blame-put-keymap-before-view-mode))
|
||||
|
||||
(add-hook 'view-mode-hook #'magit-blame-put-keymap-before-view-mode)
|
||||
|
||||
;;; Process
|
||||
|
||||
(defun magit-blame--run (args)
|
||||
(magit-with-toplevel
|
||||
(unless magit-blame-mode
|
||||
(magit-blame-mode 1))
|
||||
(message "Blaming...")
|
||||
(magit-blame-run-process
|
||||
(or magit-buffer-refname magit-buffer-revision)
|
||||
(magit-file-relative-name nil (not magit-buffer-file-name))
|
||||
(if (memq magit-blame-type '(final removal))
|
||||
(cons "--reverse" args)
|
||||
args)
|
||||
(list (line-number-at-pos (window-start))
|
||||
(line-number-at-pos (1- (window-end nil t)))))
|
||||
(set-process-sentinel magit-this-process
|
||||
'magit-blame-process-quickstart-sentinel)))
|
||||
|
||||
(defun magit-blame-run-process (revision file args &optional lines)
|
||||
(let ((process (magit-parse-git-async
|
||||
"blame" "--incremental" args
|
||||
(and lines (list "-L" (apply #'format "%s,%s" lines)))
|
||||
revision "--" file)))
|
||||
(set-process-filter process 'magit-blame-process-filter)
|
||||
(set-process-sentinel process 'magit-blame-process-sentinel)
|
||||
(process-put process 'arguments (list revision file args))
|
||||
(setq magit-blame-cache (make-hash-table :test 'equal))
|
||||
(setq magit-blame-process process)))
|
||||
|
||||
(defun magit-blame-process-quickstart-sentinel (process event)
|
||||
(when (memq (process-status process) '(exit signal))
|
||||
(magit-blame-process-sentinel process event t)
|
||||
(magit-blame-assert-buffer process)
|
||||
(with-current-buffer (process-get process 'command-buf)
|
||||
(when magit-blame-mode
|
||||
(let ((default-directory (magit-toplevel)))
|
||||
(apply #'magit-blame-run-process
|
||||
(process-get process 'arguments)))))))
|
||||
|
||||
(defun magit-blame-process-sentinel (process _event &optional quiet)
|
||||
(let ((status (process-status process)))
|
||||
(when (memq status '(exit signal))
|
||||
(kill-buffer (process-buffer process))
|
||||
(if (and (eq status 'exit)
|
||||
(zerop (process-exit-status process)))
|
||||
(unless quiet
|
||||
(message "Blaming...done"))
|
||||
(magit-blame-assert-buffer process)
|
||||
(with-current-buffer (process-get process 'command-buf)
|
||||
(if magit-blame-mode
|
||||
(progn (magit-blame-mode -1)
|
||||
(message "Blaming...failed"))
|
||||
(message "Blaming...aborted"))))
|
||||
(kill-local-variable 'magit-blame-process))))
|
||||
|
||||
(defun magit-blame-process-filter (process string)
|
||||
(internal-default-process-filter process string)
|
||||
(let ((buf (process-get process 'command-buf))
|
||||
(pos (process-get process 'parsed))
|
||||
(mark (process-mark process))
|
||||
type cache)
|
||||
(with-current-buffer buf
|
||||
(setq type magit-blame-type)
|
||||
(setq cache magit-blame-cache))
|
||||
(with-current-buffer (process-buffer process)
|
||||
(goto-char pos)
|
||||
(while (and (< (point) mark)
|
||||
(save-excursion (re-search-forward "^filename .+\n" nil t)))
|
||||
(pcase-let* ((`(,chunk ,revinfo)
|
||||
(magit-blame--parse-chunk type))
|
||||
(rev (oref chunk orig-rev)))
|
||||
(if revinfo
|
||||
(puthash rev revinfo cache)
|
||||
(setq revinfo
|
||||
(or (gethash rev cache)
|
||||
(puthash rev (magit-blame--commit-alist rev) cache))))
|
||||
(magit-blame--make-overlays buf chunk revinfo))
|
||||
(process-put process 'parsed (point))))))
|
||||
|
||||
(defun magit-blame--parse-chunk (type)
|
||||
(let (chunk revinfo)
|
||||
(unless (looking-at "^\\(.\\{40\\}\\) \\([0-9]+\\) \\([0-9]+\\) \\([0-9]+\\)")
|
||||
(error "Blaming failed due to unexpected output: %s"
|
||||
(buffer-substring-no-properties (point) (line-end-position))))
|
||||
(with-slots (orig-rev orig-file prev-rev prev-file)
|
||||
(setq chunk (magit-blame-chunk
|
||||
:orig-rev (match-string 1)
|
||||
:orig-line (string-to-number (match-string 2))
|
||||
:final-line (string-to-number (match-string 3))
|
||||
:num-lines (string-to-number (match-string 4))))
|
||||
(forward-line)
|
||||
(let (done)
|
||||
(while (not done)
|
||||
(cond ((looking-at "^filename \\(.+\\)")
|
||||
(setq done t)
|
||||
(setf orig-file (match-string 1)))
|
||||
((looking-at "^previous \\(.\\{40\\}\\) \\(.+\\)")
|
||||
(setf prev-rev (match-string 1))
|
||||
(setf prev-file (match-string 2)))
|
||||
((looking-at "^\\([^ ]+\\) \\(.+\\)")
|
||||
(push (cons (match-string 1)
|
||||
(match-string 2)) revinfo)))
|
||||
(forward-line)))
|
||||
(when (and (eq type 'removal) prev-rev)
|
||||
(cl-rotatef orig-rev prev-rev)
|
||||
(cl-rotatef orig-file prev-file)
|
||||
(setq revinfo nil)))
|
||||
(list chunk revinfo)))
|
||||
|
||||
(defun magit-blame--commit-alist (rev)
|
||||
(cl-mapcar 'cons
|
||||
'("summary"
|
||||
"author" "author-time" "author-tz"
|
||||
"committer" "committer-time" "committer-tz")
|
||||
(split-string (magit-rev-format "%s\v%an\v%ad\v%cn\v%cd" rev
|
||||
"--date=format:%s\v%z")
|
||||
"\v")))
|
||||
|
||||
(defun magit-blame-assert-buffer (process)
|
||||
(unless (buffer-live-p (process-get process 'command-buf))
|
||||
(kill-process process)
|
||||
(user-error "Buffer being blamed has been killed")))
|
||||
|
||||
;;; Display
|
||||
|
||||
(defun magit-blame--make-overlays (buf chunk revinfo)
|
||||
(with-current-buffer buf
|
||||
(save-excursion
|
||||
(save-restriction
|
||||
(widen)
|
||||
(goto-char (point-min))
|
||||
(forward-line (1- (oref chunk final-line)))
|
||||
(let ((beg (point))
|
||||
(end (save-excursion
|
||||
(forward-line (oref chunk num-lines))
|
||||
(point))))
|
||||
(magit-blame--remove-overlays beg end)
|
||||
(magit-blame--make-margin-overlays chunk revinfo beg end)
|
||||
(magit-blame--make-heading-overlay chunk revinfo beg end)
|
||||
(magit-blame--make-highlight-overlay chunk beg))))))
|
||||
|
||||
(defun magit-blame--make-margin-overlays (chunk revinfo _beg end)
|
||||
(save-excursion
|
||||
(let ((line 0))
|
||||
(while (< (point) end)
|
||||
(magit-blame--make-margin-overlay chunk revinfo line)
|
||||
(forward-line)
|
||||
(cl-incf line)))))
|
||||
|
||||
(defun magit-blame--make-margin-overlay (chunk revinfo line)
|
||||
(let* ((end (line-end-position))
|
||||
;; If possible avoid putting this on the first character
|
||||
;; of the line to avoid a conflict with the line overlay.
|
||||
(beg (min (1+ (line-beginning-position)) end))
|
||||
(ov (make-overlay beg end)))
|
||||
(overlay-put ov 'magit-blame-chunk chunk)
|
||||
(overlay-put ov 'magit-blame-revinfo revinfo)
|
||||
(overlay-put ov 'magit-blame-margin line)
|
||||
(magit-blame--update-margin-overlay ov)))
|
||||
|
||||
(defun magit-blame--make-heading-overlay (chunk revinfo beg end)
|
||||
(let ((ov (make-overlay beg end)))
|
||||
(overlay-put ov 'magit-blame-chunk chunk)
|
||||
(overlay-put ov 'magit-blame-revinfo revinfo)
|
||||
(overlay-put ov 'magit-blame-heading t)
|
||||
(magit-blame--update-heading-overlay ov)))
|
||||
|
||||
(defun magit-blame--make-highlight-overlay (chunk beg)
|
||||
(let ((ov (make-overlay beg (1+ (line-end-position)))))
|
||||
(overlay-put ov 'magit-blame-chunk chunk)
|
||||
(overlay-put ov 'magit-blame-highlight t)
|
||||
(magit-blame--update-highlight-overlay ov)))
|
||||
|
||||
(defun magit-blame--update-margin ()
|
||||
(setq left-margin-width (or (magit-blame--style-get 'margin-width) 0))
|
||||
(set-window-buffer (selected-window) (current-buffer)))
|
||||
|
||||
(defun magit-blame--update-overlays ()
|
||||
(save-restriction
|
||||
(widen)
|
||||
(dolist (ov (overlays-in (point-min) (point-max)))
|
||||
(cond ((overlay-get ov 'magit-blame-heading)
|
||||
(magit-blame--update-heading-overlay ov))
|
||||
((overlay-get ov 'magit-blame-margin)
|
||||
(magit-blame--update-margin-overlay ov))
|
||||
((overlay-get ov 'magit-blame-highlight)
|
||||
(magit-blame--update-highlight-overlay ov))))))
|
||||
|
||||
(defun magit-blame--update-margin-overlay (ov)
|
||||
(overlay-put
|
||||
ov 'before-string
|
||||
(and (magit-blame--style-get 'margin-width)
|
||||
(propertize
|
||||
"o" 'display
|
||||
(list (list 'margin 'left-margin)
|
||||
(let ((line (overlay-get ov 'magit-blame-margin))
|
||||
(format (magit-blame--style-get 'margin-format))
|
||||
(face (magit-blame--style-get 'margin-face)))
|
||||
(magit-blame--format-string
|
||||
ov
|
||||
(or (and (atom format)
|
||||
format)
|
||||
(nth line format)
|
||||
(car (last format)))
|
||||
(or (and (not (zerop line))
|
||||
(magit-blame--style-get 'margin-body-face))
|
||||
face
|
||||
'magit-blame-margin))))))))
|
||||
|
||||
(defun magit-blame--update-heading-overlay (ov)
|
||||
(overlay-put
|
||||
ov 'before-string
|
||||
(--if-let (magit-blame--style-get 'heading-format)
|
||||
(magit-blame--format-string ov it 'magit-blame-heading)
|
||||
(and (magit-blame--style-get 'show-lines)
|
||||
(or (not (magit-blame--style-get 'margin-format))
|
||||
(save-excursion
|
||||
(goto-char (overlay-start ov))
|
||||
;; Special case of the special case described in
|
||||
;; `magit-blame--make-margin-overlay'. For empty
|
||||
;; lines it is not possible to show both overlays
|
||||
;; without the line being to high.
|
||||
(not (= (point) (line-end-position)))))
|
||||
magit-blame-separator))))
|
||||
|
||||
(defun magit-blame--update-highlight-overlay (ov)
|
||||
(overlay-put ov 'font-lock-face (magit-blame--style-get 'highlight-face)))
|
||||
|
||||
(defun magit-blame--format-string (ov format face)
|
||||
(let* ((chunk (overlay-get ov 'magit-blame-chunk))
|
||||
(revinfo (overlay-get ov 'magit-blame-revinfo))
|
||||
(key (list format face))
|
||||
(string (cdr (assoc key revinfo))))
|
||||
(unless string
|
||||
(setq string
|
||||
(and format
|
||||
(magit-blame--format-string-1 (oref chunk orig-rev)
|
||||
revinfo format face)))
|
||||
(nconc revinfo (list (cons key string))))
|
||||
string))
|
||||
|
||||
(defun magit-blame--format-string-1 (rev revinfo format face)
|
||||
(let ((str
|
||||
(if (equal rev "0000000000000000000000000000000000000000")
|
||||
(propertize (concat (if (string-prefix-p "\s" format) "\s" "")
|
||||
"Not Yet Committed"
|
||||
(if (string-suffix-p "\n" format) "\n" ""))
|
||||
'font-lock-face face)
|
||||
(magit--format-spec
|
||||
(propertize format 'font-lock-face face)
|
||||
(cl-flet* ((p0 (s f)
|
||||
(propertize s 'font-lock-face
|
||||
(if face
|
||||
(if (listp face)
|
||||
face
|
||||
(list f face))
|
||||
f)))
|
||||
(p1 (k f)
|
||||
(p0 (cdr (assoc k revinfo)) f))
|
||||
(p2 (k1 k2 f)
|
||||
(p0 (magit-blame--format-time-string
|
||||
(cdr (assoc k1 revinfo))
|
||||
(cdr (assoc k2 revinfo)))
|
||||
f)))
|
||||
`((?H . ,(p0 rev 'magit-blame-hash))
|
||||
(?s . ,(p1 "summary" 'magit-blame-summary))
|
||||
(?a . ,(p1 "author" 'magit-blame-name))
|
||||
(?c . ,(p1 "committer" 'magit-blame-name))
|
||||
(?A . ,(p2 "author-time" "author-tz" 'magit-blame-date))
|
||||
(?C . ,(p2 "committer-time" "committer-tz" 'magit-blame-date))
|
||||
(?f . "")))))))
|
||||
(if-let ((width (and (string-suffix-p "%f" format)
|
||||
(magit-blame--style-get 'margin-width))))
|
||||
(concat str
|
||||
(propertize (make-string (max 0 (- width (length str))) ?\s)
|
||||
'font-lock-face face))
|
||||
str)))
|
||||
|
||||
(defun magit-blame--format-separator ()
|
||||
(propertize
|
||||
(concat (propertize "\s" 'display '(space :height (2)))
|
||||
(propertize "\n" 'line-height t))
|
||||
'font-lock-face `(:background
|
||||
,(face-attribute 'magit-blame-heading
|
||||
:background nil t)
|
||||
,@(and (>= emacs-major-version 27) '(:extend t)))))
|
||||
|
||||
(defun magit-blame--format-time-string (time tz)
|
||||
(let* ((time-format (or (magit-blame--style-get 'time-format)
|
||||
magit-blame-time-format))
|
||||
(tz-in-second (and (string-match "%z" time-format)
|
||||
(car (last (parse-time-string tz))))))
|
||||
(format-time-string time-format
|
||||
(seconds-to-time (string-to-number time))
|
||||
tz-in-second)))
|
||||
|
||||
(defun magit-blame--remove-overlays (&optional beg end)
|
||||
(save-restriction
|
||||
(widen)
|
||||
(dolist (ov (overlays-in (or beg (point-min))
|
||||
(or end (point-max))))
|
||||
(when (overlay-get ov 'magit-blame-chunk)
|
||||
(delete-overlay ov)))))
|
||||
|
||||
(defun magit-blame-maybe-show-message ()
|
||||
(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)))))
|
||||
(progn (set-text-properties 0 (length msg) nil msg)
|
||||
(message msg))
|
||||
(message "Commit data not available yet. Still blaming.")))))
|
||||
|
||||
;;; Commands
|
||||
|
||||
;;;###autoload (autoload 'magit-blame-echo "magit-blame" nil t)
|
||||
(transient-define-suffix magit-blame-echo (args)
|
||||
"For each line show the revision in which it was added.
|
||||
Show the information about the chunk at point in the echo area
|
||||
when moving between chunks. Unlike other blaming commands, do
|
||||
not turn on `read-only-mode'."
|
||||
:if (lambda ()
|
||||
(and buffer-file-name
|
||||
(or (not magit-blame-mode)
|
||||
buffer-read-only)))
|
||||
(interactive (list (magit-blame-arguments)))
|
||||
(when magit-buffer-file-name
|
||||
(user-error "Blob buffers aren't supported"))
|
||||
(setq-local magit-blame--style
|
||||
(assq magit-blame-echo-style magit-blame-styles))
|
||||
(setq-local magit-blame-disable-modes
|
||||
(cons 'eldoc-mode magit-blame-disable-modes))
|
||||
(if (not magit-blame-mode)
|
||||
(let ((magit-blame-read-only nil))
|
||||
(magit-blame--pre-blame-assert 'addition)
|
||||
(magit-blame--pre-blame-setup 'addition)
|
||||
(magit-blame--run args))
|
||||
(read-only-mode -1)
|
||||
(magit-blame--update-overlays)))
|
||||
|
||||
;;;###autoload (autoload 'magit-blame-addition "magit-blame" nil t)
|
||||
(transient-define-suffix magit-blame-addition (args)
|
||||
"For each line show the revision in which it was added."
|
||||
(interactive (list (magit-blame-arguments)))
|
||||
(magit-blame--pre-blame-assert 'addition)
|
||||
(magit-blame--pre-blame-setup 'addition)
|
||||
(magit-blame--run args))
|
||||
|
||||
;;;###autoload (autoload 'magit-blame-removal "magit-blame" nil t)
|
||||
(transient-define-suffix magit-blame-removal (args)
|
||||
"For each line show the revision in which it was removed."
|
||||
:if-nil 'buffer-file-name
|
||||
(interactive (list (magit-blame-arguments)))
|
||||
(unless magit-buffer-file-name
|
||||
(user-error "Only blob buffers can be blamed in reverse"))
|
||||
(magit-blame--pre-blame-assert 'removal)
|
||||
(magit-blame--pre-blame-setup 'removal)
|
||||
(magit-blame--run args))
|
||||
|
||||
;;;###autoload (autoload 'magit-blame-reverse "magit-blame" nil t)
|
||||
(transient-define-suffix magit-blame-reverse (args)
|
||||
"For each line show the last revision in which it still exists."
|
||||
:if-nil 'buffer-file-name
|
||||
(interactive (list (magit-blame-arguments)))
|
||||
(unless magit-buffer-file-name
|
||||
(user-error "Only blob buffers can be blamed in reverse"))
|
||||
(magit-blame--pre-blame-assert 'final)
|
||||
(magit-blame--pre-blame-setup 'final)
|
||||
(magit-blame--run args))
|
||||
|
||||
(defun magit-blame--pre-blame-assert (type)
|
||||
(unless (magit-toplevel)
|
||||
(magit--not-inside-repository-error))
|
||||
(if (and magit-blame-mode
|
||||
(eq type magit-blame-type))
|
||||
(if-let ((chunk (magit-current-blame-chunk)))
|
||||
(unless (oref chunk prev-rev)
|
||||
(user-error "Chunk has no further history"))
|
||||
(user-error "Commit data not available yet. Still blaming."))
|
||||
(unless (magit-file-relative-name nil (not magit-buffer-file-name))
|
||||
(if buffer-file-name
|
||||
(user-error "Buffer isn't visiting a tracked file")
|
||||
(user-error "Buffer isn't visiting a file")))))
|
||||
|
||||
(defun magit-blame--pre-blame-setup (type)
|
||||
(when magit-blame-mode
|
||||
(if (eq type magit-blame-type)
|
||||
(let ((style magit-blame--style))
|
||||
(magit-blame-visit-other-file)
|
||||
(setq-local magit-blame--style style)
|
||||
(setq-local magit-blame-recursive-p t)
|
||||
;; Set window-start for the benefit of quickstart.
|
||||
(redisplay))
|
||||
(magit-blame--remove-overlays)))
|
||||
(setq magit-blame-type type))
|
||||
|
||||
(defun magit-blame-visit-other-file ()
|
||||
"Visit another blob related to the current chunk."
|
||||
(interactive)
|
||||
(with-slots (prev-rev prev-file orig-line)
|
||||
(magit-current-blame-chunk)
|
||||
(unless prev-rev
|
||||
(user-error "Chunk has no further history"))
|
||||
(magit-with-toplevel
|
||||
(magit-find-file prev-rev prev-file))
|
||||
;; TODO Adjust line like magit-diff-visit-file.
|
||||
(goto-char (point-min))
|
||||
(forward-line (1- orig-line))))
|
||||
|
||||
(defun magit-blame-visit-file ()
|
||||
"Visit the blob related to the current chunk."
|
||||
(interactive)
|
||||
(with-slots (orig-rev orig-file orig-line)
|
||||
(magit-current-blame-chunk)
|
||||
(magit-with-toplevel
|
||||
(magit-find-file orig-rev orig-file))
|
||||
(goto-char (point-min))
|
||||
(forward-line (1- orig-line))))
|
||||
|
||||
(transient-define-suffix magit-blame-quit ()
|
||||
"Turn off Magit-Blame mode.
|
||||
If the buffer was created during a recursive blame,
|
||||
then also kill the buffer."
|
||||
:if-non-nil 'magit-blame-mode
|
||||
(interactive)
|
||||
(magit-blame-mode -1)
|
||||
(when magit-blame-recursive-p
|
||||
(kill-buffer)))
|
||||
|
||||
(defun magit-blame-next-chunk ()
|
||||
"Move to the next chunk."
|
||||
(interactive)
|
||||
(--if-let (next-single-char-property-change (point) 'magit-blame-chunk)
|
||||
(goto-char it)
|
||||
(user-error "No more chunks")))
|
||||
|
||||
(defun magit-blame-previous-chunk ()
|
||||
"Move to the previous chunk."
|
||||
(interactive)
|
||||
(--if-let (previous-single-char-property-change (point) 'magit-blame-chunk)
|
||||
(goto-char it)
|
||||
(user-error "No more chunks")))
|
||||
|
||||
(defun magit-blame-next-chunk-same-commit (&optional previous)
|
||||
"Move to the next chunk from the same commit.\n\n(fn)"
|
||||
(interactive)
|
||||
(if-let ((rev (oref (magit-current-blame-chunk) orig-rev)))
|
||||
(let ((pos (point)) ov)
|
||||
(save-excursion
|
||||
(while (and (not ov)
|
||||
(not (= pos (if previous (point-min) (point-max))))
|
||||
(setq pos (funcall
|
||||
(if previous
|
||||
'previous-single-char-property-change
|
||||
'next-single-char-property-change)
|
||||
pos 'magit-blame-chunk)))
|
||||
(--when-let (magit-blame--overlay-at pos)
|
||||
(when (equal (oref (magit-blame-chunk-at pos) orig-rev) rev)
|
||||
(setq ov it)))))
|
||||
(if ov
|
||||
(goto-char (overlay-start ov))
|
||||
(user-error "No more chunks from same commit")))
|
||||
(user-error "This chunk hasn't been blamed yet")))
|
||||
|
||||
(defun magit-blame-previous-chunk-same-commit ()
|
||||
"Move to the previous chunk from the same commit."
|
||||
(interactive)
|
||||
(magit-blame-next-chunk-same-commit 'previous-single-char-property-change))
|
||||
|
||||
(defun magit-blame-cycle-style ()
|
||||
"Change how blame information is visualized.
|
||||
Cycle through the elements of option `magit-blame-styles'."
|
||||
(interactive)
|
||||
(setq magit-blame--style
|
||||
(or (cadr (cl-member (car magit-blame--style)
|
||||
magit-blame-styles :key #'car))
|
||||
(car magit-blame-styles)))
|
||||
(magit-blame--update-margin)
|
||||
(magit-blame--update-overlays))
|
||||
|
||||
(defun magit-blame-copy-hash ()
|
||||
"Save hash of the current chunk's commit to the kill ring.
|
||||
|
||||
When the region is active, then save the region's content
|
||||
instead of the hash, like `kill-ring-save' would."
|
||||
(interactive)
|
||||
(if (use-region-p)
|
||||
(call-interactively #'copy-region-as-kill)
|
||||
(kill-new (message "%s" (oref (magit-current-blame-chunk) orig-rev)))))
|
||||
|
||||
;;; Popup
|
||||
|
||||
;;;###autoload (autoload 'magit-blame "magit-blame" nil t)
|
||||
(transient-define-prefix magit-blame ()
|
||||
"Show the commits that added or removed lines in the visited file."
|
||||
:man-page "git-blame"
|
||||
:value '("-w")
|
||||
["Arguments"
|
||||
("-w" "Ignore whitespace" "-w")
|
||||
("-r" "Do not treat root commits as boundaries" "--root")
|
||||
(magit-blame:-M)
|
||||
(magit-blame:-C)]
|
||||
["Actions"
|
||||
("b" "Show commits adding lines" magit-blame-addition)
|
||||
("r" "Show commits removing lines" magit-blame-removal)
|
||||
("f" "Show last commits that still have lines" magit-blame-reverse)
|
||||
("m" "Blame echo" magit-blame-echo)
|
||||
("q" "Quit blaming" magit-blame-quit)]
|
||||
["Refresh"
|
||||
:if-non-nil magit-blame-mode
|
||||
("c" "Cycle style" magit-blame-cycle-style :transient t)])
|
||||
|
||||
(defun magit-blame-arguments ()
|
||||
(transient-args 'magit-blame))
|
||||
|
||||
(transient-define-argument magit-blame:-M ()
|
||||
:description "Detect lines moved or copied within a file"
|
||||
:class 'transient-option
|
||||
:argument "-M"
|
||||
:reader 'transient-read-number-N+)
|
||||
|
||||
(transient-define-argument magit-blame:-C ()
|
||||
:description "Detect lines moved or copied between files"
|
||||
:class 'transient-option
|
||||
:argument "-C"
|
||||
:reader 'transient-read-number-N+)
|
||||
|
||||
;;; Utilities
|
||||
|
||||
(defun magit-blame-maybe-update-revision-buffer ()
|
||||
(when-let ((chunk (magit-current-blame-chunk))
|
||||
(commit (oref chunk orig-rev))
|
||||
(buffer (magit-get-mode-buffer 'magit-revision-mode nil t)))
|
||||
(if magit--update-revision-buffer
|
||||
(setq magit--update-revision-buffer (list commit buffer))
|
||||
(setq magit--update-revision-buffer (list commit buffer))
|
||||
(run-with-idle-timer
|
||||
magit-update-other-window-delay nil
|
||||
(lambda ()
|
||||
(pcase-let ((`(,rev ,buf) magit--update-revision-buffer))
|
||||
(setq magit--update-revision-buffer nil)
|
||||
(when (buffer-live-p buf)
|
||||
(let ((magit-display-buffer-noselect t))
|
||||
(apply #'magit-show-commit rev
|
||||
(magit-diff-arguments 'magit-revision-mode))))))))))
|
||||
|
||||
;;; _
|
||||
(provide 'magit-blame)
|
||||
;;; magit-blame.el ends here
|
BIN
elpa/magit-20210414.1306/magit-blame.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-blame.elc
Normal file
Binary file not shown.
207
elpa/magit-20210414.1306/magit-bookmark.el
Normal file
207
elpa/magit-20210414.1306/magit-bookmark.el
Normal file
|
@ -0,0 +1,207 @@
|
|||
;;; magit-bookmark.el --- bookmark support for Magit -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2010-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
|
||||
;; Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
;; Inspired by an earlier implementation by Yuri Khan.
|
||||
|
||||
;; Magit is free software; you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
;;
|
||||
;; Magit is distributed in the hope that it will be useful, but WITHOUT
|
||||
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
;; License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Magit. If not, see http://www.gnu.org/licenses.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Support for bookmarks for most Magit buffers.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'magit)
|
||||
(require 'bookmark)
|
||||
|
||||
;;; Core
|
||||
|
||||
(defun magit--make-bookmark ()
|
||||
"Create a bookmark for the current Magit buffer.
|
||||
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)
|
||||
;; `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))
|
||||
(bookmark-prop-set bookmark 'defaults (list (magit-bookmark-name)))
|
||||
(dolist (var (get major-mode 'magit-bookmark-variables))
|
||||
(bookmark-prop-set bookmark var (symbol-value var)))
|
||||
(bookmark-prop-set
|
||||
bookmark 'magit-hidden-sections
|
||||
(--keep (and (oref it hidden)
|
||||
(cons (oref it type)
|
||||
(if (derived-mode-p 'magit-stash-mode)
|
||||
(replace-regexp-in-string
|
||||
(regexp-quote magit-buffer-revision)
|
||||
magit-buffer-revision-hash
|
||||
(oref it value))
|
||||
(oref it value))))
|
||||
(oref magit-root-section children)))
|
||||
bookmark)
|
||||
(user-error "Bookmarking is not implemented for %s buffers" major-mode)))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit--handle-bookmark (bookmark)
|
||||
"Open a bookmark created by `magit--make-bookmark'.
|
||||
Call the `magit-*-setup-buffer' function of the the major-mode
|
||||
with the variables' values as arguments, which were recorded by
|
||||
`magit--make-bookmark'. Ignore `magit-display-buffer-function'."
|
||||
(let ((buffer (let ((default-directory (bookmark-get-filename bookmark))
|
||||
(mode (bookmark-prop-get bookmark 'mode))
|
||||
(magit-display-buffer-function #'identity)
|
||||
(magit-display-buffer-noselect t))
|
||||
(apply (intern (format "%s-setup-buffer"
|
||||
(substring (symbol-name mode) 0 -5)))
|
||||
(--map (bookmark-prop-get bookmark it)
|
||||
(get mode 'magit-bookmark-variables))))))
|
||||
(set-buffer buffer) ; That is the interface we have to adhere to.
|
||||
(when-let ((hidden (bookmark-prop-get bookmark 'magit-hidden-sections)))
|
||||
(with-current-buffer buffer
|
||||
(dolist (child (oref magit-root-section children))
|
||||
(if (member (cons (oref child type)
|
||||
(oref child value))
|
||||
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 ()
|
||||
"Return name for bookmark to current buffer."
|
||||
(format "%s%s"
|
||||
(substring (symbol-name major-mode) 0 -5)
|
||||
(if-let ((vars (get major-mode 'magit-bookmark-variables)))
|
||||
(cl-mapcan (lambda (var)
|
||||
(let ((val (symbol-value var)))
|
||||
(if (and val (atom val))
|
||||
(list val)
|
||||
val)))
|
||||
vars)
|
||||
"")))
|
||||
|
||||
;;; Diff
|
||||
;;;; Diff
|
||||
|
||||
(put 'magit-diff-mode 'magit-bookmark-variables
|
||||
'(magit-buffer-range-hashed
|
||||
magit-buffer-typearg
|
||||
magit-buffer-diff-args
|
||||
magit-buffer-diff-files))
|
||||
|
||||
(cl-defmethod magit-bookmark-name (&context (major-mode magit-diff-mode))
|
||||
(format "magit-diff(%s%s)"
|
||||
(pcase (magit-diff-type)
|
||||
(`staged "staged")
|
||||
(`unstaged "unstaged")
|
||||
(`committed magit-buffer-range)
|
||||
(`undefined
|
||||
(delq nil (list magit-buffer-typearg magit-buffer-range-hashed))))
|
||||
(if magit-buffer-diff-files
|
||||
(concat " -- " (mapconcat #'identity magit-buffer-diff-files " "))
|
||||
"")))
|
||||
|
||||
;;;; Revision
|
||||
|
||||
(put 'magit-revision-mode 'magit-bookmark-variables
|
||||
'(magit-buffer-revision-hash
|
||||
magit-buffer-diff-args
|
||||
magit-buffer-diff-files))
|
||||
|
||||
(cl-defmethod magit-bookmark-name (&context (major-mode magit-revision-mode))
|
||||
(format "magit-revision(%s %s)"
|
||||
(magit-rev-abbrev magit-buffer-revision)
|
||||
(if magit-buffer-diff-files
|
||||
(mapconcat #'identity magit-buffer-diff-files " ")
|
||||
(magit-rev-format "%s" magit-buffer-revision))))
|
||||
|
||||
;;;; Stash
|
||||
|
||||
(put 'magit-stash-mode 'magit-bookmark-variables
|
||||
'(magit-buffer-revision-hash
|
||||
magit-buffer-diff-args
|
||||
magit-buffer-diff-files))
|
||||
|
||||
(cl-defmethod magit-bookmark-name (&context (major-mode magit-stash-mode))
|
||||
(format "magit-stash(%s %s)"
|
||||
(magit-rev-abbrev magit-buffer-revision)
|
||||
(if magit-buffer-diff-files
|
||||
(mapconcat #'identity magit-buffer-diff-files " ")
|
||||
(magit-rev-format "%s" magit-buffer-revision))))
|
||||
|
||||
;;; Log
|
||||
;;;; Log
|
||||
|
||||
(put 'magit-log-mode 'magit-bookmark-variables
|
||||
'(magit-buffer-revisions
|
||||
magit-buffer-log-args
|
||||
magit-buffer-log-files))
|
||||
|
||||
(cl-defmethod magit-bookmark-name (&context (major-mode magit-log-mode))
|
||||
(format "magit-log(%s%s)"
|
||||
(mapconcat #'identity magit-buffer-revisions " ")
|
||||
(if magit-buffer-log-files
|
||||
(concat " -- " (mapconcat #'identity magit-buffer-log-files " "))
|
||||
"")))
|
||||
|
||||
;;;; Cherry
|
||||
|
||||
(put 'magit-cherry-mode 'magit-bookmark-variables
|
||||
'(magit-buffer-refname
|
||||
magit-buffer-upstream))
|
||||
|
||||
(cl-defmethod magit-bookmark-name (&context (major-mode magit-cherry-mode))
|
||||
(format "magit-cherry(%s > %s)"
|
||||
magit-buffer-refname
|
||||
magit-buffer-upstream))
|
||||
|
||||
;;;; Reflog
|
||||
|
||||
(put 'magit-reflog-mode 'magit-bookmark-variables
|
||||
'(magit-buffer-refname))
|
||||
|
||||
(cl-defmethod magit-bookmark-name (&context (major-mode magit-reflog-mode))
|
||||
(format "magit-reflog(%s)" magit-buffer-refname))
|
||||
|
||||
;;; Misc
|
||||
|
||||
(put 'magit-status-mode 'magit-bookmark-variables nil)
|
||||
|
||||
(put 'magit-refs-mode 'magit-bookmark-variables
|
||||
'(magit-buffer-upstream
|
||||
magit-buffer-arguments))
|
||||
|
||||
(put 'magit-stashes-mode 'magit-bookmark-variables nil)
|
||||
|
||||
(cl-defmethod magit-bookmark-name (&context (major-mode magit-stashes-mode))
|
||||
(format "magit-states(%s)" magit-buffer-refname))
|
||||
|
||||
;;; _
|
||||
(provide 'magit-bookmark)
|
||||
;;; magit-bookmark.el ends here
|
BIN
elpa/magit-20210414.1306/magit-bookmark.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-bookmark.elc
Normal file
Binary file not shown.
916
elpa/magit-20210414.1306/magit-branch.el
Normal file
916
elpa/magit-20210414.1306/magit-branch.el
Normal file
|
@ -0,0 +1,916 @@
|
|||
;;; magit-branch.el --- branch support -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2010-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
|
||||
;; Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
;; Magit is free software; you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
;;
|
||||
;; Magit is distributed in the hope that it will be useful, but WITHOUT
|
||||
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
;; License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Magit. If not, see http://www.gnu.org/licenses.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; This library implements support for branches. It defines commands
|
||||
;; for creating, checking out, manipulating, and configuring branches.
|
||||
;; Commands defined here are mainly concerned with branches as
|
||||
;; pointers, commands that deal with what a branch points at, are
|
||||
;; defined elsewhere.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'magit)
|
||||
(require 'magit-reset)
|
||||
|
||||
;;; Options
|
||||
|
||||
(defcustom magit-branch-read-upstream-first t
|
||||
"Whether to read upstream before name of new branch when creating a branch.
|
||||
|
||||
`nil' Read the branch name first.
|
||||
`t' Read the upstream first.
|
||||
`fallback' Read the upstream first, but if it turns out that the chosen
|
||||
value is not a valid upstream (because it cannot be resolved
|
||||
as an existing revision), then treat it as the name of the
|
||||
new branch and continue by reading the upstream next."
|
||||
:package-version '(magit . "2.2.0")
|
||||
:group 'magit-commands
|
||||
:type '(choice (const :tag "read branch name first" nil)
|
||||
(const :tag "read upstream first" t)
|
||||
(const :tag "read upstream first, with fallback" fallback)))
|
||||
|
||||
(defcustom magit-branch-prefer-remote-upstream nil
|
||||
"Whether to favor remote upstreams when creating new branches.
|
||||
|
||||
When a new branch is created, then the branch, commit, or stash
|
||||
at point is suggested as the default starting point of the new
|
||||
branch, or if there is no such revision at point the current
|
||||
branch. In either case the user may choose another starting
|
||||
point.
|
||||
|
||||
If the chosen starting point is a branch, then it may also be set
|
||||
as the upstream of the new branch, depending on the value of the
|
||||
Git variable `branch.autoSetupMerge'. By default this is done
|
||||
for remote branches, but not for local branches.
|
||||
|
||||
You might prefer to always use some remote branch as upstream.
|
||||
If the chosen starting point is (1) a local branch, (2) whose
|
||||
name matches a member of the value of this option, (3) the
|
||||
upstream of that local branch is a remote branch with the same
|
||||
name, and (4) that remote branch can be fast-forwarded to the
|
||||
local branch, then the chosen branch is used as starting point,
|
||||
but its own upstream is used as the upstream of the new branch.
|
||||
|
||||
Members of this option's value are treated as branch names that
|
||||
have to match exactly unless they contain a character that makes
|
||||
them invalid as a branch name. Recommended characters to use
|
||||
to trigger interpretation as a regexp are \"*\" and \"^\". Some
|
||||
other characters which you might expect to be invalid, actually
|
||||
are not, e.g. \".+$\" are all perfectly valid. More precisely,
|
||||
if `git check-ref-format --branch STRING' exits with a non-zero
|
||||
status, then treat STRING as a regexp.
|
||||
|
||||
Assuming the chosen branch matches these conditions you would end
|
||||
up with with e.g.:
|
||||
|
||||
feature --upstream--> origin/master
|
||||
|
||||
instead of
|
||||
|
||||
feature --upstream--> master --upstream--> origin/master
|
||||
|
||||
Which you prefer is a matter of personal preference. If you do
|
||||
prefer the former, then you should add branches such as \"master\",
|
||||
\"next\", and \"maint\" to the value of this options."
|
||||
:package-version '(magit . "2.4.0")
|
||||
:group 'magit-commands
|
||||
:type '(repeat string))
|
||||
|
||||
(defcustom magit-branch-adjust-remote-upstream-alist nil
|
||||
"Alist of upstreams to be used when branching from remote branches.
|
||||
|
||||
When creating a local branch from an ephemeral branch located
|
||||
on a remote, e.g. a feature or hotfix branch, then that remote
|
||||
branch should usually not be used as the upstream branch, since
|
||||
the push-remote already allows accessing it and having both the
|
||||
upstream and the push-remote reference the same related branch
|
||||
would be wasteful. Instead a branch like \"maint\" or \"master\"
|
||||
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.
|
||||
|
||||
UPSTREAM is the branch to be used as the upstream for branches
|
||||
specified by RULE. It can be a local or a remote branch.
|
||||
|
||||
RULE can either be a regular expression, matching branches whose
|
||||
upstream should be the one specified by UPSTREAM. Or it can be
|
||||
a list of the only branches that should *not* use UPSTREAM; all
|
||||
other branches will. Matching is done after stripping the remote
|
||||
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\"))
|
||||
|
||||
Or if the names of all your ephemeral branches contain a slash,
|
||||
at least in some repositories, then a good value could be:
|
||||
|
||||
((\"origin/master\" . \"/\"))
|
||||
|
||||
Of course you can also fine-tune:
|
||||
|
||||
((\"origin/maint\" . \"\\\\\\=`hotfix/\")
|
||||
(\"origin/master\" . \"\\\\\\=`feature/\"))
|
||||
|
||||
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."
|
||||
:package-version '(magit . "2.9.0")
|
||||
:group 'magit-commands
|
||||
:type '(repeat (cons (string :tag "Use upstream")
|
||||
(choice :tag "for branches"
|
||||
(regexp :tag "matching")
|
||||
(repeat :tag "except"
|
||||
(string :tag "branch"))))))
|
||||
|
||||
(defcustom magit-branch-rename-push-target t
|
||||
"Whether the push-remote setup is preserved when renaming a branch.
|
||||
|
||||
The command `magit-branch-rename' renames a branch named OLD to
|
||||
NEW. This option controls how much of the push-remote setup is
|
||||
preserved when doing so.
|
||||
|
||||
When nil, then preserve nothing and unset `branch.OLD.pushRemote'.
|
||||
|
||||
When `local-only', then first set `branch.NEW.pushRemote' to the
|
||||
same value as `branch.OLD.pushRemote', provided the latter is
|
||||
actually set and unless the former already has another value.
|
||||
|
||||
When t, then rename the branch named OLD on the remote specified
|
||||
by `branch.OLD.pushRemote' to NEW, provided OLD exists on that
|
||||
remote and unless NEW already exists on the remote.
|
||||
|
||||
When `forge-only' and the `forge' package is available, then
|
||||
behave like `t' if the remote points to a repository on a forge
|
||||
(currently Github or Gitlab), otherwise like `local-only'.
|
||||
|
||||
Another supported but obsolete value is `github-only'. It is a
|
||||
misnomer because it now treated as an alias for `forge-only'."
|
||||
:package-version '(magit . "2.90.0")
|
||||
:group 'magit-commands
|
||||
:type '(choice
|
||||
(const :tag "Don't preserve push-remote setup" nil)
|
||||
(const :tag "Preserve push-remote setup" local-only)
|
||||
(const :tag "... and rename corresponding branch on remote" t)
|
||||
(const :tag "... but only if remote is on a forge" forge-only)))
|
||||
|
||||
(defcustom magit-branch-direct-configure t
|
||||
"Whether the command `magit-branch' shows Git variables.
|
||||
When set to nil, no variables are displayed by this transient
|
||||
command, instead the sub-transient `magit-branch-configure'
|
||||
has to be used to view and change branch related variables."
|
||||
:package-version '(magit . "2.7.0")
|
||||
:group 'magit-commands
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom magit-published-branches '("origin/master")
|
||||
"List of branches that are considered to be published."
|
||||
:package-version '(magit . "2.13.0")
|
||||
:group 'magit-commands
|
||||
:type '(repeat string))
|
||||
|
||||
;;; Commands
|
||||
|
||||
;;;###autoload (autoload 'magit-branch "magit" nil t)
|
||||
(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
|
||||
(oref transient--prefix scope)))
|
||||
("d" magit-branch.<branch>.description)
|
||||
("u" magit-branch.<branch>.merge/remote)
|
||||
("r" magit-branch.<branch>.rebase)
|
||||
("p" magit-branch.<branch>.pushRemote)]
|
||||
[["Checkout"
|
||||
("b" "branch/revision" magit-checkout)
|
||||
("l" "local branch" magit-branch-checkout)
|
||||
(6 "o" "new orphan" magit-branch-orphan)]
|
||||
[""
|
||||
("c" "new branch" magit-branch-and-checkout)
|
||||
("s" "new spin-off" magit-branch-spinoff)
|
||||
(5 "w" "new worktree" magit-worktree-checkout)]
|
||||
["Create"
|
||||
("n" "new branch" magit-branch-create)
|
||||
("S" "new spin-out" magit-branch-spinout)
|
||||
(5 "W" "new worktree" magit-worktree-branch)]
|
||||
["Do"
|
||||
("C" "configure..." magit-branch-configure)
|
||||
("m" "rename" magit-branch-rename)
|
||||
("x" "reset" magit-branch-reset)
|
||||
("k" "delete" magit-branch-delete)]
|
||||
[""
|
||||
(7 "h" "shelve" magit-branch-shelve)
|
||||
(7 "H" "unshelve" magit-branch-unshelve)]]
|
||||
(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 &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")
|
||||
(magit-branch-arguments)))
|
||||
(when (string-match "\\`heads/\\(.+\\)" revision)
|
||||
(setq revision (match-string 1 revision)))
|
||||
(magit-run-git "checkout" args revision))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-branch-create (branch start-point)
|
||||
"Create BRANCH at branch or revision START-POINT."
|
||||
(interactive (magit-branch-read-args "Create branch"))
|
||||
(magit-call-git "branch" branch start-point)
|
||||
(magit-branch-maybe-adjust-upstream branch start-point)
|
||||
(magit-refresh))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-branch-and-checkout (branch start-point &optional args)
|
||||
"Create and checkout BRANCH at branch or revision START-POINT."
|
||||
(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" args "-b" branch start-point)
|
||||
(magit-branch-maybe-adjust-upstream branch start-point)
|
||||
(magit-refresh)))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-branch-or-checkout (arg &optional start-point)
|
||||
"Hybrid between `magit-checkout' and `magit-branch-and-checkout'.
|
||||
|
||||
Ask the user for an existing branch or revision. If the user
|
||||
input actually can be resolved as a branch or revision, then
|
||||
check that out, just like `magit-checkout' would.
|
||||
|
||||
Otherwise create and checkout a new branch using the input as
|
||||
its name. Before doing so read the starting-point for the new
|
||||
branch. This is similar to what `magit-branch-and-checkout'
|
||||
does."
|
||||
(interactive
|
||||
(let ((arg (magit-read-other-branch-or-commit "Checkout")))
|
||||
(list arg
|
||||
(and (not (magit-commit-p arg))
|
||||
(magit-read-starting-point "Create and checkout branch" arg)))))
|
||||
(when (string-match "\\`heads/\\(.+\\)" arg)
|
||||
(setq arg (match-string 1 arg)))
|
||||
(if start-point
|
||||
(magit-branch-and-checkout arg start-point)
|
||||
(magit-checkout arg)))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-branch-checkout (branch &optional start-point)
|
||||
"Checkout an existing or new local branch.
|
||||
|
||||
Read a branch name from the user offering all local branches and
|
||||
a subset of remote branches as candidates. Omit remote branches
|
||||
for which a local branch by the same name exists from the list
|
||||
of candidates. The user can also enter a completely new branch
|
||||
name.
|
||||
|
||||
- If the user selects an existing local branch, then check that
|
||||
out.
|
||||
|
||||
- If the user selects a remote branch, then create and checkout
|
||||
a new local branch with the same name. Configure the selected
|
||||
remote branch as push target.
|
||||
|
||||
- If the user enters a new branch name, then create and check
|
||||
that out, after also reading the starting-point from the user.
|
||||
|
||||
In the latter two cases the upstream is also set. Whether it is
|
||||
set to the chosen START-POINT or something else depends on the
|
||||
value of `magit-branch-adjust-remote-upstream-alist', just like
|
||||
when using `magit-branch-and-checkout'."
|
||||
(interactive
|
||||
(let* ((current (magit-get-current-branch))
|
||||
(local (magit-list-local-branch-names))
|
||||
(remote (--filter (and (string-match "[^/]+/" it)
|
||||
(not (member (substring it (match-end 0))
|
||||
(cons "HEAD" local))))
|
||||
(magit-list-remote-branch-names)))
|
||||
(choices (nconc (delete current local) remote))
|
||||
(atpoint (magit-branch-at-point))
|
||||
(choice (magit-completing-read
|
||||
"Checkout branch" choices
|
||||
nil nil nil 'magit-revision-history
|
||||
(or (car (member atpoint choices))
|
||||
(and atpoint
|
||||
(car (member (and (string-match "[^/]+/" atpoint)
|
||||
(substring atpoint (match-end 0)))
|
||||
choices)))))))
|
||||
(cond ((member choice remote)
|
||||
(list (and (string-match "[^/]+/" choice)
|
||||
(substring choice (match-end 0)))
|
||||
choice))
|
||||
((member choice local)
|
||||
(list choice))
|
||||
(t
|
||||
(list choice (magit-read-starting-point "Create" choice))))))
|
||||
(if (not start-point)
|
||||
(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)
|
||||
(when (magit-remote-branch-p start-point)
|
||||
(pcase-let ((`(,remote . ,remote-branch)
|
||||
(magit-split-branch-name start-point)))
|
||||
(when (and (equal branch remote-branch)
|
||||
(not (equal remote (magit-get "remote.pushDefault"))))
|
||||
(magit-set remote "branch" branch "pushRemote"))))))
|
||||
|
||||
(defun magit-branch-maybe-adjust-upstream (branch start-point)
|
||||
(--when-let
|
||||
(or (and (magit-get-upstream-branch branch)
|
||||
(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)))))
|
||||
(magit-call-git "branch" (concat "--set-upstream-to=" it) branch)))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-branch-orphan (branch start-point)
|
||||
"Create and checkout an orphan BRANCH with contents from revision START-POINT."
|
||||
(interactive (magit-branch-read-args "Create and checkout orphan branch"))
|
||||
(magit-run-git "checkout" "--orphan" branch start-point))
|
||||
|
||||
(defun magit-branch-read-args (prompt &optional default-start)
|
||||
(if magit-branch-read-upstream-first
|
||||
(let ((choice (magit-read-starting-point prompt nil default-start)))
|
||||
(if (magit-rev-verify choice)
|
||||
(list (magit-read-string-ns
|
||||
(if magit-completing-read--silent-default
|
||||
(format "%s (starting at `%s')" prompt choice)
|
||||
"Name for new branch")
|
||||
(let ((def (mapconcat #'identity
|
||||
(cdr (split-string choice "/"))
|
||||
"/")))
|
||||
(and (member choice (magit-list-remote-branch-names))
|
||||
(not (member def (magit-list-local-branch-names)))
|
||||
def)))
|
||||
choice)
|
||||
(if (eq magit-branch-read-upstream-first 'fallback)
|
||||
(list choice
|
||||
(magit-read-starting-point prompt choice default-start))
|
||||
(user-error "Not a valid starting-point: %s" choice))))
|
||||
(let ((branch (magit-read-string-ns (concat prompt " named"))))
|
||||
(list branch (magit-read-starting-point prompt branch default-start)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-branch-spinout (branch &optional from)
|
||||
"Create new branch from the unpushed commits.
|
||||
Like `magit-branch-spinoff' but remain on the current branch.
|
||||
If there are any uncommitted changes, then behave exactly like
|
||||
`magit-branch-spinoff'."
|
||||
(interactive (list (magit-read-string-ns "Spin out branch")
|
||||
(car (last (magit-region-values 'commit)))))
|
||||
(magit--branch-spinoff branch from nil))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-branch-spinoff (branch &optional from)
|
||||
"Create new branch from the unpushed commits.
|
||||
|
||||
Create and checkout a new branch starting at and tracking the
|
||||
current branch. That branch in turn is reset to the last commit
|
||||
it shares with its upstream. If the current branch has no
|
||||
upstream or no unpushed commits, then the new branch is created
|
||||
anyway and the previously current branch is not touched.
|
||||
|
||||
This is useful to create a feature branch after work has already
|
||||
began on the old branch (likely but not necessarily \"master\").
|
||||
|
||||
If the current branch is a member of the value of option
|
||||
`magit-branch-prefer-remote-upstream' (which see), then the
|
||||
current branch will be used as the starting point as usual, but
|
||||
the upstream of the starting-point may be used as the upstream
|
||||
of the new branch, instead of the starting-point itself.
|
||||
|
||||
If optional FROM is non-nil, then the source branch is reset
|
||||
to `FROM~', instead of to the last commit it shares with its
|
||||
upstream. Interactively, FROM is only ever non-nil, if the
|
||||
region selects some commits, and among those commits, FROM is
|
||||
the commit that is the fewest commits ahead of the source
|
||||
branch.
|
||||
|
||||
The commit at the other end of the selection actually does not
|
||||
matter, all commits between FROM and `HEAD' are moved to the new
|
||||
branch. If FROM is not reachable from `HEAD' or is reachable
|
||||
from the source branch's upstream, then an error is raised."
|
||||
(interactive (list (magit-read-string-ns "Spin off branch")
|
||||
(car (last (magit-region-values 'commit)))))
|
||||
(magit--branch-spinoff branch from t))
|
||||
|
||||
(defun magit--branch-spinoff (branch from checkout)
|
||||
(when (magit-branch-p branch)
|
||||
(user-error "Cannot spin off %s. It already exists" branch))
|
||||
(when (and (not checkout)
|
||||
(magit-anything-modified-p))
|
||||
(message "Staying on HEAD due to uncommitted changes")
|
||||
(setq checkout t))
|
||||
(if-let ((current (magit-get-current-branch)))
|
||||
(let ((tracked (magit-get-upstream-branch current))
|
||||
base)
|
||||
(when from
|
||||
(unless (magit-rev-ancestor-p from current)
|
||||
(user-error "Cannot spin off %s. %s is not reachable from %s"
|
||||
branch from current))
|
||||
(when (and tracked
|
||||
(magit-rev-ancestor-p from tracked))
|
||||
(user-error "Cannot spin off %s. %s is ancestor of upstream %s"
|
||||
branch from tracked)))
|
||||
(let ((magit-process-raise-error t))
|
||||
(if checkout
|
||||
(magit-call-git "checkout" "-b" branch current)
|
||||
(magit-call-git "branch" branch current)))
|
||||
(--when-let (magit-get-indirect-upstream-branch current)
|
||||
(magit-call-git "branch" "--set-upstream-to" it branch))
|
||||
(when (and tracked
|
||||
(setq base
|
||||
(if from
|
||||
(concat from "^")
|
||||
(magit-git-string "merge-base" current tracked)))
|
||||
(not (magit-rev-eq base current)))
|
||||
(if checkout
|
||||
(magit-call-git "update-ref" "-m"
|
||||
(format "reset: moving to %s" base)
|
||||
(concat "refs/heads/" current) base)
|
||||
(magit-call-git "reset" "--hard" base))))
|
||||
(if checkout
|
||||
(magit-call-git "checkout" "-b" branch)
|
||||
(magit-call-git "branch" branch)))
|
||||
(magit-refresh))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-branch-reset (branch to &optional set-upstream)
|
||||
"Reset a branch to the tip of another branch or any other commit.
|
||||
|
||||
When the branch being reset is the current branch, then do a
|
||||
hard reset. If there are any uncommitted changes, then the user
|
||||
has to confirm the reset because those changes would be lost.
|
||||
|
||||
This is useful when you have started work on a feature branch but
|
||||
realize it's all crap and want to start over.
|
||||
|
||||
When resetting to another branch and a prefix argument is used,
|
||||
then also set the target branch as the upstream of the branch
|
||||
that is being reset."
|
||||
(interactive
|
||||
(let* ((atpoint (magit-local-branch-at-point))
|
||||
(branch (magit-read-local-branch "Reset branch" atpoint)))
|
||||
(list branch
|
||||
(magit-completing-read (format "Reset %s to" branch)
|
||||
(delete branch (magit-list-branch-names))
|
||||
nil nil nil 'magit-revision-history
|
||||
(or (and (not (equal branch atpoint)) atpoint)
|
||||
(magit-get-upstream-branch branch)))
|
||||
current-prefix-arg)))
|
||||
(let ((magit-inhibit-refresh t))
|
||||
(if (equal branch (magit-get-current-branch))
|
||||
(if (and (magit-anything-modified-p)
|
||||
(not (yes-or-no-p
|
||||
"Uncommitted changes will be lost. Proceed? ")))
|
||||
(user-error "Abort")
|
||||
(magit-reset-hard to))
|
||||
(magit-call-git "update-ref"
|
||||
"-m" (format "reset: moving to %s" to)
|
||||
(magit-git-string "rev-parse" "--symbolic-full-name"
|
||||
branch)
|
||||
to))
|
||||
(when (and set-upstream (magit-branch-p to))
|
||||
(magit-set-upstream-branch branch to)
|
||||
(magit-branch-maybe-adjust-upstream branch to)))
|
||||
(magit-refresh))
|
||||
|
||||
(defvar magit-branch-delete-never-verify nil
|
||||
"Whether `magit-branch-delete' always pushes with \"--no-verify\".")
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-branch-delete (branches &optional force)
|
||||
"Delete one or multiple branches.
|
||||
If the region marks multiple branches, then offer to delete
|
||||
those, otherwise prompt for a single branch to be deleted,
|
||||
defaulting to the branch at point."
|
||||
;; One would expect this to be a command as simple as, for example,
|
||||
;; `magit-branch-rename'; but it turns out everyone wants to squeeze
|
||||
;; a bit of extra functionality into this one, including myself.
|
||||
(interactive
|
||||
(let ((branches (magit-region-values 'branch t))
|
||||
(force current-prefix-arg))
|
||||
(if (> (length branches) 1)
|
||||
(magit-confirm t nil "Delete %i branches" nil branches)
|
||||
(setq branches
|
||||
(list (magit-read-branch-prefer-other
|
||||
(if force "Force delete branch" "Delete branch")))))
|
||||
(unless force
|
||||
(when-let ((unmerged (-remove #'magit-branch-merged-p branches)))
|
||||
(if (magit-confirm 'delete-unmerged-branch
|
||||
"Delete unmerged branch %s"
|
||||
"Delete %i unmerged branches"
|
||||
'noabort unmerged)
|
||||
(setq force branches)
|
||||
(or (setq branches (-difference branches unmerged))
|
||||
(user-error "Abort")))))
|
||||
(list branches force)))
|
||||
(let* ((refs (mapcar #'magit-ref-fullname branches))
|
||||
(ambiguous (--remove it refs)))
|
||||
(when ambiguous
|
||||
(user-error
|
||||
"%s ambiguous. Please cleanup using git directly."
|
||||
(let ((len (length ambiguous)))
|
||||
(cond
|
||||
((= len 1)
|
||||
(format "%s is" (-first #'magit-ref-ambiguous-p branches)))
|
||||
((= len (length refs))
|
||||
(format "These %s names are" len))
|
||||
(t
|
||||
(format "%s of these names are" len))))))
|
||||
(cond
|
||||
((string-match "^refs/remotes/\\([^/]+\\)" (car refs))
|
||||
(let* ((remote (match-string 1 (car refs)))
|
||||
(offset (1+ (length remote))))
|
||||
(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)
|
||||
(mapc 'magit-branch-unset-pushRemote branches)
|
||||
(magit-run-git "branch" (if force "-D" "-d") branches))
|
||||
(t ; And now for something completely different.
|
||||
(let* ((branch (car branches))
|
||||
(prompt (format "Branch %s is checked out. " branch))
|
||||
(main (magit-main-branch)))
|
||||
(when (equal branch (magit-get-current-branch))
|
||||
(pcase (if (or (equal branch main)
|
||||
(not main))
|
||||
(magit-read-char-case prompt nil
|
||||
(?d "[d]etach HEAD & delete" 'detach)
|
||||
(?a "[a]bort" 'abort))
|
||||
(magit-read-char-case prompt nil
|
||||
(?d "[d]etach HEAD & delete" 'detach)
|
||||
(?c (format "[c]heckout %s & delete" main) 'main)
|
||||
(?a "[a]bort" 'abort)))
|
||||
(`detach (unless (or (equal force '(4))
|
||||
(member branch force)
|
||||
(magit-branch-merged-p branch t))
|
||||
(magit-confirm 'delete-unmerged-branch
|
||||
"Delete unmerged branch %s" ""
|
||||
nil (list branch)))
|
||||
(magit-call-git "checkout" "--detach"))
|
||||
(`main (unless (or (equal force '(4))
|
||||
(member branch force)
|
||||
(magit-branch-merged-p branch main))
|
||||
(magit-confirm 'delete-unmerged-branch
|
||||
"Delete unmerged branch %s" ""
|
||||
nil (list branch)))
|
||||
(magit-call-git "checkout" main))
|
||||
(`abort (user-error "Abort")))
|
||||
(setq force t))
|
||||
(magit-branch-maybe-delete-pr-remote branch)
|
||||
(magit-branch-unset-pushRemote branch)
|
||||
(magit-run-git "branch" (if force "-D" "-d") branch))))))
|
||||
|
||||
(put 'magit-branch-delete 'interactive-only t)
|
||||
|
||||
(defun magit-branch-maybe-delete-pr-remote (branch)
|
||||
(when-let ((remote (magit-get "branch" branch "pullRequestRemote")))
|
||||
(let* ((variable (format "remote.%s.fetch" remote))
|
||||
(refspecs (magit-get-all variable)))
|
||||
(unless (member (format "+refs/heads/*:refs/remotes/%s/*" remote)
|
||||
refspecs)
|
||||
(let ((refspec
|
||||
(if (equal (magit-get "branch" branch "pushRemote") remote)
|
||||
(format "+refs/heads/%s:refs/remotes/%s/%s"
|
||||
branch remote branch)
|
||||
(let ((merge (magit-get "branch" branch "merge")))
|
||||
(and merge
|
||||
(string-prefix-p "refs/heads/" merge)
|
||||
(setq merge (substring merge 11))
|
||||
(format "+refs/heads/%s:refs/remotes/%s/%s"
|
||||
merge remote merge))))))
|
||||
(when (member refspec refspecs)
|
||||
(if (and (= (length refspecs) 1)
|
||||
(magit-confirm 'delete-pr-remote
|
||||
(format "Also delete remote %s (%s)" remote
|
||||
"no pull-request branch remains")
|
||||
nil t))
|
||||
(magit-call-git "remote" "rm" remote)
|
||||
(magit-call-git "config" "--unset-all" variable
|
||||
(format "^%s$" (regexp-quote refspec))))))))))
|
||||
|
||||
(defun magit-branch-unset-pushRemote (branch)
|
||||
(magit-set nil "branch" branch "pushRemote"))
|
||||
|
||||
(defun magit-delete-remote-branch-sentinel (remote refs process event)
|
||||
(when (memq (process-status process) '(exit signal))
|
||||
(if (= (process-exit-status process) 1)
|
||||
(if-let ((on-remote (--map (concat "refs/remotes/" remote "/" it)
|
||||
(magit-remote-list-branches remote)))
|
||||
(rest (--filter (and (not (member it on-remote))
|
||||
(magit-ref-exists-p it))
|
||||
refs)))
|
||||
(progn
|
||||
(process-put process 'inhibit-refresh t)
|
||||
(magit-process-sentinel process event)
|
||||
(setq magit-this-error nil)
|
||||
(message "Some remote branches no longer exist. %s"
|
||||
"Deleting just the local tracking refs instead...")
|
||||
(dolist (ref rest)
|
||||
(magit-call-git "update-ref" "-d" ref))
|
||||
(magit-refresh)
|
||||
(message "Deleting local remote-tracking refs...done"))
|
||||
(magit-process-sentinel process event))
|
||||
(magit-process-sentinel process event))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-branch-rename (old new &optional force)
|
||||
"Rename the branch named OLD to NEW.
|
||||
|
||||
With a prefix argument FORCE, rename even if a branch named NEW
|
||||
already exists.
|
||||
|
||||
If `branch.OLD.pushRemote' is set, then unset it. Depending on
|
||||
the value of `magit-branch-rename-push-target' (which see) maybe
|
||||
set `branch.NEW.pushRemote' and maybe rename the push-target on
|
||||
the remote."
|
||||
(interactive
|
||||
(let ((branch (magit-read-local-branch "Rename branch")))
|
||||
(list branch
|
||||
(magit-read-string-ns (format "Rename branch '%s' to" branch)
|
||||
nil 'magit-revision-history)
|
||||
current-prefix-arg)))
|
||||
(when (string-match "\\`heads/\\(.+\\)" old)
|
||||
(setq old (match-string 1 old)))
|
||||
(when (equal old new)
|
||||
(user-error "Old and new branch names are the same"))
|
||||
(magit-call-git "branch" (if force "-M" "-m") old new)
|
||||
(when magit-branch-rename-push-target
|
||||
(let ((remote (magit-get-push-remote old))
|
||||
(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-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))
|
||||
(or (not (memq magit-branch-rename-push-target
|
||||
'(forge-only github-only)))
|
||||
(and (require (quote forge) nil t)
|
||||
(fboundp 'forge--forge-remote-p)
|
||||
(forge--forge-remote-p remote))))
|
||||
(let ((old-target (magit-get-push-branch old t))
|
||||
(new-target (magit-get-push-branch new t))
|
||||
(remote (magit-get-push-remote new)))
|
||||
(when (and old-target
|
||||
(not new-target)
|
||||
(magit-y-or-n-p (format "Also rename %S to %S on \"%s\""
|
||||
old new remote)))
|
||||
;; Rename on (i.e. within) the remote, but only if the
|
||||
;; destination ref doesn't exist yet. If that ref already
|
||||
;; exists, then it probably is of some value and we better
|
||||
;; not touch it. Ignore what the local ref points at,
|
||||
;; i.e. if the local and the remote ref didn't point at
|
||||
;; the same commit before the rename then keep it that way.
|
||||
(magit-call-git "push" "-v" remote
|
||||
(format "%s:refs/heads/%s" old-target new)
|
||||
(format ":refs/heads/%s" old)))))))
|
||||
(magit-branch-unset-pushRemote old)
|
||||
(magit-refresh))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-branch-shelve (branch)
|
||||
"Shelve a BRANCH.
|
||||
Rename \"refs/heads/BRANCH\" to \"refs/shelved/BRANCH\",
|
||||
and also rename the respective reflog file."
|
||||
(interactive (list (magit-read-other-local-branch "Shelve branch")))
|
||||
(let ((old (concat "refs/heads/" branch))
|
||||
(new (concat "refs/shelved/" branch)))
|
||||
(magit-git "update-ref" new old "")
|
||||
(magit--rename-reflog-file old new)
|
||||
(magit-branch-unset-pushRemote branch)
|
||||
(magit-run-git "branch" "-D" branch)))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-branch-unshelve (branch)
|
||||
"Unshelve a BRANCH
|
||||
Rename \"refs/shelved/BRANCH\" to \"refs/heads/BRANCH\",
|
||||
and also rename the respective reflog file."
|
||||
(interactive
|
||||
(list (magit-completing-read
|
||||
"Unshelve branch"
|
||||
(--map (substring it 8)
|
||||
(magit-list-refnames "refs/shelved"))
|
||||
nil t)))
|
||||
(let ((old (concat "refs/shelved/" branch))
|
||||
(new (concat "refs/heads/" branch)))
|
||||
(magit-git "update-ref" new old "")
|
||||
(magit--rename-reflog-file old new)
|
||||
(magit-run-git "update-ref" "-d" old)))
|
||||
|
||||
(defun magit--rename-reflog-file (old new)
|
||||
(let ((old (magit-git-dir (concat "logs/" old)))
|
||||
(new (magit-git-dir (concat "logs/" new))))
|
||||
(when (file-exists-p old)
|
||||
(make-directory (file-name-directory new) t)
|
||||
(rename-file old new t))))
|
||||
|
||||
;;; Configure
|
||||
|
||||
;;;###autoload (autoload 'magit-branch-configure "magit-branch" nil t)
|
||||
(transient-define-prefix magit-branch-configure (branch)
|
||||
"Configure a branch."
|
||||
:man-page "git-branch"
|
||||
[:description
|
||||
(lambda ()
|
||||
(concat
|
||||
(propertize "Configure " 'face 'transient-heading)
|
||||
(propertize (oref transient--prefix scope) 'face 'magit-branch-local)))
|
||||
("d" magit-branch.<branch>.description)
|
||||
("u" magit-branch.<branch>.merge/remote)
|
||||
("r" magit-branch.<branch>.rebase)
|
||||
("p" magit-branch.<branch>.pushRemote)]
|
||||
["Configure repository defaults"
|
||||
("R" magit-pull.rebase)
|
||||
("P" magit-remote.pushDefault)]
|
||||
["Configure branch creation"
|
||||
("a m" magit-branch.autoSetupMerge)
|
||||
("a r" magit-branch.autoSetupRebase)]
|
||||
(interactive
|
||||
(list (or (and (not current-prefix-arg)
|
||||
(not (and magit-branch-direct-configure
|
||||
(eq transient-current-command 'magit-branch)))
|
||||
(magit-get-current-branch))
|
||||
(magit--read-branch-scope))))
|
||||
(transient-setup 'magit-branch-configure nil nil :scope branch))
|
||||
|
||||
(defun magit--read-branch-scope (&optional obj)
|
||||
(magit-read-local-branch
|
||||
(if obj
|
||||
(format "Set %s for branch"
|
||||
(format (oref obj variable) "<name>"))
|
||||
"Configure branch")))
|
||||
|
||||
(transient-define-suffix magit-branch.<branch>.description (branch)
|
||||
"Edit the description of BRANCH."
|
||||
:class 'magit--git-variable
|
||||
:transient nil
|
||||
:variable "branch.%s.description"
|
||||
(interactive (list (oref transient-current-prefix scope)))
|
||||
(magit-run-git-with-editor "branch" "--edit-description" branch))
|
||||
|
||||
(add-hook 'find-file-hook 'magit-branch-description-check-buffers)
|
||||
|
||||
(defun magit-branch-description-check-buffers ()
|
||||
(and buffer-file-name
|
||||
(string-match-p "/\\(BRANCH\\|EDIT\\)_DESCRIPTION\\'" buffer-file-name)))
|
||||
|
||||
(defclass magit--git-branch:upstream (magit--git-variable)
|
||||
((format :initform " %k %m %M\n %r %R")))
|
||||
|
||||
(transient-define-infix magit-branch.<branch>.merge/remote ()
|
||||
:class 'magit--git-branch:upstream)
|
||||
|
||||
(cl-defmethod transient-init-value ((obj magit--git-branch:upstream))
|
||||
(when-let ((branch (oref transient--prefix scope))
|
||||
(remote (magit-get "branch" branch "remote"))
|
||||
(merge (magit-get "branch" branch "merge")))
|
||||
(oset obj value (list remote merge))))
|
||||
|
||||
(cl-defmethod transient-infix-read ((obj magit--git-branch:upstream))
|
||||
(if (oref obj value)
|
||||
(oset obj value nil)
|
||||
(magit-read-upstream-branch (oref transient--prefix scope) "Upstream")))
|
||||
|
||||
(cl-defmethod transient-infix-set ((obj magit--git-branch:upstream) refname)
|
||||
(magit-set-upstream-branch (oref transient--prefix scope) refname)
|
||||
(oset obj value
|
||||
(let ((branch (oref transient--prefix scope)))
|
||||
(when-let ((r (magit-get "branch" branch "remote"))
|
||||
(m (magit-get "branch" branch "merge")))
|
||||
(list r m))))
|
||||
(magit-refresh))
|
||||
|
||||
(cl-defmethod transient-format ((obj magit--git-branch:upstream))
|
||||
(let ((branch (oref transient--prefix scope)))
|
||||
(format-spec
|
||||
(oref obj format)
|
||||
`((?k . ,(transient-format-key obj))
|
||||
(?r . ,(format "branch.%s.remote" branch))
|
||||
(?m . ,(format "branch.%s.merge" branch))
|
||||
(?R . ,(transient-format-value obj #'car))
|
||||
(?M . ,(transient-format-value obj #'cadr))))))
|
||||
|
||||
(cl-defmethod transient-format-value ((obj magit--git-branch:upstream) key)
|
||||
(if-let ((value (funcall key (oref obj value))))
|
||||
(propertize value 'face 'transient-argument)
|
||||
(propertize "unset" 'face 'transient-inactive-argument)))
|
||||
|
||||
(transient-define-infix magit-branch.<branch>.rebase ()
|
||||
:class 'magit--git-variable:choices
|
||||
:scope 'magit--read-branch-scope
|
||||
:variable "branch.%s.rebase"
|
||||
:fallback "pull.rebase"
|
||||
:choices '("true" "false")
|
||||
:default "false")
|
||||
|
||||
(transient-define-infix magit-branch.<branch>.pushRemote ()
|
||||
:class 'magit--git-variable:choices
|
||||
:scope 'magit--read-branch-scope
|
||||
:variable "branch.%s.pushRemote"
|
||||
:fallback "remote.pushDefault"
|
||||
:choices 'magit-list-remotes)
|
||||
|
||||
(transient-define-infix magit-pull.rebase ()
|
||||
:class 'magit--git-variable:choices
|
||||
:variable "pull.rebase"
|
||||
:choices '("true" "false")
|
||||
:default "false")
|
||||
|
||||
(transient-define-infix magit-remote.pushDefault ()
|
||||
:class 'magit--git-variable:choices
|
||||
:variable "remote.pushDefault"
|
||||
:choices 'magit-list-remotes)
|
||||
|
||||
(transient-define-infix magit-branch.autoSetupMerge ()
|
||||
:class 'magit--git-variable:choices
|
||||
:variable "branch.autoSetupMerge"
|
||||
:choices '("always" "true" "false")
|
||||
:default "true")
|
||||
|
||||
(transient-define-infix magit-branch.autoSetupRebase ()
|
||||
:class 'magit--git-variable:choices
|
||||
:variable "branch.autoSetupRebase"
|
||||
:choices '("always" "local" "remote" "never")
|
||||
:default "never")
|
||||
|
||||
;;; _
|
||||
(provide 'magit-branch)
|
||||
;;; magit-branch.el ends here
|
BIN
elpa/magit-20210414.1306/magit-branch.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-branch.elc
Normal file
Binary file not shown.
286
elpa/magit-20210414.1306/magit-clone.el
Normal file
286
elpa/magit-20210414.1306/magit-clone.el
Normal file
|
@ -0,0 +1,286 @@
|
|||
;;; magit-clone.el --- clone a repository -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2008-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
|
||||
;; Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
;; Magit is free software; you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
;;
|
||||
;; Magit is distributed in the hope that it will be useful, but WITHOUT
|
||||
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
;; License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Magit. If not, see http://www.gnu.org/licenses.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; This library implements clone commands.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'magit)
|
||||
|
||||
;;; Options
|
||||
|
||||
(defcustom magit-clone-set-remote-head nil
|
||||
"Whether cloning creates the symbolic-ref `<remote>/HEAD'."
|
||||
:package-version '(magit . "2.4.2")
|
||||
:group 'magit-commands
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom magit-clone-set-remote.pushDefault 'ask
|
||||
"Whether to set the value of `remote.pushDefault' after cloning.
|
||||
|
||||
If t, then set without asking. If nil, then don't set. If
|
||||
`ask', then ask."
|
||||
:package-version '(magit . "2.4.0")
|
||||
:group 'magit-commands
|
||||
:type '(choice (const :tag "set" t)
|
||||
(const :tag "ask" ask)
|
||||
(const :tag "don't set" nil)))
|
||||
|
||||
(defcustom magit-clone-default-directory nil
|
||||
"Default directory to use when `magit-clone' reads destination.
|
||||
If nil (the default), then use the value of `default-directory'.
|
||||
If a directory, then use that. If a function, then call that
|
||||
with the remote url as only argument and use the returned value."
|
||||
:package-version '(magit . "2.90.0")
|
||||
:group 'magit-commands
|
||||
:type '(choice (const :tag "value of default-directory")
|
||||
(directory :tag "constant directory")
|
||||
(function :tag "function's value")))
|
||||
|
||||
(defcustom magit-clone-always-transient nil
|
||||
"Whether `magit-clone' always acts as a transient prefix command.
|
||||
If nil, then a prefix argument has to be used to show the transient
|
||||
popup instead of invoking the default suffix `magit-clone-regular'
|
||||
directly."
|
||||
:package-version '(magit . "3.0.0")
|
||||
:group 'magit-commands
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom magit-clone-name-alist
|
||||
'(("\\`\\(?:github:\\|gh:\\)?\\([^:]+\\)\\'" "github.com" "github.user")
|
||||
("\\`\\(?:gitlab:\\|gl:\\)\\([^:]+\\)\\'" "gitlab.com" "gitlab.user"))
|
||||
"Alist mapping repository names to repository urls.
|
||||
|
||||
Each element has the form (REGEXP HOSTNAME USER). When the user
|
||||
enters a name when a cloning command asks for a name or url, then
|
||||
that is looked up in this list. The first element whose REGEXP
|
||||
matches is used.
|
||||
|
||||
The format specified by option `magit-clone-url-format' is used
|
||||
to turn the name into an url, using HOSTNAME and the repository
|
||||
name. If the provided name contains a slash, then that is used.
|
||||
Otherwise if the name omits the owner of the repository, then the
|
||||
default user specified in the matched entry is used.
|
||||
|
||||
If USER contains a dot, then it is treated as a Git variable and
|
||||
the value of that is used as the username. Otherwise it is used
|
||||
as the username itself."
|
||||
:package-version '(magit . "3.0.0")
|
||||
:group 'magit-commands
|
||||
:type '(repeat (list regexp
|
||||
(string :tag "hostname")
|
||||
(string :tag "user name or git variable"))))
|
||||
|
||||
(defcustom magit-clone-url-format "git@%h:%n.git"
|
||||
"Format used when turning repository names into urls.
|
||||
%h is the hostname and %n is the repository name, including
|
||||
the name of the owner. Also see `magit-clone-name-alist'."
|
||||
:package-version '(magit . "3.0.0")
|
||||
:group 'magit-commands
|
||||
:type 'regexp)
|
||||
|
||||
;;; Commands
|
||||
|
||||
;;;###autoload (autoload 'magit-clone "magit-clone" nil t)
|
||||
(transient-define-prefix magit-clone (&optional transient)
|
||||
"Clone a repository."
|
||||
:man-page "git-clone"
|
||||
["Fetch arguments"
|
||||
("-B" "Clone a single branch" "--single-branch")
|
||||
("-n" "Do not clone tags" "--no-tags")
|
||||
("-S" "Clones submodules" "--recurse-submodules" :level 6)
|
||||
("-l" "Do not optimize" "--no-local" :level 7)]
|
||||
["Setup arguments"
|
||||
("-o" "Set name of remote" ("-o" "--origin="))
|
||||
("-b" "Set HEAD branch" ("-b" "--branch="))
|
||||
("-g" "Separate git directory" "--separate-git-dir="
|
||||
transient-read-directory :level 7)
|
||||
("-t" "Use template directory" "--template="
|
||||
transient-read-existing-directory :level 6)]
|
||||
["Local sharing arguments"
|
||||
("-s" "Share objects" ("-s" "--shared" :level 7))
|
||||
("-h" "Do not use hardlinks" "--no-hardlinks")]
|
||||
["Clone"
|
||||
("C" "regular" magit-clone-regular)
|
||||
("s" "shallow" magit-clone-shallow)
|
||||
("d" "shallow since date" magit-clone-shallow-since :level 7)
|
||||
("e" "shallow excluding" magit-clone-shallow-exclude :level 7)
|
||||
("b" "bare" magit-clone-bare)
|
||||
("m" "mirror" magit-clone-mirror)]
|
||||
(interactive (list (or magit-clone-always-transient current-prefix-arg)))
|
||||
(if transient
|
||||
(transient-setup #'magit-clone)
|
||||
(call-interactively #'magit-clone-regular)))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-clone-regular (repository directory args)
|
||||
"Create a clone of REPOSITORY in DIRECTORY.
|
||||
Then show the status buffer for the new repository."
|
||||
(interactive (magit-clone-read-args))
|
||||
(magit-clone-internal repository directory args))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-clone-shallow (repository directory args depth)
|
||||
"Create a shallow clone of REPOSITORY in DIRECTORY.
|
||||
Then show the status buffer for the new repository.
|
||||
With a prefix argument read the DEPTH of the clone;
|
||||
otherwise use 1."
|
||||
(interactive (append (magit-clone-read-args)
|
||||
(list (if current-prefix-arg
|
||||
(read-number "Depth: " 1)
|
||||
1))))
|
||||
(magit-clone-internal repository directory
|
||||
(cons (format "--depth=%s" depth) args)))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-clone-shallow-since (repository directory args date)
|
||||
"Create a shallow clone of REPOSITORY in DIRECTORY.
|
||||
Then show the status buffer for the new repository.
|
||||
Exclude commits before DATE, which is read from the
|
||||
user."
|
||||
(interactive (append (magit-clone-read-args)
|
||||
(list (transient-read-date "Exclude commits before: "
|
||||
nil nil))))
|
||||
(magit-clone-internal repository directory
|
||||
(cons (format "--shallow-since=%s" date) args)))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-clone-shallow-exclude (repository directory args exclude)
|
||||
"Create a shallow clone of REPOSITORY in DIRECTORY.
|
||||
Then show the status buffer for the new repository.
|
||||
Exclude commits reachable from EXCLUDE, which is a
|
||||
branch or tag read from the user."
|
||||
(interactive (append (magit-clone-read-args)
|
||||
(list (read-string "Exclude commits reachable from: "))))
|
||||
(magit-clone-internal repository directory
|
||||
(cons (format "--shallow-exclude=%s" exclude) args)))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-clone-bare (repository directory args)
|
||||
"Create a bare clone of REPOSITORY in DIRECTORY.
|
||||
Then show the status buffer for the new repository."
|
||||
(interactive (magit-clone-read-args))
|
||||
(magit-clone-internal repository directory (cons "--bare" args)))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-clone-mirror (repository directory args)
|
||||
"Create a mirror of REPOSITORY in DIRECTORY.
|
||||
Then show the status buffer for the new repository."
|
||||
(interactive (magit-clone-read-args))
|
||||
(magit-clone-internal repository directory (cons "--mirror" args)))
|
||||
|
||||
(defun magit-clone-internal (repository directory args)
|
||||
(let* ((checkout (not (memq (car args) '("--bare" "--mirror"))))
|
||||
(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\"? "))))))
|
||||
(run-hooks 'magit-credential-hook)
|
||||
(setq directory (file-name-as-directory (expand-file-name directory)))
|
||||
(when (file-exists-p directory)
|
||||
(if (file-directory-p directory)
|
||||
(when (> (length (directory-files directory)) 2)
|
||||
(let ((name (magit-clone--url-to-name repository)))
|
||||
(unless (and name
|
||||
(setq directory (file-name-as-directory
|
||||
(expand-file-name name directory)))
|
||||
(not (file-exists-p directory)))
|
||||
(user-error "%s already exists" directory))))
|
||||
(user-error "%s already exists and is not a directory" directory)))
|
||||
(magit-run-git-async "clone" args "--" repository
|
||||
(magit-convert-filename-for-git directory))
|
||||
;; Don't refresh the buffer we're calling from.
|
||||
(process-put magit-this-process 'inhibit-refresh t)
|
||||
(set-process-sentinel
|
||||
magit-this-process
|
||||
(lambda (process event)
|
||||
(when (memq (process-status process) '(exit signal))
|
||||
(let ((magit-process-raise-error t))
|
||||
(magit-process-sentinel process event)))
|
||||
(when (and (eq (process-status process) 'exit)
|
||||
(= (process-exit-status process) 0))
|
||||
(when checkout
|
||||
(let ((default-directory directory))
|
||||
(when set-push-default
|
||||
(setf (magit-get "remote.pushDefault") "origin"))
|
||||
(unless magit-clone-set-remote-head
|
||||
(magit-remote-unset-head "origin"))))
|
||||
(with-current-buffer (process-get process 'command-buf)
|
||||
(magit-status-setup-buffer directory)))))))
|
||||
|
||||
(defun magit-clone-read-args ()
|
||||
(let ((repo (magit-clone-read-repository)))
|
||||
(list repo
|
||||
(read-directory-name
|
||||
"Clone to: "
|
||||
(if (functionp magit-clone-default-directory)
|
||||
(funcall magit-clone-default-directory repo)
|
||||
magit-clone-default-directory)
|
||||
nil nil
|
||||
(magit-clone--url-to-name repo))
|
||||
(transient-args 'magit-clone))))
|
||||
|
||||
(defun magit-clone-read-repository ()
|
||||
(magit-read-char-case "Clone from " nil
|
||||
(?u "[u]rl or name"
|
||||
(let ((str (magit-read-string-ns "Clone from url or name")))
|
||||
(if (string-match-p "\\(://\\|@\\)" str)
|
||||
str
|
||||
(magit-clone--name-to-url str))))
|
||||
(?p "[p]ath"
|
||||
(read-directory-name "Clone repository: "))
|
||||
(?l "or [l]ocal url"
|
||||
(concat "file://" (read-directory-name "Clone repository: file://")))))
|
||||
|
||||
(defun magit-clone--url-to-name (url)
|
||||
(and (string-match "\\([^/:]+?\\)\\(/?\\.git\\)?$" url)
|
||||
(match-string 1 url)))
|
||||
|
||||
(defun magit-clone--name-to-url (name)
|
||||
(or (seq-some
|
||||
(pcase-lambda (`(,re ,host ,user))
|
||||
(and (string-match re name)
|
||||
(let ((repo (match-string 1 name)))
|
||||
(magit-clone--format-url host user repo))))
|
||||
magit-clone-name-alist)
|
||||
(user-error "Not an url and no matching entry in `%s'"
|
||||
'magit-clone-name-alist)))
|
||||
|
||||
(defun magit-clone--format-url (host user repo)
|
||||
(format-spec
|
||||
magit-clone-url-format
|
||||
`((?h . ,host)
|
||||
(?n . ,(if (string-match-p "/" repo)
|
||||
repo
|
||||
(if (string-match-p "\\." user)
|
||||
(if-let ((user (magit-get user)))
|
||||
(concat user "/" repo)
|
||||
(user-error "Set %S or specify owner explicitly" user))
|
||||
(concat user "/" repo)))))))
|
||||
|
||||
;;; _
|
||||
(provide 'magit-clone)
|
||||
;;; magit-clone.el ends here
|
BIN
elpa/magit-20210414.1306/magit-clone.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-clone.elc
Normal file
Binary file not shown.
668
elpa/magit-20210414.1306/magit-commit.el
Normal file
668
elpa/magit-20210414.1306/magit-commit.el
Normal file
|
@ -0,0 +1,668 @@
|
|||
;;; magit-commit.el --- create Git commits -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2008-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
|
||||
;; Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
;; Magit is free software; you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
;;
|
||||
;; Magit is distributed in the hope that it will be useful, but WITHOUT
|
||||
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
;; License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Magit. If not, see http://www.gnu.org/licenses.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; This library implements commands for creating Git commits. These
|
||||
;; commands just initiate the commit, support for writing the commit
|
||||
;; messages is implemented in `git-commit.el'.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'magit)
|
||||
(require 'magit-sequence)
|
||||
|
||||
(eval-when-compile (require 'epa)) ; for `epa-protocol'
|
||||
(eval-when-compile (require 'epg))
|
||||
|
||||
;;; Options
|
||||
|
||||
(defcustom magit-commit-ask-to-stage 'verbose
|
||||
"Whether to ask to stage everything when committing and nothing is staged."
|
||||
:package-version '(magit . "2.3.0")
|
||||
:group 'magit-commands
|
||||
:type '(choice (const :tag "Ask" t)
|
||||
(const :tag "Ask showing diff" verbose)
|
||||
(const :tag "Stage without confirmation" stage)
|
||||
(const :tag "Don't ask" nil)))
|
||||
|
||||
(defcustom magit-commit-show-diff t
|
||||
"Whether the relevant diff is automatically shown when committing."
|
||||
:package-version '(magit . "2.3.0")
|
||||
:group 'magit-commands
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom magit-commit-extend-override-date t
|
||||
"Whether using `magit-commit-extend' changes the committer date."
|
||||
:package-version '(magit . "2.3.0")
|
||||
:group 'magit-commands
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom magit-commit-reword-override-date t
|
||||
"Whether using `magit-commit-reword' changes the committer date."
|
||||
:package-version '(magit . "2.3.0")
|
||||
:group 'magit-commands
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom magit-commit-squash-confirm t
|
||||
"Whether the commit targeted by squash and fixup has to be confirmed.
|
||||
When non-nil then the commit at point (if any) is used as default
|
||||
choice, otherwise it has to be confirmed. This option only
|
||||
affects `magit-commit-squash' and `magit-commit-fixup'. The
|
||||
\"instant\" variants always require confirmation because making
|
||||
an error while using those is harder to recover from."
|
||||
:package-version '(magit . "2.1.0")
|
||||
:group 'magit-commands
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom magit-post-commit-hook nil
|
||||
"Hook run after creating a commit without the user editing a message.
|
||||
|
||||
This hook is run by `magit-refresh' if `this-command' is a member
|
||||
of `magit-post-stage-hook-commands'. This only includes commands
|
||||
named `magit-commit-*' that do *not* require that the user edits
|
||||
the commit message in a buffer and then finishes by pressing
|
||||
\\<with-editor-mode-map>\\[with-editor-finish].
|
||||
|
||||
Also see `git-commit-post-finish-hook'."
|
||||
:package-version '(magit . "2.90.0")
|
||||
:group 'magit-commands
|
||||
:type 'hook)
|
||||
|
||||
(defvar magit-post-commit-hook-commands
|
||||
'(magit-commit-extend
|
||||
magit-commit-fixup
|
||||
magit-commit-augment
|
||||
magit-commit-instant-fixup
|
||||
magit-commit-instant-squash))
|
||||
|
||||
;;; Popup
|
||||
|
||||
;;;###autoload (autoload 'magit-commit "magit-commit" nil t)
|
||||
(transient-define-prefix magit-commit ()
|
||||
"Create a new commit or replace an existing commit."
|
||||
:info-manual "(magit)Initiating a Commit"
|
||||
:man-page "git-commit"
|
||||
["Arguments"
|
||||
("-a" "Stage all modified and deleted files" ("-a" "--all"))
|
||||
("-e" "Allow empty commit" "--allow-empty")
|
||||
("-v" "Show diff of changes to be committed" ("-v" "--verbose"))
|
||||
("-n" "Disable hooks" ("-n" "--no-verify"))
|
||||
("-R" "Claim authorship and reset author date" "--reset-author")
|
||||
(magit:--author :description "Override the author")
|
||||
(7 "-D" "Override the author date" "--date=" transient-read-date)
|
||||
("-s" "Add Signed-off-by line" ("-s" "--signoff"))
|
||||
(5 magit:--gpg-sign)
|
||||
(magit-commit:--reuse-message)]
|
||||
[["Create"
|
||||
("c" "Commit" magit-commit-create)]
|
||||
["Edit HEAD"
|
||||
("e" "Extend" magit-commit-extend)
|
||||
("w" "Reword" magit-commit-reword)
|
||||
("a" "Amend" magit-commit-amend)
|
||||
(6 "n" "Reshelve" magit-commit-reshelve)]
|
||||
["Edit"
|
||||
("f" "Fixup" magit-commit-fixup)
|
||||
("s" "Squash" magit-commit-squash)
|
||||
("A" "Augment" magit-commit-augment)
|
||||
(6 "x" "Absorb changes" magit-commit-autofixup)
|
||||
(6 "X" "Absorb modules" magit-commit-absorb-modules)]
|
||||
[""
|
||||
("F" "Instant fixup" magit-commit-instant-fixup)
|
||||
("S" "Instant squash" magit-commit-instant-squash)]]
|
||||
(interactive)
|
||||
(if-let ((buffer (magit-commit-message-buffer)))
|
||||
(switch-to-buffer buffer)
|
||||
(transient-setup 'magit-commit)))
|
||||
|
||||
(defun magit-commit-arguments nil
|
||||
(transient-args 'magit-commit))
|
||||
|
||||
(transient-define-argument magit:--gpg-sign ()
|
||||
:description "Sign using gpg"
|
||||
:class 'transient-option
|
||||
:shortarg "-S"
|
||||
:argument "--gpg-sign="
|
||||
:allow-empty t
|
||||
:reader 'magit-read-gpg-signing-key)
|
||||
|
||||
(defvar magit-gpg-secret-key-hist nil)
|
||||
|
||||
(defun magit-read-gpg-secret-key
|
||||
(prompt &optional initial-input history predicate)
|
||||
(require 'epa)
|
||||
(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
|
||||
:shortarg "-C"
|
||||
:argument "--reuse-message="
|
||||
:reader 'magit-read-reuse-message
|
||||
:history-key 'magit-revision-history)
|
||||
|
||||
(defun magit-read-reuse-message (prompt &optional default history)
|
||||
(magit-completing-read prompt (magit-list-refnames)
|
||||
nil nil nil history
|
||||
(or default
|
||||
(and (magit-rev-verify "ORIG_HEAD")
|
||||
"ORIG_HEAD"))))
|
||||
|
||||
;;; Commands
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-commit-create (&optional args)
|
||||
"Create a new commit on `HEAD'.
|
||||
With a prefix argument, amend to the commit at `HEAD' instead.
|
||||
\n(git commit [--amend] ARGS)"
|
||||
(interactive (if current-prefix-arg
|
||||
(list (cons "--amend" (magit-commit-arguments)))
|
||||
(list (magit-commit-arguments))))
|
||||
(when (member "--all" args)
|
||||
(setq this-command 'magit-commit-all))
|
||||
(when (setq args (magit-commit-assert args))
|
||||
(let ((default-directory (magit-toplevel)))
|
||||
(magit-run-git-with-editor "commit" args))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-commit-amend (&optional args)
|
||||
"Amend the last commit.
|
||||
\n(git commit --amend ARGS)"
|
||||
(interactive (list (magit-commit-arguments)))
|
||||
(magit-commit-amend-assert)
|
||||
(magit-run-git-with-editor "commit" "--amend" args))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-commit-extend (&optional args override-date)
|
||||
"Amend the last commit, without editing the message.
|
||||
|
||||
With a prefix argument keep the committer date, otherwise change
|
||||
it. The option `magit-commit-extend-override-date' can be used
|
||||
to inverse the meaning of the prefix argument. \n(git commit
|
||||
--amend --no-edit)"
|
||||
(interactive (list (magit-commit-arguments)
|
||||
(if current-prefix-arg
|
||||
(not magit-commit-extend-override-date)
|
||||
magit-commit-extend-override-date)))
|
||||
(when (setq args (magit-commit-assert args))
|
||||
(magit-commit-amend-assert)
|
||||
(let ((process-environment process-environment))
|
||||
(unless override-date
|
||||
(push (magit-rev-format "GIT_COMMITTER_DATE=%cD") process-environment))
|
||||
(magit-run-git-with-editor "commit" "--amend" "--no-edit" args))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-commit-reword (&optional args override-date)
|
||||
"Reword the last commit, ignoring staged changes.
|
||||
|
||||
With a prefix argument keep the committer date, otherwise change
|
||||
it. The option `magit-commit-reword-override-date' can be used
|
||||
to inverse the meaning of the prefix argument.
|
||||
|
||||
Non-interactively respect the optional OVERRIDE-DATE argument
|
||||
and ignore the option.
|
||||
\n(git commit --amend --only)"
|
||||
(interactive (list (magit-commit-arguments)
|
||||
(if current-prefix-arg
|
||||
(not magit-commit-reword-override-date)
|
||||
magit-commit-reword-override-date)))
|
||||
(magit-commit-amend-assert)
|
||||
(let ((process-environment process-environment))
|
||||
(unless override-date
|
||||
(push (magit-rev-format "GIT_COMMITTER_DATE=%cD") process-environment))
|
||||
(cl-pushnew "--allow-empty" args :test #'equal)
|
||||
(magit-run-git-with-editor "commit" "--amend" "--only" args)))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-commit-fixup (&optional commit args)
|
||||
"Create a fixup commit.
|
||||
|
||||
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'."
|
||||
(interactive (list (magit-commit-at-point)
|
||||
(magit-commit-arguments)))
|
||||
(magit-commit-squash-internal "--fixup" commit args))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-commit-squash (&optional commit args)
|
||||
"Create a squash commit, without editing the squash message.
|
||||
|
||||
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'."
|
||||
(interactive (list (magit-commit-at-point)
|
||||
(magit-commit-arguments)))
|
||||
(magit-commit-squash-internal "--squash" commit args))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-commit-augment (&optional commit args)
|
||||
"Create a squash commit, editing the squash message.
|
||||
|
||||
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'."
|
||||
(interactive (list (magit-commit-at-point)
|
||||
(magit-commit-arguments)))
|
||||
(magit-commit-squash-internal "--squash" commit args nil t))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-commit-instant-fixup (&optional commit args)
|
||||
"Create a fixup commit targeting COMMIT and instantly rebase."
|
||||
(interactive (list (magit-commit-at-point)
|
||||
(magit-commit-arguments)))
|
||||
(magit-commit-squash-internal "--fixup" commit args t))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-commit-instant-squash (&optional commit args)
|
||||
"Create a squash commit targeting COMMIT and instantly rebase."
|
||||
(interactive (list (magit-commit-at-point)
|
||||
(magit-commit-arguments)))
|
||||
(magit-commit-squash-internal "--squash" commit args t))
|
||||
|
||||
(defun magit-commit-squash-internal
|
||||
(option commit &optional args rebase edit confirmed)
|
||||
(when-let ((args (magit-commit-assert args t)))
|
||||
(when commit
|
||||
(when (and rebase (not (magit-rev-ancestor-p commit "HEAD")))
|
||||
(magit-read-char-case
|
||||
(format "%s isn't an ancestor of HEAD. " commit) nil
|
||||
(?c "[c]reate without rebasing" (setq rebase nil))
|
||||
(?s "[s]elect other" (setq commit nil))
|
||||
(?a "[a]bort" (user-error "Quit")))))
|
||||
(when commit
|
||||
(setq commit (magit-rebase-interactive-assert commit t)))
|
||||
(if (and commit
|
||||
(or confirmed
|
||||
(not (or rebase
|
||||
current-prefix-arg
|
||||
magit-commit-squash-confirm))))
|
||||
(let ((magit-commit-show-diff nil))
|
||||
(push (concat option "=" commit) args)
|
||||
(unless edit
|
||||
(push "--no-edit" args))
|
||||
(if rebase
|
||||
(magit-with-editor
|
||||
(magit-call-git
|
||||
"commit" "--no-gpg-sign"
|
||||
(-remove-first
|
||||
(apply-partially #'string-match-p "\\`--gpg-sign=")
|
||||
args)))
|
||||
(magit-run-git-with-editor "commit" args))
|
||||
t) ; The commit was created; used by below lambda.
|
||||
(magit-log-select
|
||||
(lambda (commit)
|
||||
(when (and (magit-commit-squash-internal option commit args
|
||||
rebase edit t)
|
||||
rebase)
|
||||
(magit-commit-amend-assert commit)
|
||||
(magit-rebase-interactive-1 commit
|
||||
(list "--autosquash" "--autostash" "--keep-empty")
|
||||
"" "true" nil t)))
|
||||
(format "Type %%p on a commit to %s into it,"
|
||||
(substring option 2))
|
||||
nil nil nil commit)
|
||||
(when magit-commit-show-diff
|
||||
(let ((magit-display-buffer-noselect t))
|
||||
(apply #'magit-diff-staged nil (magit-diff-arguments)))))))
|
||||
|
||||
(defun magit-commit-amend-assert (&optional commit)
|
||||
(--when-let (magit-list-publishing-branches commit)
|
||||
(let ((m1 "This commit has already been published to ")
|
||||
(m2 ".\nDo you really want to modify it"))
|
||||
(magit-confirm 'amend-published
|
||||
(concat m1 "%s" m2)
|
||||
(concat m1 "%i public branches" m2)
|
||||
nil it))))
|
||||
|
||||
(defun magit-commit-assert (args &optional strict)
|
||||
(cond
|
||||
((or (magit-anything-staged-p)
|
||||
(and (magit-anything-unstaged-p)
|
||||
;; ^ Everything of nothing is still nothing.
|
||||
(member "--all" args))
|
||||
(and (not strict)
|
||||
;; ^ For amend variants that don't make sense otherwise.
|
||||
(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))))
|
||||
(or args (list "--")))
|
||||
((and (magit-rebase-in-progress-p)
|
||||
(not (magit-anything-unstaged-p))
|
||||
(y-or-n-p "Nothing staged. Continue in-progress rebase? "))
|
||||
(setq this-command 'magit-rebase-continue)
|
||||
(magit-run-git-sequencer "rebase" "--continue")
|
||||
nil)
|
||||
((and (file-exists-p (magit-git-dir "MERGE_MSG"))
|
||||
(not (magit-anything-unstaged-p)))
|
||||
(or args (list "--")))
|
||||
((not (magit-anything-unstaged-p))
|
||||
(user-error "Nothing staged (or unstaged)"))
|
||||
(magit-commit-ask-to-stage
|
||||
(when (eq magit-commit-ask-to-stage 'verbose)
|
||||
(magit-diff-unstaged))
|
||||
(prog1 (when (or (eq magit-commit-ask-to-stage 'stage)
|
||||
(y-or-n-p "Nothing staged. Stage and commit all unstaged changes? "))
|
||||
(magit-run-git "add" "-u" ".")
|
||||
(or args (list "--")))
|
||||
(when (and (eq magit-commit-ask-to-stage 'verbose)
|
||||
(derived-mode-p 'magit-diff-mode))
|
||||
(magit-mode-bury-buffer))))
|
||||
(t
|
||||
(user-error "Nothing staged"))))
|
||||
|
||||
(defvar magit--reshelve-history nil)
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-commit-reshelve (date update-author &optional args)
|
||||
"Change the committer date and possibly the author date of `HEAD'.
|
||||
|
||||
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 ((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 update-author
|
||||
"Change author and committer dates to: "
|
||||
"Change committer date to: ")
|
||||
(cons (format-time-string "%F %T %z") 17)
|
||||
'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 update-author (concat "--date=" date))
|
||||
args)))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-commit-absorb-modules (phase commit)
|
||||
"Spread modified modules across recent commits."
|
||||
(interactive (list 'select (magit-get-upstream-branch)))
|
||||
(let ((modules (magit-list-modified-modules)))
|
||||
(unless modules
|
||||
(user-error "There are no modified modules that could be absorbed"))
|
||||
(when commit
|
||||
(setq commit (magit-rebase-interactive-assert commit t)))
|
||||
(if (and commit (eq phase 'run))
|
||||
(progn
|
||||
(dolist (module modules)
|
||||
(when-let ((msg (magit-git-string
|
||||
"log" "-1" "--format=%s"
|
||||
(concat commit "..") "--" module)))
|
||||
(magit-git "commit" "-m" (concat "fixup! " msg)
|
||||
"--only" "--" module)))
|
||||
(magit-refresh)
|
||||
t)
|
||||
(magit-log-select
|
||||
(lambda (commit)
|
||||
(magit-commit-absorb-modules 'run commit))
|
||||
nil nil nil nil commit))))
|
||||
|
||||
;;;###autoload (autoload 'magit-commit-absorb "magit-commit" nil t)
|
||||
(transient-define-prefix magit-commit-absorb (phase commit args)
|
||||
"Spread staged changes across recent commits.
|
||||
With a prefix argument use a transient command to select infix
|
||||
arguments. This command requires git-absorb executable, which
|
||||
is available from https://github.com/tummychow/git-absorb.
|
||||
See `magit-commit-autofixup' for an alternative implementation."
|
||||
["Arguments"
|
||||
("-f" "Skip safety checks" ("-f" "--force"))
|
||||
("-v" "Display more output" ("-v" "--verbose"))]
|
||||
["Actions"
|
||||
("x" "Absorb" magit-commit-absorb)]
|
||||
(interactive (if current-prefix-arg
|
||||
(list 'transient nil nil)
|
||||
(list 'select
|
||||
(magit-get-upstream-branch)
|
||||
(transient-args 'magit-commit-absorb))))
|
||||
(if (eq phase 'transient)
|
||||
(transient-setup 'magit-commit-absorb)
|
||||
(unless (executable-find "git-absorb")
|
||||
(user-error "This command requires the git-absorb executable, which %s"
|
||||
"is available from https://github.com/tummychow/git-absorb"))
|
||||
(unless (magit-anything-staged-p)
|
||||
(if (magit-anything-unstaged-p)
|
||||
(if (y-or-n-p "Nothing staged. Absorb all unstaged changes? ")
|
||||
(magit-with-toplevel
|
||||
(magit-run-git "add" "-u" "."))
|
||||
(user-error "Abort"))
|
||||
(user-error "There are no changes that could be absorbed")))
|
||||
(when commit
|
||||
(setq commit (magit-rebase-interactive-assert commit t)))
|
||||
(if (and commit (eq phase 'run))
|
||||
(progn (magit-run-git-async "absorb" "-v" args "-b" commit) t)
|
||||
(magit-log-select
|
||||
(lambda (commit)
|
||||
(with-no-warnings ; about non-interactive use
|
||||
(magit-commit-absorb 'run commit args)))
|
||||
nil nil nil nil commit))))
|
||||
|
||||
;;;###autoload (autoload 'magit-commit-autofixup "magit-commit" nil t)
|
||||
(transient-define-prefix magit-commit-autofixup (phase commit args)
|
||||
"Spread staged or unstaged changes across recent commits.
|
||||
|
||||
If there are any staged then spread only those, otherwise
|
||||
spread all unstaged changes. With a prefix argument use a
|
||||
transient command to select infix arguments.
|
||||
|
||||
This command requires the git-autofixup script, which is
|
||||
available from https://github.com/torbiak/git-autofixup.
|
||||
See `magit-commit-absorb' for an alternative implementation."
|
||||
["Arguments"
|
||||
(magit-autofixup:--context)
|
||||
(magit-autofixup:--strict)]
|
||||
["Actions"
|
||||
("x" "Absorb" magit-commit-autofixup)]
|
||||
(interactive (if current-prefix-arg
|
||||
(list 'transient nil nil)
|
||||
(list 'select
|
||||
(magit-get-upstream-branch)
|
||||
(transient-args 'magit-commit-autofixup))))
|
||||
(if (eq phase 'transient)
|
||||
(transient-setup 'magit-commit-autofixup)
|
||||
(unless (executable-find "git-autofixup")
|
||||
(user-error "This command requires the git-autofixup script, which %s"
|
||||
"is available from https://github.com/torbiak/git-autofixup"))
|
||||
(unless (magit-anything-modified-p)
|
||||
(user-error "There are no changes that could be absorbed"))
|
||||
(when commit
|
||||
(setq commit (magit-rebase-interactive-assert commit t)))
|
||||
(if (and commit (eq phase 'run))
|
||||
(progn (magit-run-git-async "autofixup" "-vv" args commit) t)
|
||||
(magit-log-select
|
||||
(lambda (commit)
|
||||
(with-no-warnings ; about non-interactive use
|
||||
(magit-commit-autofixup 'run commit args)))
|
||||
nil nil nil nil commit))))
|
||||
|
||||
(transient-define-argument magit-autofixup:--context ()
|
||||
:description "Diff context lines"
|
||||
:class 'transient-option
|
||||
:shortarg "-c"
|
||||
:argument "--context="
|
||||
:reader 'transient-read-number-N0)
|
||||
|
||||
(transient-define-argument magit-autofixup:--strict ()
|
||||
:description "Strictness"
|
||||
:class 'transient-option
|
||||
:shortarg "-s"
|
||||
:argument "--strict="
|
||||
:reader 'transient-read-number-N0)
|
||||
|
||||
;;; Pending Diff
|
||||
|
||||
(defun magit-commit-diff ()
|
||||
(when (and git-commit-mode magit-commit-show-diff)
|
||||
(when-let ((diff-buffer (magit-get-mode-buffer 'magit-diff-mode)))
|
||||
;; This window just started displaying the commit message
|
||||
;; buffer. Without this that buffer would immediately be
|
||||
;; replaced with the diff buffer. See #2632.
|
||||
(unrecord-window-buffer nil diff-buffer))
|
||||
(condition-case nil
|
||||
(let ((args (car (magit-diff-arguments)))
|
||||
(magit-inhibit-save-previous-winconf 'unset)
|
||||
(magit-display-buffer-noselect t)
|
||||
(inhibit-quit nil)
|
||||
(display-buffer-overriding-action '(nil (inhibit-same-window t))))
|
||||
(message "Diffing changes to be committed (C-g to abort diffing)")
|
||||
(cl-case last-command
|
||||
(magit-commit
|
||||
(magit-diff-staged nil args))
|
||||
(magit-commit-all
|
||||
(magit-diff-working-tree nil args))
|
||||
((magit-commit-amend
|
||||
magit-commit-reword
|
||||
magit-rebase-reword-commit)
|
||||
(magit-diff-while-amending args))
|
||||
(t (if (magit-anything-staged-p)
|
||||
(magit-diff-staged nil args)
|
||||
(magit-diff-while-amending args)))))
|
||||
(quit))))
|
||||
|
||||
;; Mention `magit-diff-while-committing' because that's
|
||||
;; always what I search for when I try to find this line.
|
||||
(add-hook 'server-switch-hook 'magit-commit-diff)
|
||||
(add-hook 'with-editor-filter-visit-hook 'magit-commit-diff)
|
||||
|
||||
(add-to-list 'with-editor-server-window-alist
|
||||
(cons git-commit-filename-regexp 'switch-to-buffer))
|
||||
|
||||
;;; Message Utilities
|
||||
|
||||
(defun magit-commit-message-buffer ()
|
||||
(let* ((find-file-visit-truename t) ; git uses truename of COMMIT_EDITMSG
|
||||
(topdir (magit-toplevel)))
|
||||
(--first (equal topdir (with-current-buffer it
|
||||
(and git-commit-mode (magit-toplevel))))
|
||||
(append (buffer-list (selected-frame))
|
||||
(buffer-list)))))
|
||||
|
||||
(defvar magit-commit-add-log-insert-function 'magit-commit-add-log-insert
|
||||
"Used by `magit-commit-add-log' to insert a single entry.")
|
||||
|
||||
(defun magit-commit-add-log ()
|
||||
"Add a stub for the current change into the commit message buffer.
|
||||
If no commit is in progress, then initiate it. Use the function
|
||||
specified by variable `magit-commit-add-log-insert-function' to
|
||||
actually insert the entry."
|
||||
(interactive)
|
||||
(pcase-let* ((hunk (and (magit-section-match 'hunk)
|
||||
(magit-current-section)))
|
||||
(log (magit-commit-message-buffer))
|
||||
(`(,buf ,pos) (magit-diff-visit-file--noselect)))
|
||||
(unless log
|
||||
(unless (magit-commit-assert nil)
|
||||
(user-error "Abort"))
|
||||
(magit-commit-create)
|
||||
(while (not (setq log (magit-commit-message-buffer)))
|
||||
(sit-for 0.01)))
|
||||
(magit--with-temp-position buf pos
|
||||
(funcall magit-commit-add-log-insert-function log
|
||||
(magit-file-relative-name)
|
||||
(and hunk (add-log-current-defun))))))
|
||||
|
||||
(defun magit-commit-add-log-insert (buffer file defun)
|
||||
(with-current-buffer buffer
|
||||
(undo-boundary)
|
||||
(goto-char (point-max))
|
||||
(while (re-search-backward (concat "^" comment-start) nil t))
|
||||
(save-restriction
|
||||
(narrow-to-region (point-min) (point))
|
||||
(cond ((re-search-backward (format "* %s\\(?: (\\([^)]+\\))\\)?: " file)
|
||||
nil t)
|
||||
(when (equal (match-string 1) defun)
|
||||
(setq defun nil))
|
||||
(re-search-forward ": "))
|
||||
(t
|
||||
(when (re-search-backward "^[\\*(].+\n" nil t)
|
||||
(goto-char (match-end 0)))
|
||||
(while (re-search-forward "^[^\\*\n].*\n" nil t))
|
||||
(if defun
|
||||
(progn (insert (format "* %s (%s): \n" file defun))
|
||||
(setq defun nil))
|
||||
(insert (format "* %s: \n" file)))
|
||||
(backward-char)
|
||||
(unless (looking-at "\n[\n\\']")
|
||||
(insert ?\n)
|
||||
(backward-char))))
|
||||
(when defun
|
||||
(forward-line)
|
||||
(let ((limit (save-excursion
|
||||
(and (re-search-forward "^\\*" nil t)
|
||||
(point)))))
|
||||
(unless (or (looking-back (format "(%s): " defun)
|
||||
(line-beginning-position))
|
||||
(re-search-forward (format "^(%s): " defun) limit t))
|
||||
(while (re-search-forward "^[^\\*\n].*\n" limit t))
|
||||
(insert (format "(%s): \n" defun))
|
||||
(backward-char)))))))
|
||||
|
||||
;;; _
|
||||
(provide 'magit-commit)
|
||||
;;; magit-commit.el ends here
|
BIN
elpa/magit-20210414.1306/magit-commit.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-commit.elc
Normal file
Binary file not shown.
128
elpa/magit-20210414.1306/magit-core.el
Normal file
128
elpa/magit-20210414.1306/magit-core.el
Normal file
|
@ -0,0 +1,128 @@
|
|||
;;; magit-core.el --- core functionality -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2010-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
|
||||
;; Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
;; Magit is free software; you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
;;
|
||||
;; Magit is distributed in the hope that it will be useful, but WITHOUT
|
||||
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
;; License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Magit. If not, see http://www.gnu.org/licenses.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; This library requires several other libraries, so that yet other
|
||||
;; libraries can just require this one, instead of having to require
|
||||
;; all the other ones. In other words this separates the low-level
|
||||
;; stuff from the rest. It also defines some Custom groups.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'magit-utils)
|
||||
(require 'magit-section)
|
||||
(require 'magit-git)
|
||||
(require 'magit-mode)
|
||||
(require 'magit-margin)
|
||||
(require 'magit-process)
|
||||
(require 'magit-transient)
|
||||
(require 'magit-autorevert)
|
||||
|
||||
(when (magit--libgit-available-p)
|
||||
(condition-case err
|
||||
(require 'magit-libgit)
|
||||
(error
|
||||
(setq magit-inhibit-libgit 'error)
|
||||
(message "Error while loading `magit-libgit': %S" err)
|
||||
(message "That is not fatal. The `libegit2' module just won't be used."))))
|
||||
|
||||
(defgroup magit nil
|
||||
"Controlling Git from Emacs."
|
||||
:link '(url-link "https://magit.vc")
|
||||
:link '(info-link "(magit)FAQ")
|
||||
:link '(info-link "(magit)")
|
||||
:group 'tools)
|
||||
|
||||
(defgroup magit-essentials nil
|
||||
"Options that every Magit user should briefly think about.
|
||||
|
||||
Each of these options falls into one or more of these categories:
|
||||
|
||||
* Options that affect Magit's behavior in fundamental ways.
|
||||
* Options that affect safety.
|
||||
* Options that affect performance.
|
||||
* Options that are of a personal nature."
|
||||
:link '(info-link "(magit)Essential Settings")
|
||||
:group 'magit)
|
||||
|
||||
(defgroup magit-miscellaneous nil
|
||||
"Miscellaneous Magit options."
|
||||
:group 'magit)
|
||||
|
||||
(defgroup magit-commands nil
|
||||
"Options controlling behavior of certain commands."
|
||||
:group 'magit)
|
||||
|
||||
(defgroup magit-modes nil
|
||||
"Modes used or provided by Magit."
|
||||
:group 'magit)
|
||||
|
||||
(defgroup magit-buffers nil
|
||||
"Options concerning Magit buffers."
|
||||
:link '(info-link "(magit)Modes and Buffers")
|
||||
:group 'magit)
|
||||
|
||||
(defgroup magit-refresh nil
|
||||
"Options controlling how Magit buffers are refreshed."
|
||||
:link '(info-link "(magit)Automatic Refreshing of Magit Buffers")
|
||||
:group 'magit
|
||||
:group 'magit-buffers)
|
||||
|
||||
(defgroup magit-faces nil
|
||||
"Faces used by Magit."
|
||||
:group 'magit
|
||||
:group 'faces)
|
||||
|
||||
(defgroup magit-extensions nil
|
||||
"Extensions to Magit."
|
||||
:group 'magit)
|
||||
|
||||
(custom-add-to-group 'magit-modes 'git-commit 'custom-group)
|
||||
(custom-add-to-group 'magit-faces 'git-commit-faces 'custom-group)
|
||||
(custom-add-to-group 'magit-modes 'git-rebase 'custom-group)
|
||||
(custom-add-to-group 'magit-faces 'git-rebase-faces 'custom-group)
|
||||
(custom-add-to-group 'magit 'magit-section 'custom-group)
|
||||
(custom-add-to-group 'magit-faces 'magit-section-faces 'custom-group)
|
||||
(custom-add-to-group 'magit-process 'with-editor 'custom-group)
|
||||
|
||||
(defgroup magit-related nil
|
||||
"Options that are relevant to Magit but that are defined elsewhere."
|
||||
:link '(custom-group-link vc)
|
||||
:link '(custom-group-link smerge)
|
||||
:link '(custom-group-link ediff)
|
||||
:link '(custom-group-link auto-revert)
|
||||
:group 'magit
|
||||
:group 'magit-extensions
|
||||
:group 'magit-essentials)
|
||||
|
||||
(custom-add-to-group 'magit-related 'auto-revert-check-vc-info 'custom-variable)
|
||||
(custom-add-to-group 'magit-auto-revert 'auto-revert-check-vc-info 'custom-variable)
|
||||
|
||||
(custom-add-to-group 'magit-related 'ediff-window-setup-function 'custom-variable)
|
||||
(custom-add-to-group 'magit-related 'smerge-refine-ignore-whitespace 'custom-variable)
|
||||
(custom-add-to-group 'magit-related 'vc-follow-symlinks 'custom-variable)
|
||||
|
||||
;;; _
|
||||
(provide 'magit-core)
|
||||
;;; magit-core.el ends here
|
BIN
elpa/magit-20210414.1306/magit-core.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-core.elc
Normal file
Binary file not shown.
3318
elpa/magit-20210414.1306/magit-diff.el
Normal file
3318
elpa/magit-20210414.1306/magit-diff.el
Normal file
File diff suppressed because it is too large
Load Diff
BIN
elpa/magit-20210414.1306/magit-diff.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-diff.elc
Normal file
Binary file not shown.
509
elpa/magit-20210414.1306/magit-ediff.el
Normal file
509
elpa/magit-20210414.1306/magit-ediff.el
Normal file
|
@ -0,0 +1,509 @@
|
|||
;;; magit-ediff.el --- Ediff extension for Magit -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2010-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
|
||||
;; Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
;; Magit is free software; you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
;;
|
||||
;; Magit is distributed in the hope that it will be useful, but WITHOUT
|
||||
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
;; License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Magit. If not, see http://www.gnu.org/licenses.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; This library provides basic support for Ediff.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'magit)
|
||||
|
||||
(require 'ediff)
|
||||
(require 'smerge-mode)
|
||||
|
||||
(defvar smerge-ediff-buf)
|
||||
(defvar smerge-ediff-windows)
|
||||
|
||||
;;; Options
|
||||
|
||||
(defgroup magit-ediff nil
|
||||
"Ediff support for Magit."
|
||||
:link '(info-link "(magit)Ediffing")
|
||||
:group 'magit-extensions)
|
||||
|
||||
(defcustom magit-ediff-quit-hook
|
||||
'(magit-ediff-cleanup-auxiliary-buffers
|
||||
magit-ediff-restore-previous-winconf)
|
||||
"Hooks to run after finishing Ediff, when that was invoked using Magit.
|
||||
The hooks are run in the Ediff control buffer. This is similar
|
||||
to `ediff-quit-hook' but takes the needs of Magit into account.
|
||||
The `ediff-quit-hook' is ignored by Ediff sessions which were
|
||||
invoked using Magit."
|
||||
:package-version '(magit . "2.2.0")
|
||||
:group 'magit-ediff
|
||||
:type 'hook
|
||||
:get 'magit-hook-custom-get
|
||||
:options '(magit-ediff-cleanup-auxiliary-buffers
|
||||
magit-ediff-restore-previous-winconf))
|
||||
|
||||
(defcustom magit-ediff-dwim-show-on-hunks nil
|
||||
"Whether `magit-ediff-dwim' runs show variants on hunks.
|
||||
If non-nil, `magit-ediff-show-staged' or
|
||||
`magit-ediff-show-unstaged' are called based on what section the
|
||||
hunk is in. Otherwise, `magit-ediff-dwim' runs
|
||||
`magit-ediff-stage' when point is on an uncommitted hunk."
|
||||
:package-version '(magit . "2.2.0")
|
||||
:group 'magit-ediff
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom magit-ediff-show-stash-with-index t
|
||||
"Whether `magit-ediff-show-stash' shows the state of the index.
|
||||
|
||||
If non-nil, use a third Ediff buffer to distinguish which changes
|
||||
in the stash were staged. In cases where the stash contains no
|
||||
staged changes, fall back to a two-buffer Ediff.
|
||||
|
||||
More specifically, a stash is a merge commit, stash@{N}, with
|
||||
potentially three parents.
|
||||
|
||||
* stash@{N}^1 represents the `HEAD' commit at the time the stash
|
||||
was created.
|
||||
|
||||
* stash@{N}^2 records any changes that were staged when the stash
|
||||
was made.
|
||||
|
||||
* stash@{N}^3, if it exists, contains files that were untracked
|
||||
when stashing.
|
||||
|
||||
If this option is non-nil, `magit-ediff-show-stash' will run
|
||||
Ediff on a file using three buffers: one for stash@{N}, another
|
||||
for stash@{N}^1, and a third for stash@{N}^2.
|
||||
|
||||
Otherwise, Ediff uses two buffers, comparing
|
||||
stash@{N}^1..stash@{N}. Along with any unstaged changes, changes
|
||||
in the index commit, stash@{N}^2, will be shown in this
|
||||
comparison unless they conflicted with changes in the working
|
||||
tree at the time of stashing."
|
||||
:package-version '(magit . "2.6.0")
|
||||
:group 'magit-ediff
|
||||
:type 'boolean)
|
||||
|
||||
;;; Commands
|
||||
|
||||
(defvar magit-ediff-previous-winconf nil)
|
||||
|
||||
;;;###autoload (autoload 'magit-ediff "magit-ediff" nil)
|
||||
(transient-define-prefix magit-ediff ()
|
||||
"Show differences using the Ediff package."
|
||||
:info-manual "(ediff)"
|
||||
["Ediff"
|
||||
[("E" "Dwim" magit-ediff-dwim)
|
||||
("s" "Stage" magit-ediff-stage)
|
||||
("m" "Resolve" magit-ediff-resolve)]
|
||||
[("u" "Show unstaged" magit-ediff-show-unstaged)
|
||||
("i" "Show staged" magit-ediff-show-staged)
|
||||
("w" "Show worktree" magit-ediff-show-working-tree)]
|
||||
[("c" "Show commit" magit-ediff-show-commit)
|
||||
("r" "Show range" magit-ediff-compare)
|
||||
("z" "Show stash" magit-ediff-show-stash)]])
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-ediff-resolve (file)
|
||||
"Resolve outstanding conflicts in FILE using Ediff.
|
||||
FILE has to be relative to the top directory of the repository.
|
||||
|
||||
In the rare event that you want to manually resolve all
|
||||
conflicts, including those already resolved by Git, use
|
||||
`ediff-merge-revisions-with-ancestor'."
|
||||
(interactive
|
||||
(let ((current (magit-current-file))
|
||||
(unmerged (magit-unmerged-files)))
|
||||
(unless unmerged
|
||||
(user-error "There are no unresolved conflicts"))
|
||||
(list (magit-completing-read "Resolve file" unmerged nil t nil nil
|
||||
(car (member current unmerged))))))
|
||||
(magit-with-toplevel
|
||||
(with-current-buffer (find-file-noselect file)
|
||||
(smerge-ediff)
|
||||
(setq-local
|
||||
ediff-quit-hook
|
||||
(lambda ()
|
||||
(let ((bufC ediff-buffer-C)
|
||||
(bufS smerge-ediff-buf))
|
||||
(with-current-buffer bufS
|
||||
(when (yes-or-no-p (format "Conflict resolution finished; save %s? "
|
||||
buffer-file-name))
|
||||
(erase-buffer)
|
||||
(insert-buffer-substring bufC)
|
||||
(save-buffer))))
|
||||
(when (buffer-live-p ediff-buffer-A) (kill-buffer ediff-buffer-A))
|
||||
(when (buffer-live-p ediff-buffer-B) (kill-buffer ediff-buffer-B))
|
||||
(when (buffer-live-p ediff-buffer-C) (kill-buffer ediff-buffer-C))
|
||||
(when (buffer-live-p ediff-ancestor-buffer)
|
||||
(kill-buffer ediff-ancestor-buffer))
|
||||
(let ((magit-ediff-previous-winconf smerge-ediff-windows))
|
||||
(run-hooks 'magit-ediff-quit-hook)))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-ediff-stage (file)
|
||||
"Stage and unstage changes to FILE using Ediff.
|
||||
FILE has to be relative to the top directory of the repository."
|
||||
(interactive
|
||||
(let ((files (magit-tracked-files)))
|
||||
(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)))
|
||||
(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))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-ediff-compare (revA revB fileA fileB)
|
||||
"Compare REVA:FILEA with REVB:FILEB using Ediff.
|
||||
|
||||
FILEA and FILEB have to be relative to the top directory of the
|
||||
repository. If REVA or REVB is nil, then this stands for the
|
||||
working tree state.
|
||||
|
||||
If the region is active, use the revisions on the first and last
|
||||
line of the region. With a prefix argument, instead of diffing
|
||||
the revisions, choose a revision to view changes along, starting
|
||||
at the common ancestor of both revisions (i.e., use a \"...\"
|
||||
range)."
|
||||
(interactive
|
||||
(pcase-let ((`(,revA ,revB) (magit-ediff-compare--read-revisions
|
||||
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))))
|
||||
|
||||
(defun magit-ediff-compare--read-revisions (&optional arg mbase)
|
||||
(let ((input (or arg (magit-diff-read-range-or-commit
|
||||
"Compare range or commit"
|
||||
nil mbase))))
|
||||
(--if-let (magit-split-range input)
|
||||
(-cons-to-list it)
|
||||
(list input nil))))
|
||||
|
||||
(defun magit-ediff-read-files (revA revB &optional fileB)
|
||||
"Read file in REVB, return it and the corresponding file in REVA.
|
||||
When FILEB is non-nil, use this as REVB's file instead of
|
||||
prompting for it."
|
||||
(unless fileB
|
||||
(setq fileB (magit-read-file-choice
|
||||
(format "File to compare between %s and %s"
|
||||
revA (or revB "the working tree"))
|
||||
(magit-changed-files revA revB)
|
||||
(format "No changed files between %s and %s"
|
||||
revA (or revB "the working tree")))))
|
||||
(list (or (car (member fileB (magit-revision-files revA)))
|
||||
(cdr (assoc fileB (magit-renamed-files revB revA)))
|
||||
(magit-read-file-choice
|
||||
(format "File in %s to compare with %s in %s"
|
||||
revA fileB (or revB "the working tree"))
|
||||
(magit-changed-files revB revA)
|
||||
(format "No files have changed between %s and %s"
|
||||
revA revB)))
|
||||
fileB))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-ediff-dwim ()
|
||||
"Compare, stage, or resolve using Ediff.
|
||||
This command tries to guess what file, and what commit or range
|
||||
the user wants to compare, stage, or resolve using Ediff. It
|
||||
might only be able to guess either the file, or range or commit,
|
||||
in which case the user is asked about the other. It might not
|
||||
always guess right, in which case the appropriate `magit-ediff-*'
|
||||
command has to be used explicitly. If it cannot read the user's
|
||||
mind at all, then it asks the user for a command to run."
|
||||
(interactive)
|
||||
(magit-section-case
|
||||
(hunk (save-excursion
|
||||
(goto-char (oref (oref it parent) start))
|
||||
(magit-ediff-dwim)))
|
||||
(t
|
||||
(let ((range (magit-diff--dwim))
|
||||
(file (magit-current-file))
|
||||
command revA revB)
|
||||
(pcase range
|
||||
((and (guard (not magit-ediff-dwim-show-on-hunks))
|
||||
(or `unstaged `staged))
|
||||
(setq command (if (magit-anything-unmerged-p)
|
||||
#'magit-ediff-resolve
|
||||
#'magit-ediff-stage)))
|
||||
(`unstaged (setq command #'magit-ediff-show-unstaged))
|
||||
(`staged (setq command #'magit-ediff-show-staged))
|
||||
(`(commit . ,value)
|
||||
(setq command #'magit-ediff-show-commit)
|
||||
(setq revB value))
|
||||
(`(stash . ,value)
|
||||
(setq command #'magit-ediff-show-stash)
|
||||
(setq revB value))
|
||||
((pred stringp)
|
||||
(pcase-let ((`(,a ,b) (magit-ediff-compare--read-revisions range)))
|
||||
(setq command #'magit-ediff-compare)
|
||||
(setq revA a)
|
||||
(setq revB b)))
|
||||
(_
|
||||
(when (derived-mode-p 'magit-diff-mode)
|
||||
(pcase (magit-diff-type)
|
||||
(`committed (pcase-let ((`(,a ,b)
|
||||
(magit-ediff-compare--read-revisions
|
||||
magit-buffer-range)))
|
||||
(setq revA a)
|
||||
(setq revB b)))
|
||||
((guard (not magit-ediff-dwim-show-on-hunks))
|
||||
(setq command #'magit-ediff-stage))
|
||||
(`unstaged (setq command #'magit-ediff-show-unstaged))
|
||||
(`staged (setq command #'magit-ediff-show-staged))
|
||||
(`undefined (setq command nil))
|
||||
(_ (setq command nil))))))
|
||||
(cond ((not command)
|
||||
(call-interactively
|
||||
(magit-read-char-case
|
||||
"Failed to read your mind; do you want to " t
|
||||
(?c "[c]ommit" 'magit-ediff-show-commit)
|
||||
(?r "[r]ange" 'magit-ediff-compare)
|
||||
(?s "[s]tage" 'magit-ediff-stage)
|
||||
(?v "resol[v]e" 'magit-ediff-resolve))))
|
||||
((eq command 'magit-ediff-compare)
|
||||
(apply 'magit-ediff-compare revA revB
|
||||
(magit-ediff-read-files revA revB file)))
|
||||
((eq command 'magit-ediff-show-commit)
|
||||
(magit-ediff-show-commit revB))
|
||||
((eq command 'magit-ediff-show-stash)
|
||||
(magit-ediff-show-stash revB))
|
||||
(file
|
||||
(funcall command file))
|
||||
(t
|
||||
(call-interactively command)))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-ediff-show-staged (file)
|
||||
"Show staged changes using Ediff.
|
||||
|
||||
This only allows looking at the changes; to stage, unstage,
|
||||
and discard changes using Ediff, use `magit-ediff-stage'.
|
||||
|
||||
FILE must be relative to the top directory of the repository."
|
||||
(interactive
|
||||
(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)))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-ediff-show-unstaged (file)
|
||||
"Show unstaged changes using Ediff.
|
||||
|
||||
This only allows looking at the changes; to stage, unstage,
|
||||
and discard changes using Ediff, use `magit-ediff-stage'.
|
||||
|
||||
FILE must be relative to the top directory of the repository."
|
||||
(interactive
|
||||
(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))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-ediff-show-working-tree (file)
|
||||
"Show changes between `HEAD' and working tree using Ediff.
|
||||
FILE must be relative to the top directory of the repository."
|
||||
(interactive
|
||||
(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))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-ediff-show-commit (commit)
|
||||
"Show changes introduced by COMMIT using Ediff."
|
||||
(interactive (list (magit-read-branch-or-commit "Revision")))
|
||||
(let ((revA (concat commit "^"))
|
||||
(revB commit))
|
||||
(apply #'magit-ediff-compare
|
||||
revA revB
|
||||
(magit-ediff-read-files revA revB (magit-current-file)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-ediff-show-stash (stash)
|
||||
"Show changes introduced by STASH using Ediff.
|
||||
`magit-ediff-show-stash-with-index' controls whether a
|
||||
three-buffer Ediff is used in order to distinguish changes in the
|
||||
stash that were staged."
|
||||
(interactive (list (magit-read-stash "Stash")))
|
||||
(pcase-let* ((revA (concat stash "^1"))
|
||||
(revB (concat stash "^2"))
|
||||
(revC stash)
|
||||
(`(,fileA ,fileC) (magit-ediff-read-files revA revC))
|
||||
(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-compare revA revC fileA fileC))))
|
||||
|
||||
(defun magit-ediff-cleanup-auxiliary-buffers ()
|
||||
(let* ((ctl-buf ediff-control-buffer)
|
||||
(ctl-win (ediff-get-visible-buffer-window ctl-buf))
|
||||
(ctl-frm ediff-control-frame)
|
||||
(main-frame (cond ((window-live-p ediff-window-A)
|
||||
(window-frame ediff-window-A))
|
||||
((window-live-p ediff-window-B)
|
||||
(window-frame ediff-window-B)))))
|
||||
(ediff-kill-buffer-carefully ediff-diff-buffer)
|
||||
(ediff-kill-buffer-carefully ediff-custom-diff-buffer)
|
||||
(ediff-kill-buffer-carefully ediff-fine-diff-buffer)
|
||||
(ediff-kill-buffer-carefully ediff-tmp-buffer)
|
||||
(ediff-kill-buffer-carefully ediff-error-buffer)
|
||||
(ediff-kill-buffer-carefully ediff-msg-buffer)
|
||||
(ediff-kill-buffer-carefully ediff-debug-buffer)
|
||||
(when (boundp 'ediff-patch-diagnostics)
|
||||
(ediff-kill-buffer-carefully ediff-patch-diagnostics))
|
||||
(cond ((and (ediff-window-display-p)
|
||||
(frame-live-p ctl-frm))
|
||||
(delete-frame ctl-frm))
|
||||
((window-live-p ctl-win)
|
||||
(delete-window ctl-win)))
|
||||
(ediff-kill-buffer-carefully ctl-buf)
|
||||
(when (frame-live-p main-frame)
|
||||
(select-frame main-frame))))
|
||||
|
||||
(defun magit-ediff-restore-previous-winconf ()
|
||||
(set-window-configuration magit-ediff-previous-winconf))
|
||||
|
||||
;;; _
|
||||
(provide 'magit-ediff)
|
||||
;;; magit-ediff.el ends here
|
BIN
elpa/magit-20210414.1306/magit-ediff.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-ediff.elc
Normal file
Binary file not shown.
766
elpa/magit-20210414.1306/magit-extras.el
Normal file
766
elpa/magit-20210414.1306/magit-extras.el
Normal file
|
@ -0,0 +1,766 @@
|
|||
;;; magit-extras.el --- additional functionality for Magit -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2008-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
|
||||
;; Magit is free software; you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
;;
|
||||
;; Magit is distributed in the hope that it will be useful, but WITHOUT
|
||||
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
;; License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Magit. If not, see http://www.gnu.org/licenses.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Additional functionality for Magit.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'magit)
|
||||
|
||||
(declare-function change-log-insert-entries "add-log" (changelogs))
|
||||
(declare-function diff-add-log-current-defuns "diff-mode" ())
|
||||
(declare-function dired-read-shell-command "dired-aux" (prompt arg files))
|
||||
;; For `magit-project-status'.
|
||||
(declare-function project-root "project" (project))
|
||||
(declare-function vc-git-command "vc-git" (buffer okstatus file-or-list &rest flags))
|
||||
|
||||
(defvar ido-exit)
|
||||
(defvar ido-fallback)
|
||||
(defvar project-prefix-map)
|
||||
(defvar project-switch-commands)
|
||||
|
||||
(defgroup magit-extras nil
|
||||
"Additional functionality for Magit."
|
||||
:group 'magit-extensions)
|
||||
|
||||
;;; External Tools
|
||||
|
||||
(defcustom magit-gitk-executable
|
||||
(or (and (eq system-type 'windows-nt)
|
||||
(let ((exe (magit-git-string
|
||||
"-c" "alias.X=!x() { which \"$1\" | cygpath -mf -; }; x"
|
||||
"X" "gitk.exe")))
|
||||
(and exe (file-executable-p exe) exe)))
|
||||
(executable-find "gitk") "gitk")
|
||||
"The Gitk executable."
|
||||
:group 'magit-extras
|
||||
:set-after '(magit-git-executable)
|
||||
:type 'string)
|
||||
|
||||
;;;###autoload
|
||||
(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")))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-run-git-gui-blame (commit filename &optional linenum)
|
||||
"Run `git gui blame' on the given FILENAME and COMMIT.
|
||||
Interactively run it for the current file and the `HEAD', with a
|
||||
prefix or when the current file cannot be determined let the user
|
||||
choose. When the current buffer is visiting FILENAME instruct
|
||||
blame to center around the line point is on."
|
||||
(interactive
|
||||
(let (revision filename)
|
||||
(when (or current-prefix-arg
|
||||
(not (setq revision "HEAD"
|
||||
filename (magit-file-relative-name nil 'tracked))))
|
||||
(setq revision (magit-read-branch-or-commit "Blame from revision"))
|
||||
(setq filename (magit-read-file-from-rev revision "Blame file")))
|
||||
(list revision filename
|
||||
(and (equal filename
|
||||
(ignore-errors
|
||||
(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))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-run-gitk ()
|
||||
"Run `gitk' in the current repository."
|
||||
(interactive)
|
||||
(magit-process-file magit-gitk-executable nil 0))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-run-gitk-branches ()
|
||||
"Run `gitk --branches' in the current repository."
|
||||
(interactive)
|
||||
(magit-process-file magit-gitk-executable nil 0 nil "--branches"))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-run-gitk-all ()
|
||||
"Run `gitk --all' in the current repository."
|
||||
(interactive)
|
||||
(magit-process-file magit-gitk-executable nil 0 nil "--all"))
|
||||
|
||||
;;; Emacs Tools
|
||||
|
||||
;;;###autoload
|
||||
(defun ido-enter-magit-status ()
|
||||
"Drop into `magit-status' from file switching.
|
||||
|
||||
This command does not work in Emacs 26.1.
|
||||
See https://github.com/magit/magit/issues/3634
|
||||
and https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31707.
|
||||
|
||||
To make this command available use something like:
|
||||
|
||||
(add-hook \\='ido-setup-hook
|
||||
(lambda ()
|
||||
(define-key ido-completion-map
|
||||
(kbd \"C-x g\") \\='ido-enter-magit-status)))
|
||||
|
||||
Starting with Emacs 25.1 the Ido keymaps are defined just once
|
||||
instead of every time Ido is invoked, so now you can modify it
|
||||
like pretty much every other keymap:
|
||||
|
||||
(define-key ido-common-completion-map
|
||||
(kbd \"C-x g\") \\='ido-enter-magit-status)"
|
||||
(interactive)
|
||||
(setq ido-exit 'fallback)
|
||||
(setq ido-fallback 'magit-status) ; for Emacs >= 26.2
|
||||
(with-no-warnings (setq fallback 'magit-status)) ; for Emacs 25
|
||||
(exit-minibuffer))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-project-status ()
|
||||
"Run `magit-status' in the current project's root."
|
||||
(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 (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)
|
||||
"Visit file at point using Dired.
|
||||
With a prefix argument, visit in another window. If there
|
||||
is no file at point, then instead visit `default-directory'."
|
||||
(interactive "P")
|
||||
(dired-jump other-window
|
||||
(when-let ((file (magit-file-at-point)))
|
||||
(expand-file-name (if (file-directory-p file)
|
||||
(file-name-as-directory file)
|
||||
file)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-dired-log (&optional follow)
|
||||
"Show log for all marked files, or the current file."
|
||||
(interactive "P")
|
||||
(if-let ((topdir (magit-toplevel default-directory)))
|
||||
(let ((args (car (magit-log-arguments)))
|
||||
(files (dired-get-marked-files nil nil #'magit-file-tracked-p)))
|
||||
(unless files
|
||||
(user-error "No marked file is being tracked by Git"))
|
||||
(when (and follow
|
||||
(not (member "--follow" args))
|
||||
(not (cdr files)))
|
||||
(push "--follow" args))
|
||||
(magit-log-setup-buffer
|
||||
(list (or (magit-get-current-branch) "HEAD"))
|
||||
args
|
||||
(let ((default-directory topdir))
|
||||
(mapcar #'file-relative-name files))
|
||||
magit-log-buffer-file-locked))
|
||||
(magit--not-inside-repository-error)))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-do-async-shell-command (file)
|
||||
"Open FILE with `dired-do-async-shell-command'.
|
||||
Interactively, open the file at point."
|
||||
(interactive (list (or (magit-file-at-point)
|
||||
(completing-read "Act on file: "
|
||||
(magit-list-files)))))
|
||||
(require 'dired-aux)
|
||||
(dired-do-async-shell-command
|
||||
(dired-read-shell-command "& on %s: " current-prefix-arg (list file))
|
||||
nil (list file)))
|
||||
|
||||
;;; Shift Selection
|
||||
|
||||
(defun magit--turn-on-shift-select-mode-p ()
|
||||
(and shift-select-mode
|
||||
this-command-keys-shift-translated
|
||||
(not mark-active)
|
||||
(not (eq (car-safe transient-mark-mode) 'only))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-previous-line (&optional arg try-vscroll)
|
||||
"Like `previous-line' but with Magit-specific shift-selection.
|
||||
|
||||
Magit's selection mechanism is based on the region but selects an
|
||||
area that is larger than the region. This causes `previous-line'
|
||||
when invoked while holding the shift key to move up one line and
|
||||
thereby select two lines. When invoked inside a hunk body this
|
||||
command does not move point on the first invocation and thereby
|
||||
it only selects a single line. Which inconsistency you prefer
|
||||
is a matter of preference."
|
||||
(declare (interactive-only
|
||||
"use `forward-line' with negative argument instead."))
|
||||
(interactive "p\np")
|
||||
(unless arg (setq arg 1))
|
||||
(let ((stay (or (magit-diff-inside-hunk-body-p)
|
||||
(magit-section-position-in-heading-p))))
|
||||
(if (and stay (= arg 1) (magit--turn-on-shift-select-mode-p))
|
||||
(push-mark nil nil t)
|
||||
(with-no-warnings
|
||||
(handle-shift-selection)
|
||||
(previous-line (if stay (max (1- arg) 1) arg) try-vscroll)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-next-line (&optional arg try-vscroll)
|
||||
"Like `next-line' but with Magit-specific shift-selection.
|
||||
|
||||
Magit's selection mechanism is based on the region but selects
|
||||
an area that is larger than the region. This causes `next-line'
|
||||
when invoked while holding the shift key to move down one line
|
||||
and thereby select two lines. When invoked inside a hunk body
|
||||
this command does not move point on the first invocation and
|
||||
thereby it only selects a single line. Which inconsistency you
|
||||
prefer is a matter of preference."
|
||||
(declare (interactive-only forward-line))
|
||||
(interactive "p\np")
|
||||
(unless arg (setq arg 1))
|
||||
(let ((stay (or (magit-diff-inside-hunk-body-p)
|
||||
(magit-section-position-in-heading-p))))
|
||||
(if (and stay (= arg 1) (magit--turn-on-shift-select-mode-p))
|
||||
(push-mark nil nil t)
|
||||
(with-no-warnings
|
||||
(handle-shift-selection)
|
||||
(next-line (if stay (max (1- arg) 1) arg) try-vscroll)))))
|
||||
|
||||
;;; Clean
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-clean (&optional arg)
|
||||
"Remove untracked files from the working tree.
|
||||
With a prefix argument also remove ignored files,
|
||||
with two prefix arguments remove ignored files only.
|
||||
\n(git clean -f -d [-x|-X])"
|
||||
(interactive "p")
|
||||
(when (yes-or-no-p (format "Remove %s files? "
|
||||
(pcase arg
|
||||
(1 "untracked")
|
||||
(4 "untracked and ignored")
|
||||
(_ "ignored"))))
|
||||
(magit-wip-commit-before-change)
|
||||
(magit-run-git "clean" "-f" "-d" (pcase arg (4 "-x") (16 "-X")))))
|
||||
|
||||
(put 'magit-clean 'disabled t)
|
||||
|
||||
;;; ChangeLog
|
||||
|
||||
(defun magit-generate-changelog (&optional amending)
|
||||
"Insert ChangeLog entries into the current buffer.
|
||||
|
||||
The entries are generated from the diff being committed.
|
||||
If prefix argument, AMENDING, is non-nil, include changes
|
||||
in HEAD as well as staged changes in the diff to check."
|
||||
(interactive "P")
|
||||
(unless (magit-commit-message-buffer)
|
||||
(user-error "No commit in progress"))
|
||||
(require 'diff-mode) ; `diff-add-log-current-defuns'.
|
||||
(require 'vc-git) ; `vc-git-diff'.
|
||||
(require 'add-log) ; `change-log-insert-entries'.
|
||||
(unless (and (fboundp 'change-log-insert-entries)
|
||||
(fboundp 'diff-add-log-current-defuns))
|
||||
(user-error "`magit-generate-changelog' requires Emacs 27 or better"))
|
||||
(setq default-directory
|
||||
(if (and (file-regular-p "gitdir")
|
||||
(not (magit-git-true "rev-parse" "--is-inside-work-tree"))
|
||||
(magit-git-true "rev-parse" "--is-inside-git-dir"))
|
||||
(file-name-directory (magit-file-line "gitdir"))
|
||||
(magit-toplevel)))
|
||||
(let ((rev1 (if amending "HEAD^1" "HEAD"))
|
||||
(rev2 nil))
|
||||
;; Magit may have updated the files without notifying vc, but
|
||||
;; `diff-add-log-current-defuns' relies on vc being up-to-date.
|
||||
(mapc #'vc-file-clearprops (magit-staged-files))
|
||||
(change-log-insert-entries
|
||||
(with-temp-buffer
|
||||
(vc-git-command (current-buffer) 1 nil
|
||||
"diff-index" "--exit-code" "--patch"
|
||||
(and (magit-anything-staged-p) "--cached")
|
||||
rev1 "--")
|
||||
;; `diff-find-source-location' consults these vars.
|
||||
(defvar diff-vc-revisions)
|
||||
(setq-local diff-vc-revisions (list rev1 rev2))
|
||||
(setq-local diff-vc-backend 'Git)
|
||||
(diff-add-log-current-defuns)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-add-change-log-entry (&optional whoami file-name other-window)
|
||||
"Find change log file and add date entry and item for current change.
|
||||
This differs from `add-change-log-entry' (which see) in that
|
||||
it acts on the current hunk in a Magit buffer instead of on
|
||||
a position in a file-visiting buffer."
|
||||
(interactive (list current-prefix-arg
|
||||
(prompt-for-change-log-name)))
|
||||
(pcase-let ((`(,buf ,pos) (magit-diff-visit-file--noselect)))
|
||||
(magit--with-temp-position buf pos
|
||||
(let ((add-log-buffer-file-name-function
|
||||
(lambda ()
|
||||
(or magit-buffer-file-name
|
||||
(buffer-file-name)))))
|
||||
(add-change-log-entry whoami file-name other-window)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-add-change-log-entry-other-window (&optional whoami file-name)
|
||||
"Find change log file in other window and add entry and item.
|
||||
This differs from `add-change-log-entry-other-window' (which see)
|
||||
in that it acts on the current hunk in a Magit buffer instead of
|
||||
on a position in a file-visiting buffer."
|
||||
(interactive (and current-prefix-arg
|
||||
(list current-prefix-arg
|
||||
(prompt-for-change-log-name))))
|
||||
(magit-add-change-log-entry whoami file-name t))
|
||||
|
||||
;;; Edit Line Commit
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-edit-line-commit (&optional type)
|
||||
"Edit the commit that added the current line.
|
||||
|
||||
With a prefix argument edit the commit that removes the line,
|
||||
if any. The commit is determined using `git blame' and made
|
||||
editable using `git rebase --interactive' if it is reachable
|
||||
from `HEAD', or by checking out the commit (or a branch that
|
||||
points at it) otherwise."
|
||||
(interactive (list (and current-prefix-arg 'removal)))
|
||||
(let* ((chunk (magit-current-blame-chunk (or type 'addition)))
|
||||
(rev (oref chunk orig-rev)))
|
||||
(if (equal rev "0000000000000000000000000000000000000000")
|
||||
(message "This line has not been committed yet")
|
||||
(let ((rebase (magit-rev-ancestor-p rev "HEAD"))
|
||||
(file (expand-file-name (oref chunk orig-file)
|
||||
(magit-toplevel))))
|
||||
(if rebase
|
||||
(let ((magit--rebase-published-symbol 'edit-published))
|
||||
(magit-rebase-edit-commit rev (magit-rebase-arguments)))
|
||||
(magit-checkout (or (magit-rev-branch rev) rev)))
|
||||
(unless (and buffer-file-name
|
||||
(file-equal-p file buffer-file-name))
|
||||
(let ((blame-type (and magit-blame-mode magit-blame-type)))
|
||||
(if rebase
|
||||
(set-process-sentinel
|
||||
magit-this-process
|
||||
(lambda (process event)
|
||||
(magit-sequencer-process-sentinel process event)
|
||||
(when (eq (process-status process) 'exit)
|
||||
(find-file file)
|
||||
(when blame-type
|
||||
(magit-blame--pre-blame-setup blame-type)
|
||||
(magit-blame--run (magit-blame-arguments))))))
|
||||
(find-file file)
|
||||
(when blame-type
|
||||
(magit-blame--pre-blame-setup blame-type)
|
||||
(magit-blame--run (magit-blame-arguments))))))))))
|
||||
|
||||
(put 'magit-edit-line-commit 'disabled t)
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-diff-edit-hunk-commit (file)
|
||||
"From a hunk, edit the respective commit and visit the file.
|
||||
|
||||
First visit the file being modified by the hunk at the correct
|
||||
location using `magit-diff-visit-file'. This actually visits a
|
||||
blob. When point is on a diff header, not within an individual
|
||||
hunk, then this visits the blob the first hunk is about.
|
||||
|
||||
Then invoke `magit-edit-line-commit', which uses an interactive
|
||||
rebase to make the commit editable, or if that is not possible
|
||||
because the commit is not reachable from `HEAD' by checking out
|
||||
that commit directly. This also causes the actual worktree file
|
||||
to be visited.
|
||||
|
||||
Neither the blob nor the file buffer are killed when finishing
|
||||
the rebase. If that is undesirable, then it might be better to
|
||||
use `magit-rebase-edit-command' instead of this command."
|
||||
(interactive (list (magit-file-at-point t t)))
|
||||
(let ((magit-diff-visit-previous-blob nil))
|
||||
(with-current-buffer
|
||||
(magit-diff-visit-file--internal file nil #'pop-to-buffer-same-window)
|
||||
(magit-edit-line-commit))))
|
||||
|
||||
(put 'magit-diff-edit-hunk-commit 'disabled t)
|
||||
|
||||
;;; Reshelve
|
||||
|
||||
(defcustom magit-reshelve-since-committer-only nil
|
||||
"Whether `magit-reshelve-since' changes only the committer dates.
|
||||
Otherwise the author dates are also changed."
|
||||
:package-version '(magit . "3.0.0")
|
||||
:group 'magit-commands
|
||||
:type 'boolean)
|
||||
|
||||
;;;###autoload
|
||||
(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
|
||||
be changed. Then read the new date for that commit. The initial
|
||||
minibuffer input and the previous history element offer good
|
||||
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.
|
||||
|
||||
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)))
|
||||
(cond
|
||||
((not rev)
|
||||
(when (and (magit-ref-p backup)
|
||||
(not (magit-y-or-n-p
|
||||
(format "Backup ref %s already exists. Override? " backup))))
|
||||
(user-error "Abort"))
|
||||
(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)
|
||||
(format-time-string
|
||||
"%F %T %z"
|
||||
(+ (floor time)
|
||||
(* offset 60)
|
||||
(- (car (decode-time time)))))))
|
||||
(let* ((start (concat rev "^"))
|
||||
(range (concat start ".." current))
|
||||
(time-rev (adjust (float-time (string-to-number
|
||||
(magit-rev-format "%at" start)))
|
||||
1))
|
||||
(time-now (adjust (float-time)
|
||||
(- (string-to-number
|
||||
(magit-git-string "rev-list" "--count"
|
||||
range))))))
|
||||
(push time-rev magit--reshelve-history)
|
||||
(let ((date (floor
|
||||
(float-time
|
||||
(date-to-time
|
||||
(read-string "Date for first commit: "
|
||||
time-now 'magit--reshelve-history)))))
|
||||
(process-environment process-environment))
|
||||
(push "FILTER_BRANCH_SQUELCH_WARNING=1" process-environment)
|
||||
(magit-with-toplevel
|
||||
(magit-run-git-async
|
||||
"filter-branch" "--force" "--env-filter"
|
||||
(format
|
||||
"case $GIT_COMMIT in %s\nesac"
|
||||
(mapconcat
|
||||
(lambda (rev)
|
||||
(prog1 (concat
|
||||
(format "%s) " rev)
|
||||
(and (not magit-reshelve-since-committer-only)
|
||||
(format "export GIT_AUTHOR_DATE=\"%s\"; " date))
|
||||
(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
|
||||
(lambda (process event)
|
||||
(when (memq (process-status process) '(exit signal))
|
||||
(if (> (process-exit-status process) 0)
|
||||
(magit-process-sentinel process event)
|
||||
(process-put process 'inhibit-refresh t)
|
||||
(magit-process-sentinel process event)
|
||||
(magit-run-git "update-ref" "-d" backup))))))))))))
|
||||
|
||||
;;; Revision Stack
|
||||
|
||||
(defvar magit-revision-stack nil)
|
||||
|
||||
(defcustom magit-pop-revision-stack-format
|
||||
'("[%N: %h] " "%N: %H\n %s\n" "\\[\\([0-9]+\\)[]:]")
|
||||
"Control how `magit-pop-revision-stack' inserts a revision.
|
||||
|
||||
The command `magit-pop-revision-stack' inserts a representation
|
||||
of the revision last pushed to the `magit-revision-stack' into
|
||||
the current buffer. It inserts text at point and/or near the end
|
||||
of the buffer, and removes the consumed revision from the stack.
|
||||
|
||||
The entries on the stack have the format (HASH TOPLEVEL) and this
|
||||
option has the format (POINT-FORMAT EOB-FORMAT INDEX-REGEXP), all
|
||||
of which may be nil or a string (though either one of EOB-FORMAT
|
||||
or POINT-FORMAT should be a string, and if INDEX-REGEXP is
|
||||
non-nil, then the two formats should be too).
|
||||
|
||||
First INDEX-REGEXP is used to find the previously inserted entry,
|
||||
by searching backward from point. The first submatch must match
|
||||
the index number. That number is incremented by one, and becomes
|
||||
the index number of the entry to be inserted. If you don't want
|
||||
to number the inserted revisions, then use nil for INDEX-REGEXP.
|
||||
|
||||
If INDEX-REGEXP is non-nil, then both POINT-FORMAT and EOB-FORMAT
|
||||
should contain \"%N\", which is replaced with the number that was
|
||||
determined in the previous step.
|
||||
|
||||
Both formats, if non-nil and after removing %N, are then expanded
|
||||
using `git show --format=FORMAT ...' inside TOPLEVEL.
|
||||
|
||||
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")
|
||||
:group 'magit-commands
|
||||
:type '(list (choice (string :tag "Insert at point format")
|
||||
(cons (string :tag "Insert at point format")
|
||||
(repeat (string :tag "Argument to git show")))
|
||||
(const :tag "Don't insert at point" nil))
|
||||
(choice (string :tag "Insert at eob format")
|
||||
(cons (string :tag "Insert at eob format")
|
||||
(repeat (string :tag "Argument to git show")))
|
||||
(const :tag "Don't insert at eob" nil))
|
||||
(choice (regexp :tag "Find index regexp")
|
||||
(const :tag "Don't number entries" nil))))
|
||||
|
||||
(defcustom magit-copy-revision-abbreviated nil
|
||||
"Whether to save abbreviated revision to `kill-ring' and `magit-revision-stack'."
|
||||
:package-version '(magit . "3.0.0")
|
||||
:group 'magit-miscellaneous
|
||||
:type 'boolean)
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-pop-revision-stack (rev toplevel)
|
||||
"Insert a representation of a revision into the current buffer.
|
||||
|
||||
Pop a revision from the `magit-revision-stack' and insert it into
|
||||
the current buffer according to `magit-pop-revision-stack-format'.
|
||||
Revisions can be put on the stack using `magit-copy-section-value'
|
||||
and `magit-copy-buffer-revision'.
|
||||
|
||||
If the stack is empty or with a prefix argument, instead read a
|
||||
revision in the minibuffer. By using the minibuffer history this
|
||||
allows selecting an item which was popped earlier or to insert an
|
||||
arbitrary reference or revision without first pushing it onto the
|
||||
stack.
|
||||
|
||||
When reading the revision from the minibuffer, then it might not
|
||||
be possible to guess the correct repository. When this command
|
||||
is called inside a repository (e.g. while composing a commit
|
||||
message), then that repository is used. Otherwise (e.g. while
|
||||
composing an email) then the repository recorded for the top
|
||||
element of the stack is used (even though we insert another
|
||||
revision). If not called inside a repository and with an empty
|
||||
stack, or with two prefix arguments, then read the repository in
|
||||
the minibuffer too."
|
||||
(interactive
|
||||
(if (or current-prefix-arg (not magit-revision-stack))
|
||||
(let ((default-directory
|
||||
(or (and (not (= (prefix-numeric-value current-prefix-arg) 16))
|
||||
(or (magit-toplevel)
|
||||
(cadr (car magit-revision-stack))))
|
||||
(magit-read-repository))))
|
||||
(list (magit-read-branch-or-commit "Insert revision")
|
||||
default-directory))
|
||||
(push (caar magit-revision-stack) magit-revision-history)
|
||||
(pop magit-revision-stack)))
|
||||
(if rev
|
||||
(pcase-let ((`(,pnt-format ,eob-format ,idx-format)
|
||||
magit-pop-revision-stack-format))
|
||||
(let ((default-directory toplevel)
|
||||
(idx (and idx-format
|
||||
(save-excursion
|
||||
(if (re-search-backward idx-format nil t)
|
||||
(number-to-string
|
||||
(1+ (string-to-number (match-string 1))))
|
||||
"1"))))
|
||||
pnt-args eob-args)
|
||||
(when (listp pnt-format)
|
||||
(setq pnt-args (cdr pnt-format))
|
||||
(setq pnt-format (car pnt-format)))
|
||||
(when (listp eob-format)
|
||||
(setq eob-args (cdr eob-format))
|
||||
(setq eob-format (car eob-format)))
|
||||
(when pnt-format
|
||||
(when idx-format
|
||||
(setq pnt-format
|
||||
(replace-regexp-in-string "%N" idx pnt-format t t)))
|
||||
(magit-rev-insert-format pnt-format rev pnt-args)
|
||||
(backward-delete-char 1))
|
||||
(when eob-format
|
||||
(when idx-format
|
||||
(setq eob-format
|
||||
(replace-regexp-in-string "%N" idx eob-format t t)))
|
||||
(save-excursion
|
||||
(goto-char (point-max))
|
||||
(skip-syntax-backward ">s-")
|
||||
(beginning-of-line)
|
||||
(if (and comment-start (looking-at comment-start))
|
||||
(while (looking-at comment-start)
|
||||
(forward-line -1))
|
||||
(forward-line)
|
||||
(unless (= (current-column) 0)
|
||||
(insert ?\n)))
|
||||
(insert ?\n)
|
||||
(magit-rev-insert-format eob-format rev eob-args)
|
||||
(backward-delete-char 1)))))
|
||||
(user-error "Revision stack is empty")))
|
||||
|
||||
(define-key git-commit-mode-map
|
||||
(kbd "C-c C-w") 'magit-pop-revision-stack)
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-copy-section-value (arg)
|
||||
"Save the value of the current section for later use.
|
||||
|
||||
Save the section value to the `kill-ring', and, provided that
|
||||
the current section is a commit, branch, or tag section, push
|
||||
the (referenced) revision to the `magit-revision-stack' for use
|
||||
with `magit-pop-revision-stack'.
|
||||
|
||||
When `magit-copy-revision-abbreviated' is non-nil, save the
|
||||
abbreviated revision to the `kill-ring' and the
|
||||
`magit-revision-stack'.
|
||||
|
||||
When the current section is a branch or a tag, and a prefix
|
||||
argument is used, then save the revision at its tip to the
|
||||
`kill-ring' instead of the reference name.
|
||||
|
||||
When the region is active, then save that to the `kill-ring',
|
||||
like `kill-ring-save' would, instead of behaving as described
|
||||
above. If a prefix argument is used and the region is within
|
||||
a hunk, then strip the diff marker column and keep only either
|
||||
the added or removed lines, depending on the sign of the prefix
|
||||
argument."
|
||||
(interactive "P")
|
||||
(cond
|
||||
((and arg
|
||||
(magit-section-internal-region-p)
|
||||
(magit-section-match 'hunk))
|
||||
(kill-new
|
||||
(thread-last (buffer-substring-no-properties
|
||||
(region-beginning)
|
||||
(region-end))
|
||||
(replace-regexp-in-string
|
||||
(format "^\\%c.*\n?" (if (< (prefix-numeric-value arg) 0) ?+ ?-))
|
||||
"")
|
||||
(replace-regexp-in-string "^[ \\+\\-]" "")))
|
||||
(deactivate-mark))
|
||||
((use-region-p)
|
||||
(call-interactively #'copy-region-as-kill))
|
||||
(t
|
||||
(when-let ((section (magit-current-section))
|
||||
(value (oref section value)))
|
||||
(magit-section-case
|
||||
((branch commit module-commit tag)
|
||||
(let ((default-directory default-directory) ref)
|
||||
(magit-section-case
|
||||
((branch tag)
|
||||
(setq ref value))
|
||||
(module-commit
|
||||
(setq default-directory
|
||||
(file-name-as-directory
|
||||
(expand-file-name (magit-section-parent-value section)
|
||||
(magit-toplevel))))))
|
||||
(setq value (magit-rev-parse
|
||||
(and magit-copy-revision-abbreviated "--short")
|
||||
value))
|
||||
(push (list value default-directory) magit-revision-stack)
|
||||
(kill-new (message "%s" (or (and current-prefix-arg ref)
|
||||
value)))))
|
||||
(t (kill-new (message "%s" value))))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-copy-buffer-revision ()
|
||||
"Save the revision of the current buffer for later use.
|
||||
|
||||
Save the revision shown in the current buffer to the `kill-ring'
|
||||
and push it to the `magit-revision-stack'.
|
||||
|
||||
This command is mainly intended for use in `magit-revision-mode'
|
||||
buffers, the only buffers where it is always unambiguous exactly
|
||||
which revision should be saved.
|
||||
|
||||
Most other Magit buffers usually show more than one revision, in
|
||||
some way or another, so this command has to select one of them,
|
||||
and that choice might not always be the one you think would have
|
||||
been the best pick.
|
||||
|
||||
In such buffers it is often more useful to save the value of
|
||||
the current section instead, using `magit-copy-section-value'.
|
||||
|
||||
When the region is active, then save that to the `kill-ring',
|
||||
like `kill-ring-save' would, instead of behaving as described
|
||||
above.
|
||||
|
||||
When `magit-copy-revision-abbreviated' is non-nil, save the
|
||||
abbreviated revision to the `kill-ring' and the
|
||||
`magit-revision-stack'."
|
||||
(interactive)
|
||||
(if (use-region-p)
|
||||
(call-interactively #'copy-region-as-kill)
|
||||
(when-let ((rev (or magit-buffer-revision
|
||||
(cl-case major-mode
|
||||
(magit-diff-mode
|
||||
(if (string-match "\\.\\.\\.?\\(.+\\)"
|
||||
magit-buffer-range)
|
||||
(match-string 1 magit-buffer-range)
|
||||
magit-buffer-range))
|
||||
(magit-status-mode "HEAD")))))
|
||||
(when (magit-commit-p rev)
|
||||
(setq rev (magit-rev-parse
|
||||
(and magit-copy-revision-abbreviated "--short")
|
||||
rev))
|
||||
(push (list rev default-directory) magit-revision-stack)
|
||||
(kill-new (message "%s" rev))))))
|
||||
|
||||
;;; Miscellaneous
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-abort-dwim ()
|
||||
"Abort current operation.
|
||||
Depending on the context, this will abort a merge, a rebase, a
|
||||
patch application, a cherry-pick, a revert, or a bisect."
|
||||
(interactive)
|
||||
(cond ((magit-merge-in-progress-p) (magit-merge-abort))
|
||||
((magit-rebase-in-progress-p) (magit-rebase-abort))
|
||||
((magit-am-in-progress-p) (magit-am-abort))
|
||||
((magit-sequencer-in-progress-p) (magit-sequencer-abort))
|
||||
((magit-bisect-in-progress-p) (magit-bisect-reset))))
|
||||
|
||||
;;; _
|
||||
(provide 'magit-extras)
|
||||
;;; magit-extras.el ends here
|
BIN
elpa/magit-20210414.1306/magit-extras.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-extras.elc
Normal file
Binary file not shown.
187
elpa/magit-20210414.1306/magit-fetch.el
Normal file
187
elpa/magit-20210414.1306/magit-fetch.el
Normal file
|
@ -0,0 +1,187 @@
|
|||
;;; magit-fetch.el --- download objects and refs -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2008-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
|
||||
;; Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
;; Magit is free software; you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
;;
|
||||
;; Magit is distributed in the hope that it will be useful, but WITHOUT
|
||||
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
;; License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Magit. If not, see http://www.gnu.org/licenses.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; This library implements fetch commands.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'magit)
|
||||
|
||||
;;; Options
|
||||
|
||||
(defcustom magit-fetch-modules-jobs 4
|
||||
"Number of submodules to fetch in parallel.
|
||||
Ignored for Git versions before v2.8.0."
|
||||
:package-version '(magit . "2.12.0")
|
||||
:group 'magit-commands
|
||||
:type '(choice (const :tag "one at a time" nil) number))
|
||||
|
||||
;;; Commands
|
||||
|
||||
;;;###autoload (autoload 'magit-fetch "magit-fetch" nil t)
|
||||
(transient-define-prefix magit-fetch ()
|
||||
"Fetch from another repository."
|
||||
:man-page "git-fetch"
|
||||
["Arguments"
|
||||
("-p" "Prune deleted branches" ("-p" "--prune"))
|
||||
("-t" "Fetch all tags" ("-t" "--tags"))
|
||||
(7 "-u" "Fetch full history" "--unshallow")]
|
||||
["Fetch from"
|
||||
("p" magit-fetch-from-pushremote)
|
||||
("u" magit-fetch-from-upstream)
|
||||
("e" "elsewhere" magit-fetch-other)
|
||||
("a" "all remotes" magit-fetch-all)]
|
||||
["Fetch"
|
||||
("o" "another branch" magit-fetch-branch)
|
||||
("r" "explicit refspec" magit-fetch-refspec)
|
||||
("m" "submodules" magit-fetch-modules)]
|
||||
["Configure"
|
||||
("C" "variables..." magit-branch-configure)])
|
||||
|
||||
(defun magit-fetch-arguments ()
|
||||
(transient-args 'magit-fetch))
|
||||
|
||||
(defun magit-git-fetch (remote args)
|
||||
(run-hooks 'magit-credential-hook)
|
||||
(magit-run-git-async "fetch" remote args))
|
||||
|
||||
;;;###autoload (autoload 'magit-fetch-from-pushremote "magit-fetch" nil t)
|
||||
(transient-define-suffix magit-fetch-from-pushremote (args)
|
||||
"Fetch from the current push-remote.
|
||||
|
||||
With a prefix argument or when the push-remote is either not
|
||||
configured or unusable, then let the user first configure the
|
||||
push-remote."
|
||||
:description 'magit-fetch--pushremote-description
|
||||
(interactive (list (magit-fetch-arguments)))
|
||||
(let ((remote (magit-get-push-remote)))
|
||||
(when (or current-prefix-arg
|
||||
(not (member remote (magit-list-remotes))))
|
||||
(let ((var (magit--push-remote-variable)))
|
||||
(setq remote
|
||||
(magit-read-remote (format "Set %s and fetch from there" var)))
|
||||
(magit-set remote var)))
|
||||
(magit-git-fetch remote args)))
|
||||
|
||||
(defun magit-fetch--pushremote-description ()
|
||||
(let* ((branch (magit-get-current-branch))
|
||||
(remote (magit-get-push-remote branch))
|
||||
(v (magit--push-remote-variable branch t)))
|
||||
(cond
|
||||
((member remote (magit-list-remotes)) remote)
|
||||
(remote
|
||||
(format "%s, replacing invalid" v))
|
||||
(t
|
||||
(format "%s, setting that" v)))))
|
||||
|
||||
;;;###autoload (autoload 'magit-fetch-from-upstream "magit-fetch" nil t)
|
||||
(transient-define-suffix magit-fetch-from-upstream (remote args)
|
||||
"Fetch from the \"current\" remote, usually the upstream.
|
||||
|
||||
If the upstream is configured for the current branch and names
|
||||
an existing remote, then use that. Otherwise try to use another
|
||||
remote: If only a single remote is configured, then use that.
|
||||
Otherwise if a remote named \"origin\" exists, then use that.
|
||||
|
||||
If no remote can be determined, then this command is not available
|
||||
from the `magit-fetch' transient prefix and invoking it directly
|
||||
results in an error."
|
||||
:if (lambda () (magit-get-current-remote t))
|
||||
:description (lambda () (magit-get-current-remote t))
|
||||
(interactive (list (magit-get-current-remote t)
|
||||
(magit-fetch-arguments)))
|
||||
(unless remote
|
||||
(error "The \"current\" remote could not be determined"))
|
||||
(magit-git-fetch remote args))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-fetch-other (remote args)
|
||||
"Fetch from another repository."
|
||||
(interactive (list (magit-read-remote "Fetch remote")
|
||||
(magit-fetch-arguments)))
|
||||
(magit-git-fetch remote args))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-fetch-branch (remote branch args)
|
||||
"Fetch a BRANCH from a REMOTE."
|
||||
(interactive
|
||||
(let ((remote (magit-read-remote-or-url "Fetch from remote or url")))
|
||||
(list remote
|
||||
(magit-read-remote-branch "Fetch branch" remote)
|
||||
(magit-fetch-arguments))))
|
||||
(magit-git-fetch remote (cons branch args)))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-fetch-refspec (remote refspec args)
|
||||
"Fetch a REFSPEC from a REMOTE."
|
||||
(interactive
|
||||
(let ((remote (magit-read-remote-or-url "Fetch from remote or url")))
|
||||
(list remote
|
||||
(magit-read-refspec "Fetch using refspec" remote)
|
||||
(magit-fetch-arguments))))
|
||||
(magit-git-fetch remote (cons refspec args)))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-fetch-all (args)
|
||||
"Fetch from all remotes."
|
||||
(interactive (list (magit-fetch-arguments)))
|
||||
(magit-git-fetch nil (cons "--all" args)))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-fetch-all-prune ()
|
||||
"Fetch from all remotes, and prune.
|
||||
Prune remote tracking branches for branches that have been
|
||||
removed on the respective remote."
|
||||
(interactive)
|
||||
(run-hooks 'magit-credential-hook)
|
||||
(magit-run-git-async "remote" "update" "--prune"))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-fetch-all-no-prune ()
|
||||
"Fetch from all remotes."
|
||||
(interactive)
|
||||
(run-hooks 'magit-credential-hook)
|
||||
(magit-run-git-async "remote" "update"))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-fetch-modules (&optional all)
|
||||
"Fetch all submodules.
|
||||
|
||||
Option `magit-fetch-modules-jobs' controls how many submodules
|
||||
are being fetched in parallel. Also fetch the super-repository,
|
||||
because `git-fetch' does not support not doing that. With a
|
||||
prefix argument fetch all remotes."
|
||||
(interactive "P")
|
||||
(magit-with-toplevel
|
||||
(magit-run-git-async
|
||||
"fetch" "--verbose" "--recurse-submodules"
|
||||
(and magit-fetch-modules-jobs
|
||||
(version<= "2.8.0" (magit-git-version))
|
||||
(list "-j" (number-to-string magit-fetch-modules-jobs)))
|
||||
(and all "--all"))))
|
||||
|
||||
;;; _
|
||||
(provide 'magit-fetch)
|
||||
;;; magit-fetch.el ends here
|
BIN
elpa/magit-20210414.1306/magit-fetch.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-fetch.elc
Normal file
Binary file not shown.
526
elpa/magit-20210414.1306/magit-files.el
Normal file
526
elpa/magit-20210414.1306/magit-files.el
Normal file
|
@ -0,0 +1,526 @@
|
|||
;;; magit-files.el --- finding files -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2010-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
|
||||
;; Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
;; Magit is free software; you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
;;
|
||||
;; Magit is distributed in the hope that it will be useful, but WITHOUT
|
||||
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
;; License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Magit. If not, see http://www.gnu.org/licenses.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; This library implements support for finding blobs, staged files,
|
||||
;; and Git configuration files. It also implements modes useful in
|
||||
;; buffers visiting files and blobs, and the commands used by those
|
||||
;; modes.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'magit)
|
||||
|
||||
;;; Find Blob
|
||||
|
||||
(defvar magit-find-file-hook nil)
|
||||
(add-hook 'magit-find-file-hook #'magit-blob-mode)
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-find-file (rev file)
|
||||
"View FILE from REV.
|
||||
Switch to a buffer visiting blob REV:FILE, creating one if none
|
||||
already exists. If prior to calling this command the current
|
||||
buffer and/or cursor position is about the same file, then go
|
||||
to the line and column corresponding to that location."
|
||||
(interactive (magit-find-file-read-args "Find file"))
|
||||
(magit-find-file--internal rev file #'pop-to-buffer-same-window))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-find-file-other-window (rev file)
|
||||
"View FILE from REV, in another window.
|
||||
Switch to a buffer visiting blob REV:FILE, creating one if none
|
||||
already exists. If prior to calling this command the current
|
||||
buffer and/or cursor position is about the same file, then go to
|
||||
the line and column corresponding to that location."
|
||||
(interactive (magit-find-file-read-args "Find file in other window"))
|
||||
(magit-find-file--internal rev file #'switch-to-buffer-other-window))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-find-file-other-frame (rev file)
|
||||
"View FILE from REV, in another frame.
|
||||
Switch to a buffer visiting blob REV:FILE, creating one if none
|
||||
already exists. If prior to calling this command the current
|
||||
buffer and/or cursor position is about the same file, then go to
|
||||
the line and column corresponding to that location."
|
||||
(interactive (magit-find-file-read-args "Find file in other frame"))
|
||||
(magit-find-file--internal rev file #'switch-to-buffer-other-frame))
|
||||
|
||||
(defun magit-find-file-read-args (prompt)
|
||||
(let ((pseudo-revs '("{worktree}" "{index}")))
|
||||
(if-let ((rev (magit-completing-read "Find file from revision"
|
||||
(append pseudo-revs
|
||||
(magit-list-refnames nil t))
|
||||
nil nil nil 'magit-revision-history
|
||||
(or (magit-branch-or-commit-at-point)
|
||||
(magit-get-current-branch)))))
|
||||
(list rev (magit-read-file-from-rev (if (member rev pseudo-revs)
|
||||
"HEAD"
|
||||
rev)
|
||||
prompt))
|
||||
(user-error "Nothing selected"))))
|
||||
|
||||
(defun magit-find-file--internal (rev file fn)
|
||||
(let ((buf (magit-find-file-noselect rev file))
|
||||
line col)
|
||||
(when-let ((visited-file (magit-file-relative-name)))
|
||||
(setq line (line-number-at-pos))
|
||||
(setq col (current-column))
|
||||
(cond
|
||||
((not (equal visited-file file)))
|
||||
((equal magit-buffer-revision rev))
|
||||
((equal rev "{worktree}")
|
||||
(setq line (magit-diff-visit--offset file magit-buffer-revision line)))
|
||||
((equal rev "{index}")
|
||||
(setq line (magit-diff-visit--offset file nil line)))
|
||||
(magit-buffer-revision
|
||||
(setq line (magit-diff-visit--offset
|
||||
file (concat magit-buffer-revision ".." rev) line)))
|
||||
(t
|
||||
(setq line (magit-diff-visit--offset file (list "-R" rev) line)))))
|
||||
(funcall fn buf)
|
||||
(when line
|
||||
(with-current-buffer buf
|
||||
(widen)
|
||||
(goto-char (point-min))
|
||||
(forward-line (1- line))
|
||||
(move-to-column col)))
|
||||
buf))
|
||||
|
||||
(defun magit-find-file-noselect (rev file)
|
||||
"Read FILE from REV into a buffer and return the buffer.
|
||||
REV is a revision or one of \"{worktree}\" or \"{index}\".
|
||||
FILE must be relative to the top directory of the repository."
|
||||
(magit-find-file-noselect-1 rev file))
|
||||
|
||||
(defun magit-find-file-noselect-1 (rev file &optional revert)
|
||||
"Read FILE from REV into a buffer and return the buffer.
|
||||
REV is a revision or one of \"{worktree}\" or \"{index}\".
|
||||
FILE must be relative to the top directory of the repository.
|
||||
Non-nil REVERT means to revert the buffer. If `ask-revert',
|
||||
then only after asking. A non-nil value for REVERT is ignored if REV is
|
||||
\"{worktree}\"."
|
||||
(if (equal rev "{worktree}")
|
||||
(find-file-noselect (expand-file-name file (magit-toplevel)))
|
||||
(let ((topdir (magit-toplevel)))
|
||||
(when (file-name-absolute-p file)
|
||||
(setq file (file-relative-name file topdir)))
|
||||
(with-current-buffer (magit-get-revision-buffer-create rev file)
|
||||
(when (or (not magit-buffer-file-name)
|
||||
(if (eq revert 'ask-revert)
|
||||
(y-or-n-p (format "%s already exists; revert it? "
|
||||
(buffer-name))))
|
||||
revert)
|
||||
(setq magit-buffer-revision
|
||||
(if (equal rev "{index}")
|
||||
"{index}"
|
||||
(magit-rev-format "%H" rev)))
|
||||
(setq magit-buffer-refname rev)
|
||||
(setq magit-buffer-file-name (expand-file-name file topdir))
|
||||
(setq default-directory
|
||||
(let ((dir (file-name-directory magit-buffer-file-name)))
|
||||
(if (file-exists-p dir) dir topdir)))
|
||||
(setq-local revert-buffer-function #'magit-revert-rev-file-buffer)
|
||||
(revert-buffer t t)
|
||||
(run-hooks (if (equal rev "{index}")
|
||||
'magit-find-index-hook
|
||||
'magit-find-file-hook)))
|
||||
(current-buffer)))))
|
||||
|
||||
(defun magit-get-revision-buffer-create (rev file)
|
||||
(magit-get-revision-buffer rev file t))
|
||||
|
||||
(defun magit-get-revision-buffer (rev file &optional create)
|
||||
(funcall (if create 'get-buffer-create 'get-buffer)
|
||||
(format "%s.~%s~" file (subst-char-in-string ?/ ?_ rev))))
|
||||
|
||||
(defun magit-revert-rev-file-buffer (_ignore-auto noconfirm)
|
||||
(when (or noconfirm
|
||||
(and (not (buffer-modified-p))
|
||||
(catch 'found
|
||||
(dolist (regexp revert-without-query)
|
||||
(when (string-match regexp magit-buffer-file-name)
|
||||
(throw 'found t)))))
|
||||
(yes-or-no-p (format "Revert buffer from Git %s? "
|
||||
(if (equal magit-buffer-refname "{index}")
|
||||
"index"
|
||||
(concat "revision " magit-buffer-refname)))))
|
||||
(let* ((inhibit-read-only t)
|
||||
(default-directory (magit-toplevel))
|
||||
(file (file-relative-name magit-buffer-file-name))
|
||||
(coding-system-for-read (or coding-system-for-read 'undecided)))
|
||||
(erase-buffer)
|
||||
(magit-git-insert "cat-file" "-p"
|
||||
(if (equal magit-buffer-refname "{index}")
|
||||
(concat ":" file)
|
||||
(concat magit-buffer-refname ":" file)))
|
||||
(setq buffer-file-coding-system last-coding-system-used))
|
||||
(let ((buffer-file-name magit-buffer-file-name)
|
||||
(after-change-major-mode-hook
|
||||
(remq 'global-diff-hl-mode-enable-in-buffers
|
||||
after-change-major-mode-hook)))
|
||||
(normal-mode t))
|
||||
(setq buffer-read-only t)
|
||||
(set-buffer-modified-p nil)
|
||||
(goto-char (point-min))))
|
||||
|
||||
;;; Find Index
|
||||
|
||||
(defvar magit-find-index-hook nil)
|
||||
|
||||
(defun magit-find-file-index-noselect (file &optional revert)
|
||||
"Read FILE from the index into a buffer and return the buffer.
|
||||
FILE must to be relative to the top directory of the repository."
|
||||
(magit-find-file-noselect-1 "{index}" file (or revert 'ask-revert)))
|
||||
|
||||
(defun magit-update-index ()
|
||||
"Update the index with the contents of the current buffer.
|
||||
The current buffer has to be visiting a file in the index, which
|
||||
is done using `magit-find-index-noselect'."
|
||||
(interactive)
|
||||
(let ((file (magit-file-relative-name)))
|
||||
(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-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"))
|
||||
(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")))
|
||||
(message "Abort")))
|
||||
(--when-let (magit-get-mode-buffer 'magit-status-mode)
|
||||
(with-current-buffer it (magit-refresh)))
|
||||
t)
|
||||
|
||||
;;; Find Config File
|
||||
|
||||
(defun magit-find-git-config-file (filename &optional wildcards)
|
||||
"Edit a file located in the current repository's git directory.
|
||||
|
||||
When \".git\", located at the root of the working tree, is a
|
||||
regular file, then that makes it cumbersome to open a file
|
||||
located in the actual git directory.
|
||||
|
||||
This command is like `find-file', except that it temporarily
|
||||
binds `default-directory' to the actual git directory, while
|
||||
reading the FILENAME."
|
||||
(interactive
|
||||
(let ((default-directory (magit-git-dir)))
|
||||
(find-file-read-args "Find file: "
|
||||
(confirm-nonexistent-file-or-buffer))))
|
||||
(find-file filename wildcards))
|
||||
|
||||
(defun magit-find-git-config-file-other-window (filename &optional wildcards)
|
||||
"Edit a file located in the current repository's git directory, in another window.
|
||||
|
||||
When \".git\", located at the root of the working tree, is a
|
||||
regular file, then that makes it cumbersome to open a file
|
||||
located in the actual git directory.
|
||||
|
||||
This command is like `find-file-other-window', except that it
|
||||
temporarily binds `default-directory' to the actual git
|
||||
directory, while reading the FILENAME."
|
||||
(interactive
|
||||
(let ((default-directory (magit-git-dir)))
|
||||
(find-file-read-args "Find file in other window: "
|
||||
(confirm-nonexistent-file-or-buffer))))
|
||||
(find-file-other-window filename wildcards))
|
||||
|
||||
(defun magit-find-git-config-file-other-frame (filename &optional wildcards)
|
||||
"Edit a file located in the current repository's git directory, in another frame.
|
||||
|
||||
When \".git\", located at the root of the working tree, is a
|
||||
regular file, then that makes it cumbersome to open a file
|
||||
located in the actual git directory.
|
||||
|
||||
This command is like `find-file-other-frame', except that it
|
||||
temporarily binds `default-directory' to the actual git
|
||||
directory, while reading the FILENAME."
|
||||
(interactive
|
||||
(let ((default-directory (magit-git-dir)))
|
||||
(find-file-read-args "Find file in other frame: "
|
||||
(confirm-nonexistent-file-or-buffer))))
|
||||
(find-file-other-frame filename wildcards))
|
||||
|
||||
;;; File Dispatch
|
||||
|
||||
;;;###autoload (autoload 'magit-file-dispatch "magit" nil t)
|
||||
(transient-define-prefix magit-file-dispatch ()
|
||||
"Invoke a Magit command that acts on the visited file.
|
||||
When invoked outside a file-visiting buffer, then fall back
|
||||
to `magit-dispatch'."
|
||||
:info-manual "(magit) Minor Mode for Buffers Visiting Files"
|
||||
["Actions"
|
||||
[("s" "Stage" magit-stage-file)
|
||||
("u" "Unstage" magit-unstage-file)
|
||||
("c" "Commit" magit-commit)
|
||||
("e" "Edit line" magit-edit-line-commit)]
|
||||
[("D" "Diff..." magit-diff)
|
||||
("d" "Diff" magit-diff-buffer-file)
|
||||
("g" "Status" magit-status-here)]
|
||||
[("L" "Log..." magit-log)
|
||||
("l" "Log" magit-log-buffer-file)
|
||||
("t" "Trace" magit-log-trace-definition)]
|
||||
[("B" "Blame..." magit-blame)
|
||||
("b" "Blame" magit-blame-addition)
|
||||
("r" "...removal" magit-blame-removal)
|
||||
("f" "...reverse" magit-blame-reverse)
|
||||
("m" "Blame echo" magit-blame-echo)
|
||||
("q" "Quit blame" magit-blame-quit)]
|
||||
[("p" "Prev blob" magit-blob-previous)
|
||||
("n" "Next blob" magit-blob-next)
|
||||
("v" "Goto blob" magit-find-file)
|
||||
("V" "Goto file" magit-blob-visit-file)]
|
||||
[(5 "C-c r" "Rename file" magit-file-rename)
|
||||
(5 "C-c d" "Delete file" magit-file-delete)
|
||||
(5 "C-c u" "Untrack file" magit-file-untrack)
|
||||
(5 "C-c c" "Checkout file" magit-file-checkout)]]
|
||||
(interactive)
|
||||
(transient-setup
|
||||
(if (magit-file-relative-name)
|
||||
'magit-file-dispatch
|
||||
'magit-dispatch)))
|
||||
|
||||
;;; Blob Mode
|
||||
|
||||
(defvar magit-blob-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map "p" 'magit-blob-previous)
|
||||
(define-key map "n" 'magit-blob-next)
|
||||
(define-key map "b" 'magit-blame-addition)
|
||||
(define-key map "r" 'magit-blame-removal)
|
||||
(define-key map "f" 'magit-blame-reverse)
|
||||
(define-key map "q" 'magit-kill-this-buffer)
|
||||
map)
|
||||
"Keymap for `magit-blob-mode'.")
|
||||
|
||||
(define-minor-mode magit-blob-mode
|
||||
"Enable some Magit features in blob-visiting buffers.
|
||||
|
||||
Currently this only adds the following key bindings.
|
||||
\n\\{magit-blob-mode-map}"
|
||||
:package-version '(magit . "2.3.0"))
|
||||
|
||||
(defun magit-blob-next ()
|
||||
"Visit the next blob which modified the current file."
|
||||
(interactive)
|
||||
(if magit-buffer-file-name
|
||||
(magit-blob-visit (or (magit-blob-successor magit-buffer-revision
|
||||
magit-buffer-file-name)
|
||||
magit-buffer-file-name))
|
||||
(if (buffer-file-name (buffer-base-buffer))
|
||||
(user-error "You have reached the end of time")
|
||||
(user-error "Buffer isn't visiting a file or blob"))))
|
||||
|
||||
(defun magit-blob-previous ()
|
||||
"Visit the previous blob which modified the current file."
|
||||
(interactive)
|
||||
(if-let ((file (or magit-buffer-file-name
|
||||
(buffer-file-name (buffer-base-buffer)))))
|
||||
(--if-let (magit-blob-ancestor magit-buffer-revision file)
|
||||
(magit-blob-visit it)
|
||||
(user-error "You have reached the beginning of time"))
|
||||
(user-error "Buffer isn't visiting a file or blob")))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-blob-visit-file ()
|
||||
"View the file from the worktree corresponding to the current blob.
|
||||
When visiting a blob or the version from the index, then go to
|
||||
the same location in the respective file in the working tree."
|
||||
(interactive)
|
||||
(if-let ((file (magit-file-relative-name)))
|
||||
(magit-find-file--internal "{worktree}" file #'pop-to-buffer-same-window)
|
||||
(user-error "Not visiting a blob")))
|
||||
|
||||
(defun magit-blob-visit (blob-or-file)
|
||||
(if (stringp blob-or-file)
|
||||
(find-file blob-or-file)
|
||||
(pcase-let ((`(,rev ,file) blob-or-file))
|
||||
(magit-find-file rev file)
|
||||
(apply #'message "%s (%s %s ago)"
|
||||
(magit-rev-format "%s" rev)
|
||||
(magit--age (magit-rev-format "%ct" rev))))))
|
||||
|
||||
(defun magit-blob-ancestor (rev file)
|
||||
(let ((lines (magit-with-toplevel
|
||||
(magit-git-lines "log" "-2" "--format=%H" "--name-only"
|
||||
"--follow" (or rev "HEAD") "--" file))))
|
||||
(if rev (cddr lines) (butlast lines 2))))
|
||||
|
||||
(defun magit-blob-successor (rev file)
|
||||
(let ((lines (magit-with-toplevel
|
||||
(magit-git-lines "log" "--format=%H" "--name-only" "--follow"
|
||||
"HEAD" "--" file))))
|
||||
(catch 'found
|
||||
(while lines
|
||||
(if (equal (nth 2 lines) rev)
|
||||
(throw 'found (list (nth 0 lines) (nth 1 lines)))
|
||||
(setq lines (nthcdr 2 lines)))))))
|
||||
|
||||
;;; File Commands
|
||||
|
||||
(defun magit-file-rename (file newname)
|
||||
"Rename or move FILE to NEWNAME.
|
||||
NEWNAME may be a file or directory name. If FILE isn't tracked in
|
||||
Git, fallback to using `rename-file'."
|
||||
(interactive
|
||||
(let* ((file (magit-read-file "Rename file"))
|
||||
(dir (file-name-directory file))
|
||||
(newname (read-file-name (format "Move %s to destination: " file)
|
||||
(and dir (expand-file-name dir)))))
|
||||
(list (expand-file-name file (magit-toplevel))
|
||||
(expand-file-name newname))))
|
||||
(let ((oldbuf (get-file-buffer file))
|
||||
(dstdir (file-name-directory newname))
|
||||
(dstfile (if (directory-name-p newname)
|
||||
(concat newname (file-name-nondirectory file))
|
||||
newname)))
|
||||
(when (and oldbuf (buffer-modified-p oldbuf))
|
||||
(user-error "Save %s before moving it" file))
|
||||
(when (file-exists-p dstfile)
|
||||
(user-error "%s already exists" dstfile))
|
||||
(unless (file-exists-p dstdir)
|
||||
(user-error "Destination directory %s does not exist" dstdir))
|
||||
(if (magit-file-tracked-p (magit-convert-filename-for-git file))
|
||||
(magit-call-git "mv"
|
||||
(magit-convert-filename-for-git file)
|
||||
(magit-convert-filename-for-git newname))
|
||||
(rename-file file newname current-prefix-arg))
|
||||
(when oldbuf
|
||||
(with-current-buffer oldbuf
|
||||
(let ((buffer-read-only buffer-read-only))
|
||||
(set-visited-file-name dstfile nil t))
|
||||
(if (fboundp 'vc-refresh-state)
|
||||
(vc-refresh-state)
|
||||
(with-no-warnings
|
||||
(vc-find-file-hook))))))
|
||||
(magit-refresh))
|
||||
|
||||
(defun magit-file-untrack (files &optional force)
|
||||
"Untrack the selected FILES or one file read in the minibuffer.
|
||||
|
||||
With a prefix argument FORCE do so even when the files have
|
||||
staged as well as unstaged changes."
|
||||
(interactive (list (or (--if-let (magit-region-values 'file t)
|
||||
(progn
|
||||
(unless (magit-file-tracked-p (car it))
|
||||
(user-error "Already untracked"))
|
||||
(magit-confirm-files 'untrack it "Untrack"))
|
||||
(list (magit-read-tracked-file "Untrack file"))))
|
||||
current-prefix-arg))
|
||||
(magit-with-toplevel
|
||||
(magit-run-git "rm" "--cached" (and force "--force") "--" files)))
|
||||
|
||||
(defun magit-file-delete (files &optional force)
|
||||
"Delete the selected FILES or one file read in the minibuffer.
|
||||
|
||||
With a prefix argument FORCE do so even when the files have
|
||||
uncommitted changes. When the files aren't being tracked in
|
||||
Git, then fallback to using `delete-file'."
|
||||
(interactive (list (--if-let (magit-region-values 'file t)
|
||||
(magit-confirm-files 'delete it "Delete")
|
||||
(list (magit-read-file "Delete file")))
|
||||
current-prefix-arg))
|
||||
(if (magit-file-tracked-p (car files))
|
||||
(magit-call-git "rm" (and force "--force") "--" files)
|
||||
(let ((topdir (magit-toplevel)))
|
||||
(dolist (file files)
|
||||
(delete-file (expand-file-name file topdir) t))))
|
||||
(magit-refresh))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-file-checkout (rev file)
|
||||
"Checkout FILE from REV."
|
||||
(interactive
|
||||
(let ((rev (magit-read-branch-or-commit
|
||||
"Checkout from revision" magit-buffer-revision)))
|
||||
(list rev (magit-read-file-from-rev rev "Checkout file"))))
|
||||
(magit-with-toplevel
|
||||
(magit-run-git "checkout" rev "--" file)))
|
||||
|
||||
;;; Read File
|
||||
|
||||
(defvar magit-read-file-hist nil)
|
||||
|
||||
(defun magit-read-file-from-rev (rev prompt &optional default)
|
||||
(let ((files (magit-revision-files rev)))
|
||||
(magit-completing-read
|
||||
prompt files nil t nil 'magit-read-file-hist
|
||||
(car (member (or default (magit-current-file)) files)))))
|
||||
|
||||
(defun magit-read-file (prompt &optional tracked-only)
|
||||
(let ((choices (nconc (magit-list-files)
|
||||
(unless tracked-only (magit-untracked-files)))))
|
||||
(magit-completing-read
|
||||
prompt choices nil t nil nil
|
||||
(car (member (or (magit-section-value-if '(file submodule))
|
||||
(magit-file-relative-name nil tracked-only))
|
||||
choices)))))
|
||||
|
||||
(defun magit-read-tracked-file (prompt)
|
||||
(magit-read-file prompt t))
|
||||
|
||||
(defun magit-read-file-choice (prompt files &optional error default)
|
||||
"Read file from FILES.
|
||||
|
||||
If FILES has only one member, return that instead of prompting.
|
||||
If FILES has no members, give a user error. ERROR can be given
|
||||
to provide a more informative error.
|
||||
|
||||
If DEFAULT is non-nil, use this as the default value instead of
|
||||
`magit-current-file'."
|
||||
(pcase (length files)
|
||||
(0 (user-error (or error "No file choices")))
|
||||
(1 (car files))
|
||||
(_ (magit-completing-read
|
||||
prompt files nil t nil 'magit-read-file-hist
|
||||
(car (member (or default (magit-current-file)) files))))))
|
||||
|
||||
(defun magit-read-changed-file (rev-or-range prompt &optional default)
|
||||
(magit-read-file-choice
|
||||
prompt
|
||||
(magit-changed-files rev-or-range)
|
||||
default
|
||||
(concat "No file changed in " rev-or-range)))
|
||||
|
||||
;;; _
|
||||
(provide 'magit-files)
|
||||
;;; magit-files.el ends here
|
BIN
elpa/magit-20210414.1306/magit-files.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-files.elc
Normal file
Binary file not shown.
2381
elpa/magit-20210414.1306/magit-git.el
Normal file
2381
elpa/magit-20210414.1306/magit-git.el
Normal file
File diff suppressed because it is too large
Load Diff
BIN
elpa/magit-20210414.1306/magit-git.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-git.elc
Normal file
Binary file not shown.
194
elpa/magit-20210414.1306/magit-gitignore.el
Normal file
194
elpa/magit-20210414.1306/magit-gitignore.el
Normal file
|
@ -0,0 +1,194 @@
|
|||
;;; magit-gitignore.el --- intentionally untracked files -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2008-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
|
||||
;; Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
;; Magit is free software; you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
;;
|
||||
;; Magit is distributed in the hope that it will be useful, but WITHOUT
|
||||
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
;; License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Magit. If not, see http://www.gnu.org/licenses.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; This library implements gitignore commands.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'magit)
|
||||
|
||||
;;; Transient
|
||||
|
||||
;;;###autoload (autoload 'magit-gitignore "magit-gitignore" nil t)
|
||||
(transient-define-prefix magit-gitignore ()
|
||||
"Instruct Git to ignore a file or pattern."
|
||||
:man-page "gitignore"
|
||||
["Gitignore"
|
||||
("t" "shared at toplevel (.gitignore)"
|
||||
magit-gitignore-in-topdir)
|
||||
("s" "shared in subdirectory (path/to/.gitignore)"
|
||||
magit-gitignore-in-subdir)
|
||||
("p" "privately (.git/info/exclude)"
|
||||
magit-gitignore-in-gitdir)
|
||||
("g" magit-gitignore-on-system
|
||||
:if (lambda () (magit-get "core.excludesfile"))
|
||||
:description (lambda ()
|
||||
(format "privately for all repositories (%s)"
|
||||
(magit-get "core.excludesfile"))))]
|
||||
["Skip worktree"
|
||||
(7 "w" "do skip worktree" magit-skip-worktree)
|
||||
(7 "W" "do not skip worktree" magit-no-skip-worktree)]
|
||||
["Assume unchanged"
|
||||
(7 "u" "do assume unchanged" magit-assume-unchanged)
|
||||
(7 "U" "do not assume unchanged" magit-no-assume-unchanged)])
|
||||
|
||||
;;; Gitignore Commands
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-gitignore-in-topdir (rule)
|
||||
"Add the Git ignore RULE to the top-level \".gitignore\" file.
|
||||
Since this file is tracked, it is shared with other clones of the
|
||||
repository. Also stage the file."
|
||||
(interactive (list (magit-gitignore-read-pattern)))
|
||||
(magit-with-toplevel
|
||||
(magit--gitignore rule ".gitignore")
|
||||
(magit-run-git "add" ".gitignore")))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-gitignore-in-subdir (rule directory)
|
||||
"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."
|
||||
(interactive (list (magit-gitignore-read-pattern)
|
||||
(read-directory-name "Limit rule to files in: ")))
|
||||
(magit-with-toplevel
|
||||
(let ((file (expand-file-name ".gitignore" directory)))
|
||||
(magit--gitignore rule file)
|
||||
(magit-run-git "add" (magit-convert-filename-for-git file)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-gitignore-in-gitdir (rule)
|
||||
"Add the Git ignore RULE to \"$GIT_DIR/info/exclude\".
|
||||
Rules in that file only affects this clone of the repository."
|
||||
(interactive (list (magit-gitignore-read-pattern)))
|
||||
(magit--gitignore rule (magit-git-dir "info/exclude"))
|
||||
(magit-refresh))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-gitignore-on-system (rule)
|
||||
"Add the Git ignore RULE to the file specified by `core.excludesFile'.
|
||||
Rules that are defined in that file affect all local repositories."
|
||||
(interactive (list (magit-gitignore-read-pattern)))
|
||||
(magit--gitignore rule
|
||||
(or (magit-get "core.excludesFile")
|
||||
(error "Variable `core.excludesFile' isn't set")))
|
||||
(magit-refresh))
|
||||
|
||||
(defun magit--gitignore (rule file)
|
||||
(when-let ((directory (file-name-directory file)))
|
||||
(make-directory directory t))
|
||||
(with-temp-buffer
|
||||
(when (file-exists-p file)
|
||||
(insert-file-contents file))
|
||||
(goto-char (point-max))
|
||||
(unless (bolp)
|
||||
(insert "\n"))
|
||||
(insert (replace-regexp-in-string "\\(\\\\*\\)" "\\1\\1" rule))
|
||||
(insert "\n")
|
||||
(write-region nil nil file)))
|
||||
|
||||
(defun magit-gitignore-read-pattern ()
|
||||
(let* ((default (magit-current-file))
|
||||
(base (car magit-buffer-diff-files))
|
||||
(base (and base (file-directory-p base) base))
|
||||
(choices
|
||||
(delete-dups
|
||||
(--mapcat
|
||||
(cons (concat "/" it)
|
||||
(when-let ((ext (file-name-extension it)))
|
||||
(list (concat "/" (file-name-directory it) "*." ext)
|
||||
(concat "*." ext))))
|
||||
(sort (nconc
|
||||
(magit-untracked-files nil base)
|
||||
;; The untracked section of the status buffer lists
|
||||
;; directories containing only untracked files.
|
||||
;; Add those as candidates.
|
||||
(-filter #'directory-name-p
|
||||
(magit-list-files
|
||||
"--other" "--exclude-standard" "--directory"
|
||||
"--no-empty-directory" "--" base)))
|
||||
#'string-lessp)))))
|
||||
(when default
|
||||
(setq default (concat "/" default))
|
||||
(unless (member default choices)
|
||||
(setq default (concat "*." (file-name-extension default)))
|
||||
(unless (member default choices)
|
||||
(setq default nil))))
|
||||
(magit-completing-read "File or pattern to ignore"
|
||||
choices nil nil nil nil default)))
|
||||
|
||||
;;; Skip Worktree Commands
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-skip-worktree (file)
|
||||
"Call \"git update-index --skip-worktree -- FILE\"."
|
||||
(interactive
|
||||
(list (magit-read-file-choice "Skip worktree for"
|
||||
(magit-with-toplevel
|
||||
(cl-set-difference
|
||||
(magit-list-files)
|
||||
(magit-skip-worktree-files))))))
|
||||
(magit-with-toplevel
|
||||
(magit-run-git "update-index" "--skip-worktree" "--" file)))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-no-skip-worktree (file)
|
||||
"Call \"git update-index --no-skip-worktree -- FILE\"."
|
||||
(interactive
|
||||
(list (magit-read-file-choice "Do not skip worktree for"
|
||||
(magit-with-toplevel
|
||||
(magit-skip-worktree-files)))))
|
||||
(magit-with-toplevel
|
||||
(magit-run-git "update-index" "--no-skip-worktree" "--" file)))
|
||||
|
||||
;;; Assume Unchanged Commands
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-assume-unchanged (file)
|
||||
"Call \"git update-index --assume-unchanged -- FILE\"."
|
||||
(interactive
|
||||
(list (magit-read-file-choice "Assume file to be unchanged"
|
||||
(magit-with-toplevel
|
||||
(cl-set-difference
|
||||
(magit-list-files)
|
||||
(magit-assume-unchanged-files))))))
|
||||
(magit-with-toplevel
|
||||
(magit-run-git "update-index" "--assume-unchanged" "--" file)))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-no-assume-unchanged (file)
|
||||
"Call \"git update-index --no-assume-unchanged -- FILE\"."
|
||||
(interactive
|
||||
(list (magit-read-file-choice "Do not assume file to be unchanged"
|
||||
(magit-with-toplevel
|
||||
(magit-assume-unchanged-files)))))
|
||||
(magit-with-toplevel
|
||||
(magit-run-git "update-index" "--no-assume-unchanged" "--" file)))
|
||||
|
||||
;;; _
|
||||
(provide 'magit-gitignore)
|
||||
;;; magit-gitignore.el ends here
|
BIN
elpa/magit-20210414.1306/magit-gitignore.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-gitignore.elc
Normal file
Binary file not shown.
242
elpa/magit-20210414.1306/magit-imenu.el
Normal file
242
elpa/magit-20210414.1306/magit-imenu.el
Normal file
|
@ -0,0 +1,242 @@
|
|||
;;; magit-imenu.el --- Integrate Imenu in magit major modes -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2010-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
|
||||
;; Author: Damien Cassou <damien@cassou.me>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
;; Magit is free software; you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
;;
|
||||
;; Magit is distributed in the hope that it will be useful, but WITHOUT
|
||||
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
;; License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Magit. If not, see http://www.gnu.org/licenses.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Emacs' major modes can facilitate navigation in their buffers by
|
||||
;; supporting Imenu. In such major modes, launching Imenu (M-x imenu)
|
||||
;; makes Emacs display a list of items (e.g., function definitions in
|
||||
;; a programming major mode). Selecting an item from this list moves
|
||||
;; point to this item.
|
||||
|
||||
;; magit-imenu.el adds Imenu support to every major mode in Magit.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'magit)
|
||||
(require 'git-rebase)
|
||||
|
||||
;;; Core
|
||||
|
||||
(defun magit-imenu--index-function (entry-types menu-types)
|
||||
"Return an alist of imenu entries in current buffer.
|
||||
|
||||
ENTRY-TYPES is a list of section types to be selected through
|
||||
`imenu'.
|
||||
|
||||
MENU-TYPES is a list of section types containing elements of
|
||||
ENTRY-TYPES. Elements of MENU-TYPES are are used to categories
|
||||
elements of ENTRY-TYPES.
|
||||
|
||||
This function is used as a helper for functions set as
|
||||
`imenu-create-index-function'."
|
||||
(let ((entries (make-hash-table :test 'equal)))
|
||||
(goto-char (point-max))
|
||||
(while (magit-section--backward-find
|
||||
(lambda ()
|
||||
(let* ((section (magit-current-section))
|
||||
(type (oref section type))
|
||||
(parent (oref section parent))
|
||||
(parent-type (oref parent type)))
|
||||
(and (-contains-p entry-types type)
|
||||
(-contains-p menu-types parent-type)))))
|
||||
(let* ((section (magit-current-section))
|
||||
(name (buffer-substring-no-properties
|
||||
(line-beginning-position)
|
||||
(line-end-position)))
|
||||
(parent (oref section parent))
|
||||
(parent-title (buffer-substring-no-properties
|
||||
(oref parent start)
|
||||
(1- (oref parent content)))))
|
||||
(puthash parent-title
|
||||
(cons (cons name (point))
|
||||
(gethash parent-title entries (list)))
|
||||
entries)))
|
||||
(mapcar (lambda (menu-title)
|
||||
(cons menu-title (gethash menu-title entries)))
|
||||
(hash-table-keys entries))))
|
||||
|
||||
;;; Log mode
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-imenu--log-prev-index-position-function ()
|
||||
"Move point to previous line in current buffer.
|
||||
This function is used as a value for
|
||||
`imenu-prev-index-position-function'."
|
||||
(magit-section--backward-find
|
||||
(lambda ()
|
||||
(-contains-p '(commit stash)
|
||||
(oref (magit-current-section) type)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-imenu--log-extract-index-name-function ()
|
||||
"Return imenu name for line at point.
|
||||
This function is used as a value for
|
||||
`imenu-extract-index-name-function'. Point should be at the
|
||||
beginning of the line."
|
||||
(save-match-data
|
||||
(looking-at "\\([^ ]+\\)[ *|]+\\(.+\\)$")
|
||||
(format "%s: %s"
|
||||
(match-string-no-properties 1)
|
||||
(match-string-no-properties 2))))
|
||||
|
||||
;;; Diff mode
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-imenu--diff-prev-index-position-function ()
|
||||
"Move point to previous file line in current buffer.
|
||||
This function is used as a value for
|
||||
`imenu-prev-index-position-function'."
|
||||
(magit-section--backward-find
|
||||
(lambda ()
|
||||
(let ((section (magit-current-section)))
|
||||
(and (magit-file-section-p section)
|
||||
(not (equal (oref (oref section parent) type)
|
||||
'diffstat)))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-imenu--diff-extract-index-name-function ()
|
||||
"Return imenu name for line at point.
|
||||
This function is used as a value for
|
||||
`imenu-extract-index-name-function'. Point should be at the
|
||||
beginning of the line."
|
||||
(buffer-substring-no-properties (line-beginning-position)
|
||||
(line-end-position)))
|
||||
|
||||
;;; Status mode
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-imenu--status-create-index-function ()
|
||||
"Return an alist of all imenu entries in current buffer.
|
||||
This function is used as a value for
|
||||
`imenu-create-index-function'."
|
||||
(magit-imenu--index-function
|
||||
'(file commit stash)
|
||||
'(unpushed unstaged unpulled untracked staged stashes)))
|
||||
|
||||
;;;; Refs mode
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-imenu--refs-create-index-function ()
|
||||
"Return an alist of all imenu entries in current buffer.
|
||||
This function is used as a value for
|
||||
`imenu-create-index-function'."
|
||||
(magit-imenu--index-function
|
||||
'(branch commit tag)
|
||||
'(local remote tags)))
|
||||
|
||||
;;;; Cherry mode
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-imenu--cherry-create-index-function ()
|
||||
"Return an alist of all imenu entries in current buffer.
|
||||
This function is used as a value for
|
||||
`imenu-create-index-function'."
|
||||
(magit-imenu--index-function
|
||||
'(commit)
|
||||
'(cherries)))
|
||||
|
||||
;;;; Submodule list mode
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-imenu--submodule-prev-index-position-function ()
|
||||
"Move point to previous line in magit-submodule-list buffer.
|
||||
This function is used as a value for
|
||||
`imenu-prev-index-position-function'."
|
||||
(unless (bobp)
|
||||
(forward-line -1)))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-imenu--submodule-extract-index-name-function ()
|
||||
"Return imenu name for line at point.
|
||||
This function is used as a value for
|
||||
`imenu-extract-index-name-function'. Point should be at the
|
||||
beginning of the line."
|
||||
(elt (tabulated-list-get-entry) 0))
|
||||
|
||||
;;;; Repolist mode
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-imenu--repolist-prev-index-position-function ()
|
||||
"Move point to previous line in magit-repolist buffer.
|
||||
This function is used as a value for
|
||||
`imenu-prev-index-position-function'."
|
||||
(unless (bobp)
|
||||
(forward-line -1)))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-imenu--repolist-extract-index-name-function ()
|
||||
"Return imenu name for line at point.
|
||||
This function is used as a value for
|
||||
`imenu-extract-index-name-function'. Point should be at the
|
||||
beginning of the line."
|
||||
(let ((entry (tabulated-list-get-entry)))
|
||||
(format "%s (%s)"
|
||||
(elt entry 0)
|
||||
(elt entry (1- (length entry))))))
|
||||
|
||||
;;;; Process mode
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-imenu--process-prev-index-position-function ()
|
||||
"Move point to previous process in magit-process buffer.
|
||||
This function is used as a value for
|
||||
`imenu-prev-index-position-function'."
|
||||
(magit-section--backward-find
|
||||
(lambda ()
|
||||
(eq (oref (magit-current-section) type) 'process))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-imenu--process-extract-index-name-function ()
|
||||
"Return imenu name for line at point.
|
||||
This function is used as a value for
|
||||
`imenu-extract-index-name-function'. Point should be at the
|
||||
beginning of the line."
|
||||
(buffer-substring-no-properties (line-beginning-position)
|
||||
(line-end-position)))
|
||||
|
||||
;;;; Rebase mode
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-imenu--rebase-prev-index-position-function ()
|
||||
"Move point to previous commit in git-rebase buffer.
|
||||
This function is used as a value for
|
||||
`imenu-prev-index-position-function'."
|
||||
(catch 'found
|
||||
(while (not (bobp))
|
||||
(git-rebase-backward-line)
|
||||
(when (git-rebase-line-p)
|
||||
(throw 'found t)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-imenu--rebase-extract-index-name-function ()
|
||||
"Return imenu name for line at point.
|
||||
This function is used as a value for
|
||||
`imenu-extract-index-name-function'. Point should be at the
|
||||
beginning of the line."
|
||||
(buffer-substring-no-properties (line-beginning-position)
|
||||
(line-end-position)))
|
||||
|
||||
;;; _
|
||||
(provide 'magit-imenu)
|
||||
;;; magit-imenu.el ends here
|
BIN
elpa/magit-20210414.1306/magit-imenu.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-imenu.elc
Normal file
Binary file not shown.
1833
elpa/magit-20210414.1306/magit-log.el
Normal file
1833
elpa/magit-20210414.1306/magit-log.el
Normal file
File diff suppressed because it is too large
Load Diff
BIN
elpa/magit-20210414.1306/magit-log.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-log.elc
Normal file
Binary file not shown.
236
elpa/magit-20210414.1306/magit-margin.el
Normal file
236
elpa/magit-20210414.1306/magit-margin.el
Normal file
|
@ -0,0 +1,236 @@
|
|||
;;; magit-margin.el --- margins in Magit buffers -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2010-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
|
||||
;; Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
;; Magit is free software; you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
;;
|
||||
;; Magit is distributed in the hope that it will be useful, but WITHOUT
|
||||
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
;; License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Magit. If not, see http://www.gnu.org/licenses.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; This library implements support for showing additional information
|
||||
;; in the margins of Magit buffers. Currently this is only used for
|
||||
;; commits, for which the committer date or age, and optionally the
|
||||
;; author name are shown.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'magit-section)
|
||||
(require 'magit-transient)
|
||||
(require 'magit-mode)
|
||||
|
||||
(defgroup magit-margin nil
|
||||
"Information Magit displays in the margin.
|
||||
|
||||
You can change the STYLE and AUTHOR-WIDTH of all `magit-*-margin'
|
||||
options to the same values by customizing `magit-log-margin'
|
||||
*before* `magit' is loaded. If you do that, then the respective
|
||||
values for the other options will default to what you have set
|
||||
for that variable. Likewise if you set `magit-log-margin's INIT
|
||||
to nil, then that is used in the default of all other options. But
|
||||
setting it to t, i.e. re-enforcing the default for that option,
|
||||
does not carry to other options."
|
||||
:link '(info-link "(magit)Log Margin")
|
||||
:group 'magit-log)
|
||||
|
||||
(defvar-local magit-buffer-margin nil)
|
||||
(put 'magit-buffer-margin 'permanent-local t)
|
||||
|
||||
(defvar-local magit-set-buffer-margin-refresh nil)
|
||||
|
||||
(defvar magit--age-spec)
|
||||
|
||||
;;; Commands
|
||||
|
||||
(transient-define-prefix magit-margin-settings ()
|
||||
"Change what information is displayed in the margin."
|
||||
:info-manual "(magit) Log Margin"
|
||||
["Margin"
|
||||
("L" "Toggle visibility" magit-toggle-margin)
|
||||
("l" "Cycle style" magit-cycle-margin-style)
|
||||
("d" "Toggle details" magit-toggle-margin-details)
|
||||
("v" "Change verbosity" magit-refs-set-show-commit-count
|
||||
:if-derived magit-refs-mode)])
|
||||
|
||||
(defun magit-toggle-margin ()
|
||||
"Show or hide the Magit margin."
|
||||
(interactive)
|
||||
(unless (magit-margin-option)
|
||||
(user-error "Magit margin isn't supported in this buffer"))
|
||||
(setcar magit-buffer-margin (not (magit-buffer-margin-p)))
|
||||
(magit-set-buffer-margin))
|
||||
|
||||
(defun magit-cycle-margin-style ()
|
||||
"Cycle style used for the Magit margin."
|
||||
(interactive)
|
||||
(unless (magit-margin-option)
|
||||
(user-error "Magit margin isn't supported in this buffer"))
|
||||
;; This is only suitable for commit margins (there are not others).
|
||||
(setf (cadr magit-buffer-margin)
|
||||
(pcase (cadr magit-buffer-margin)
|
||||
(`age 'age-abbreviated)
|
||||
(`age-abbreviated
|
||||
(let ((default (cadr (symbol-value (magit-margin-option)))))
|
||||
(if (stringp default) default "%Y-%m-%d %H:%M ")))
|
||||
(_ 'age)))
|
||||
(magit-set-buffer-margin nil t))
|
||||
|
||||
(defun magit-toggle-margin-details ()
|
||||
"Show or hide details in the Magit margin."
|
||||
(interactive)
|
||||
(unless (magit-margin-option)
|
||||
(user-error "Magit margin isn't supported in this buffer"))
|
||||
(setf (nth 3 magit-buffer-margin)
|
||||
(not (nth 3 magit-buffer-margin)))
|
||||
(magit-set-buffer-margin nil t))
|
||||
|
||||
;;; Core
|
||||
|
||||
(defun magit-buffer-margin-p ()
|
||||
(car magit-buffer-margin))
|
||||
|
||||
(defun magit-margin-option ()
|
||||
(pcase major-mode
|
||||
(`magit-cherry-mode 'magit-cherry-margin)
|
||||
(`magit-log-mode 'magit-log-margin)
|
||||
(`magit-log-select-mode 'magit-log-select-margin)
|
||||
(`magit-reflog-mode 'magit-reflog-margin)
|
||||
(`magit-refs-mode 'magit-refs-margin)
|
||||
(`magit-stashes-mode 'magit-stashes-margin)
|
||||
(`magit-status-mode 'magit-status-margin)
|
||||
(`forge-notifications-mode 'magit-status-margin)))
|
||||
|
||||
(defun magit-set-buffer-margin (&optional reset refresh)
|
||||
(when-let ((option (magit-margin-option)))
|
||||
(let* ((default (symbol-value option))
|
||||
(default-width (nth 2 default)))
|
||||
(when (or reset (not magit-buffer-margin))
|
||||
(setq magit-buffer-margin (copy-sequence default)))
|
||||
(pcase-let ((`(,enable ,style ,_width ,details ,details-width)
|
||||
magit-buffer-margin))
|
||||
(when (functionp default-width)
|
||||
(setf (nth 2 magit-buffer-margin)
|
||||
(funcall default-width style details details-width)))
|
||||
(dolist (window (get-buffer-window-list nil nil 0))
|
||||
(with-selected-window window
|
||||
(magit-set-window-margin window)
|
||||
(if enable
|
||||
(add-hook 'window-configuration-change-hook
|
||||
'magit-set-window-margin nil t)
|
||||
(remove-hook 'window-configuration-change-hook
|
||||
'magit-set-window-margin t))))
|
||||
(when (and enable (or refresh magit-set-buffer-margin-refresh))
|
||||
(magit-refresh-buffer))))))
|
||||
|
||||
(defun magit-set-window-margin (&optional window)
|
||||
(when (or window (setq window (get-buffer-window)))
|
||||
(with-selected-window window
|
||||
(set-window-margins
|
||||
nil (car (window-margins))
|
||||
(and (magit-buffer-margin-p)
|
||||
(nth 2 magit-buffer-margin))))))
|
||||
|
||||
(defun magit-make-margin-overlay (&optional string previous-line)
|
||||
(if previous-line
|
||||
(save-excursion
|
||||
(forward-line -1)
|
||||
(magit-make-margin-overlay string))
|
||||
;; Don't put the overlay on the complete line to work around #1880.
|
||||
(let ((o (make-overlay (1+ (line-beginning-position))
|
||||
(line-end-position)
|
||||
nil t)))
|
||||
(overlay-put o 'evaporate t)
|
||||
(overlay-put o 'before-string
|
||||
(propertize "o" 'display
|
||||
(list (list 'margin 'right-margin)
|
||||
(or string " ")))))))
|
||||
|
||||
(defun magit-maybe-make-margin-overlay ()
|
||||
(when (or (magit-section-match
|
||||
'(unpulled unpushed recent stashes local cherries)
|
||||
magit-insert-section--current)
|
||||
(and (eq major-mode 'magit-refs-mode)
|
||||
(magit-section-match
|
||||
'(remote commit tags)
|
||||
magit-insert-section--current)))
|
||||
(magit-make-margin-overlay nil t)))
|
||||
|
||||
;;; Custom Support
|
||||
|
||||
(defun magit-margin-set-variable (mode symbol value)
|
||||
(set-default symbol value)
|
||||
(message "Updating margins in %s buffers..." mode)
|
||||
(dolist (buffer (buffer-list))
|
||||
(with-current-buffer buffer
|
||||
(when (eq major-mode mode)
|
||||
(magit-set-buffer-margin t)
|
||||
(magit-refresh))))
|
||||
(message "Updating margins in %s buffers...done" mode))
|
||||
|
||||
(defconst magit-log-margin--custom-type
|
||||
'(list (boolean :tag "Show margin initially")
|
||||
(choice :tag "Show committer"
|
||||
(string :tag "date using time-format" "%Y-%m-%d %H:%M ")
|
||||
(const :tag "date's age" age)
|
||||
(const :tag "date's age (abbreviated)" age-abbreviated))
|
||||
(const :tag "Calculate width using magit-log-margin-width"
|
||||
magit-log-margin-width)
|
||||
(boolean :tag "Show author name by default")
|
||||
(integer :tag "Show author name using width")))
|
||||
|
||||
;;; Time Utilities
|
||||
|
||||
(defvar magit--age-spec
|
||||
`((?Y "year" "years" ,(round (* 60 60 24 365.2425)))
|
||||
(?M "month" "months" ,(round (* 60 60 24 30.436875)))
|
||||
(?w "week" "weeks" ,(* 60 60 24 7))
|
||||
(?d "day" "days" ,(* 60 60 24))
|
||||
(?h "hour" "hours" ,(* 60 60))
|
||||
(?m "minute" "minutes" 60)
|
||||
(?s "second" "seconds" 1))
|
||||
"Time units used when formatting relative commit ages.
|
||||
|
||||
The value is a list of time units, beginning with the longest.
|
||||
Each element has the form (CHAR UNIT UNITS SECONDS). UNIT is the
|
||||
time unit, UNITS is the plural of that unit. CHAR is a character
|
||||
abbreviation. And SECONDS is the number of seconds in one UNIT.
|
||||
|
||||
This is defined as a variable to make it possible to use time
|
||||
units for a language other than English. It is not defined
|
||||
as an option, because most other parts of Magit are always in
|
||||
English.")
|
||||
|
||||
(defun magit--age (date &optional abbreviate)
|
||||
(cl-labels ((fn (age spec)
|
||||
(pcase-let ((`(,char ,unit ,units ,weight) (car spec)))
|
||||
(let ((cnt (round (/ age weight 1.0))))
|
||||
(if (or (not (cdr spec))
|
||||
(>= (/ age weight) 1))
|
||||
(list cnt (cond (abbreviate char)
|
||||
((= cnt 1) unit)
|
||||
(t units)))
|
||||
(fn age (cdr spec)))))))
|
||||
(fn (abs (- (float-time)
|
||||
(if (stringp date)
|
||||
(string-to-number date)
|
||||
date)))
|
||||
magit--age-spec)))
|
||||
|
||||
;;; _
|
||||
(provide 'magit-margin)
|
||||
;;; magit-margin.el ends here
|
BIN
elpa/magit-20210414.1306/magit-margin.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-margin.elc
Normal file
Binary file not shown.
315
elpa/magit-20210414.1306/magit-merge.el
Normal file
315
elpa/magit-20210414.1306/magit-merge.el
Normal file
|
@ -0,0 +1,315 @@
|
|||
;;; magit-merge.el --- merge functionality -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2010-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
|
||||
;; Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
;; Magit is free software; you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
;;
|
||||
;; Magit is distributed in the hope that it will be useful, but WITHOUT
|
||||
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
;; License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Magit. If not, see http://www.gnu.org/licenses.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; This library implements merge commands.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'magit)
|
||||
(require 'magit-diff)
|
||||
|
||||
(declare-function magit-git-push "magit-push" (branch target args))
|
||||
|
||||
;;; Commands
|
||||
|
||||
;;;###autoload (autoload 'magit-merge "magit" nil t)
|
||||
(transient-define-prefix magit-merge ()
|
||||
"Merge branches."
|
||||
:man-page "git-merge"
|
||||
:incompatible '(("--ff-only" "--no-ff"))
|
||||
["Arguments"
|
||||
:if-not magit-merge-in-progress-p
|
||||
("-f" "Fast-forward only" "--ff-only")
|
||||
("-n" "No fast-forward" "--no-ff")
|
||||
(magit-merge:--strategy)
|
||||
(5 magit-merge:--strategy-option)
|
||||
(5 magit-diff:--diff-algorithm :argument "-Xdiff-algorithm=")
|
||||
(5 magit:--gpg-sign)]
|
||||
["Actions"
|
||||
:if-not magit-merge-in-progress-p
|
||||
[("m" "Merge" magit-merge-plain)
|
||||
("e" "Merge and edit message" magit-merge-editmsg)
|
||||
("n" "Merge but don't commit" magit-merge-nocommit)
|
||||
("a" "Absorb" magit-merge-absorb)]
|
||||
[("p" "Preview merge" magit-merge-preview)
|
||||
""
|
||||
("s" "Squash merge" magit-merge-squash)
|
||||
("i" "Merge into" magit-merge-into)]]
|
||||
["Actions"
|
||||
:if magit-merge-in-progress-p
|
||||
("m" "Commit merge" magit-commit-create)
|
||||
("a" "Abort merge" magit-merge-abort)])
|
||||
|
||||
(defun magit-merge-arguments ()
|
||||
(transient-args 'magit-merge))
|
||||
|
||||
(transient-define-argument magit-merge:--strategy ()
|
||||
:description "Strategy"
|
||||
:class 'transient-option
|
||||
;; key for merge and rebase: "-s"
|
||||
;; key for cherry-pick and revert: "=s"
|
||||
;; shortarg for merge and rebase: "-s"
|
||||
;; shortarg for cherry-pick and revert: none
|
||||
:key "-s"
|
||||
:argument "--strategy="
|
||||
:choices '("resolve" "recursive" "octopus" "ours" "subtree"))
|
||||
|
||||
(transient-define-argument magit-merge:--strategy-option ()
|
||||
:description "Strategy Option"
|
||||
:class 'transient-option
|
||||
:key "-X"
|
||||
:argument "--strategy-option="
|
||||
:choices '("ours" "theirs" "patience"))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-merge-plain (rev &optional args nocommit)
|
||||
"Merge commit REV into the current branch; using default message.
|
||||
|
||||
Unless there are conflicts or a prefix argument is used create a
|
||||
merge commit using a generic commit message and without letting
|
||||
the user inspect the result. With a prefix argument pretend the
|
||||
merge failed to give the user the opportunity to inspect the
|
||||
merge.
|
||||
|
||||
\(git merge --no-edit|--no-commit [ARGS] REV)"
|
||||
(interactive (list (magit-read-other-branch-or-commit "Merge")
|
||||
(magit-merge-arguments)
|
||||
current-prefix-arg))
|
||||
(magit-merge-assert)
|
||||
(magit-run-git-async "merge" (if nocommit "--no-commit" "--no-edit") args rev))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-merge-editmsg (rev &optional args)
|
||||
"Merge commit REV into the current branch; and edit message.
|
||||
Perform the merge and prepare a commit message but let the user
|
||||
edit it.
|
||||
\n(git merge --edit --no-ff [ARGS] REV)"
|
||||
(interactive (list (magit-read-other-branch-or-commit "Merge")
|
||||
(magit-merge-arguments)))
|
||||
(magit-merge-assert)
|
||||
(cl-pushnew "--no-ff" args :test #'equal)
|
||||
(apply #'magit-run-git-with-editor "merge" "--edit"
|
||||
(append (delete "--ff-only" args)
|
||||
(list rev))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-merge-nocommit (rev &optional args)
|
||||
"Merge commit REV into the current branch; pretending it failed.
|
||||
Pretend the merge failed to give the user the opportunity to
|
||||
inspect the merge and change the commit message.
|
||||
\n(git merge --no-commit --no-ff [ARGS] REV)"
|
||||
(interactive (list (magit-read-other-branch-or-commit "Merge")
|
||||
(magit-merge-arguments)))
|
||||
(magit-merge-assert)
|
||||
(cl-pushnew "--no-ff" args :test #'equal)
|
||||
(magit-run-git-async "merge" "--no-commit" args rev))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-merge-into (branch &optional args)
|
||||
"Merge the current branch into BRANCH and remove the former.
|
||||
|
||||
Before merging, force push the source branch to its push-remote,
|
||||
provided the respective remote branch already exists, ensuring
|
||||
that the respective pull-request (if any) won't get stuck on some
|
||||
obsolete version of the commits that are being merged. Finally
|
||||
if `forge-branch-pullreq' was used to create the merged branch,
|
||||
branch, then also remove the respective remote branch."
|
||||
(interactive
|
||||
(list (magit-read-other-local-branch
|
||||
(format "Merge `%s' into"
|
||||
(or (magit-get-current-branch)
|
||||
(magit-rev-parse "HEAD")))
|
||||
nil
|
||||
(when-let ((upstream (magit-get-upstream-branch))
|
||||
(upstream (cdr (magit-split-branch-name upstream))))
|
||||
(and (magit-branch-p upstream) upstream)))
|
||||
(magit-merge-arguments)))
|
||||
(let ((current (magit-get-current-branch))
|
||||
(head (magit-rev-parse "HEAD")))
|
||||
(when (zerop (magit-call-git "checkout" branch))
|
||||
(if current
|
||||
(magit--merge-absorb current args)
|
||||
(magit-run-git-with-editor "merge" args head)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-merge-absorb (branch &optional args)
|
||||
"Merge BRANCH into the current branch and remove the former.
|
||||
|
||||
Before merging, force push the source branch to its push-remote,
|
||||
provided the respective remote branch already exists, ensuring
|
||||
that the respective pull-request (if any) won't get stuck on some
|
||||
obsolete version of the commits that are being merged. Finally
|
||||
if `forge-branch-pullreq' was used to create the merged branch,
|
||||
then also remove the respective remote branch."
|
||||
(interactive (list (magit-read-other-local-branch "Absorb branch")
|
||||
(magit-merge-arguments)))
|
||||
(magit--merge-absorb branch args))
|
||||
|
||||
(defun magit--merge-absorb (branch args)
|
||||
(when (equal branch (magit-main-branch))
|
||||
(unless (yes-or-no-p
|
||||
(format "Do you really want to merge `%s' into another branch? "
|
||||
branch))
|
||||
(user-error "Abort")))
|
||||
(if-let ((target (magit-get-push-branch branch t)))
|
||||
(progn
|
||||
(magit-git-push branch target (list "--force-with-lease"))
|
||||
(set-process-sentinel
|
||||
magit-this-process
|
||||
(lambda (process event)
|
||||
(when (memq (process-status process) '(exit signal))
|
||||
(if (not (zerop (process-exit-status process)))
|
||||
(magit-process-sentinel process event)
|
||||
(process-put process 'inhibit-refresh t)
|
||||
(magit-process-sentinel process event)
|
||||
(magit--merge-absorb-1 branch args))))))
|
||||
(magit--merge-absorb-1 branch args)))
|
||||
|
||||
(defun magit--merge-absorb-1 (branch args)
|
||||
(if-let ((pr (magit-get "branch" branch "pullRequest")))
|
||||
(magit-run-git-async
|
||||
"merge" args "-m"
|
||||
(format "Merge branch '%s'%s [#%s]"
|
||||
branch
|
||||
(let ((current (magit-get-current-branch)))
|
||||
(if (equal current (magit-main-branch))
|
||||
""
|
||||
(format " into %s" current)))
|
||||
pr)
|
||||
branch)
|
||||
(magit-run-git-async "merge" args "--no-edit" branch))
|
||||
(set-process-sentinel
|
||||
magit-this-process
|
||||
(lambda (process event)
|
||||
(when (memq (process-status process) '(exit signal))
|
||||
(if (> (process-exit-status process) 0)
|
||||
(magit-process-sentinel process event)
|
||||
(process-put process 'inhibit-refresh t)
|
||||
(magit-process-sentinel process event)
|
||||
(magit-branch-maybe-delete-pr-remote branch)
|
||||
(magit-branch-unset-pushRemote branch)
|
||||
(magit-run-git "branch" "-D" branch))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-merge-squash (rev)
|
||||
"Squash commit REV into the current branch; don't create a commit.
|
||||
\n(git merge --squash REV)"
|
||||
(interactive (list (magit-read-other-branch-or-commit "Squash")))
|
||||
(magit-merge-assert)
|
||||
(magit-run-git-async "merge" "--squash" rev))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-merge-preview (rev)
|
||||
"Preview result of merging REV into the current branch."
|
||||
(interactive (list (magit-read-other-branch-or-commit "Preview merge")))
|
||||
(magit-merge-preview-setup-buffer rev))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-merge-abort ()
|
||||
"Abort the current merge operation.
|
||||
\n(git merge --abort)"
|
||||
(interactive)
|
||||
(unless (file-exists-p (magit-git-dir "MERGE_HEAD"))
|
||||
(user-error "No merge in progress"))
|
||||
(magit-confirm 'abort-merge)
|
||||
(magit-run-git-async "merge" "--abort"))
|
||||
|
||||
(defun magit-checkout-stage (file arg)
|
||||
"During a conflict checkout and stage side, or restore conflict."
|
||||
(interactive
|
||||
(let ((file (magit-completing-read "Checkout file"
|
||||
(magit-tracked-files) nil nil nil
|
||||
'magit-read-file-hist
|
||||
(magit-current-file))))
|
||||
(cond ((member file (magit-unmerged-files))
|
||||
(list file (magit-checkout-read-stage file)))
|
||||
((yes-or-no-p (format "Restore conflicts in %s? " file))
|
||||
(list file "--merge"))
|
||||
(t
|
||||
(user-error "Quit")))))
|
||||
(pcase (cons arg (cddr (car (magit-file-status file))))
|
||||
((or `("--ours" ?D ,_)
|
||||
`("--theirs" ,_ ?D))
|
||||
(magit-run-git "rm" "--" file))
|
||||
(_ (if (equal arg "--merge")
|
||||
;; This fails if the file was deleted on one
|
||||
;; side. And we cannot do anything about it.
|
||||
(magit-run-git "checkout" "--merge" "--" file)
|
||||
(magit-call-git "checkout" arg "--" file)
|
||||
(magit-run-git "add" "-u" "--" file)))))
|
||||
|
||||
;;; Utilities
|
||||
|
||||
(defun magit-merge-in-progress-p ()
|
||||
(file-exists-p (magit-git-dir "MERGE_HEAD")))
|
||||
|
||||
(defun magit--merge-range (&optional head)
|
||||
(unless head
|
||||
(setq head (magit-get-shortname
|
||||
(car (magit-file-lines (magit-git-dir "MERGE_HEAD"))))))
|
||||
(and head
|
||||
(concat (magit-git-string "merge-base" "--octopus" "HEAD" head)
|
||||
".." head)))
|
||||
|
||||
(defun magit-merge-assert ()
|
||||
(or (not (magit-anything-modified-p t))
|
||||
(magit-confirm 'merge-dirty
|
||||
"Merging with dirty worktree is risky. Continue")))
|
||||
|
||||
(defun magit-checkout-read-stage (file)
|
||||
(magit-read-char-case (format "For %s checkout: " file) t
|
||||
(?o "[o]ur stage" "--ours")
|
||||
(?t "[t]heir stage" "--theirs")
|
||||
(?c "[c]onflict" "--merge")))
|
||||
|
||||
;;; Sections
|
||||
|
||||
(defvar magit-unmerged-section-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map [remap magit-visit-thing] 'magit-diff-dwim)
|
||||
map)
|
||||
"Keymap for `unmerged' sections.")
|
||||
|
||||
(defun magit-insert-merge-log ()
|
||||
"Insert section for the on-going merge.
|
||||
Display the heads that are being merged.
|
||||
If no merge is in progress, do nothing."
|
||||
(when (magit-merge-in-progress-p)
|
||||
(let* ((heads (mapcar #'magit-get-shortname
|
||||
(magit-file-lines (magit-git-dir "MERGE_HEAD"))))
|
||||
(range (magit--merge-range (car heads))))
|
||||
(magit-insert-section (unmerged range)
|
||||
(magit-insert-heading
|
||||
(format "Merging %s:" (mapconcat #'identity heads ", ")))
|
||||
(magit-insert-log
|
||||
range
|
||||
(let ((args magit-buffer-log-args))
|
||||
(unless (member "--decorate=full" magit-buffer-log-args)
|
||||
(push "--decorate=full" args))
|
||||
args))))))
|
||||
|
||||
;;; _
|
||||
(provide 'magit-merge)
|
||||
;;; magit-merge.el ends here
|
BIN
elpa/magit-20210414.1306/magit-merge.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-merge.elc
Normal file
Binary file not shown.
1437
elpa/magit-20210414.1306/magit-mode.el
Normal file
1437
elpa/magit-20210414.1306/magit-mode.el
Normal file
File diff suppressed because it is too large
Load Diff
BIN
elpa/magit-20210414.1306/magit-mode.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-mode.elc
Normal file
Binary file not shown.
200
elpa/magit-20210414.1306/magit-notes.el
Normal file
200
elpa/magit-20210414.1306/magit-notes.el
Normal file
|
@ -0,0 +1,200 @@
|
|||
;;; magit-notes.el --- notes support -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2010-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
|
||||
;; Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
;; Magit is free software; you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
;;
|
||||
;; Magit is distributed in the hope that it will be useful, but WITHOUT
|
||||
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
;; License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Magit. If not, see http://www.gnu.org/licenses.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; This library implements support for `git-notes'.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'magit)
|
||||
|
||||
;;; Commands
|
||||
|
||||
;;;###autoload (autoload 'magit-notes "magit" nil t)
|
||||
(transient-define-prefix magit-notes ()
|
||||
"Edit notes attached to commits."
|
||||
:man-page "git-notes"
|
||||
["Configure local settings"
|
||||
("c" magit-core.notesRef)
|
||||
("d" magit-notes.displayRef)]
|
||||
["Configure global settings"
|
||||
("C" magit-global-core.notesRef)
|
||||
("D" magit-global-notes.displayRef)]
|
||||
["Arguments for prune"
|
||||
:if-not magit-notes-merging-p
|
||||
("-n" "Dry run" ("-n" "--dry-run"))]
|
||||
["Arguments for edit and remove"
|
||||
:if-not magit-notes-merging-p
|
||||
(magit-notes:--ref)]
|
||||
["Arguments for merge"
|
||||
:if-not magit-notes-merging-p
|
||||
(magit-notes:--strategy)]
|
||||
["Actions"
|
||||
:if-not magit-notes-merging-p
|
||||
("T" "Edit" magit-notes-edit)
|
||||
("r" "Remove" magit-notes-remove)
|
||||
("m" "Merge" magit-notes-merge)
|
||||
("p" "Prune" magit-notes-prune)]
|
||||
["Actions"
|
||||
:if magit-notes-merging-p
|
||||
("c" "Commit merge" magit-notes-merge-commit)
|
||||
("a" "Abort merge" magit-notes-merge-abort)])
|
||||
|
||||
(defun magit-notes-merging-p ()
|
||||
(let ((dir (magit-git-dir "NOTES_MERGE_WORKTREE")))
|
||||
(and (file-directory-p dir)
|
||||
(directory-files dir nil "^[^.]"))))
|
||||
|
||||
(transient-define-infix magit-core.notesRef ()
|
||||
:class 'magit--git-variable
|
||||
:variable "core.notesRef"
|
||||
:reader 'magit-notes-read-ref
|
||||
:prompt "Set local core.notesRef")
|
||||
|
||||
(transient-define-infix magit-notes.displayRef ()
|
||||
:class 'magit--git-variable
|
||||
:variable "notes.displayRef"
|
||||
:multi-value t
|
||||
:reader 'magit-notes-read-refs
|
||||
:prompt "Set local notes.displayRef")
|
||||
|
||||
(transient-define-infix magit-global-core.notesRef ()
|
||||
:class 'magit--git-variable
|
||||
:variable "core.notesRef"
|
||||
:reader 'magit-notes-read-ref
|
||||
:prompt "Set global core.notesRef")
|
||||
|
||||
(transient-define-infix magit-global-notes.displayRef ()
|
||||
:class 'magit--git-variable
|
||||
:variable "notes.displayRef"
|
||||
:multi-value t
|
||||
:reader 'magit-notes-read-refs
|
||||
:prompt "Set global notes.displayRef")
|
||||
|
||||
(transient-define-argument magit-notes:--ref ()
|
||||
:description "Manipulate ref"
|
||||
:class 'transient-option
|
||||
:key "-r"
|
||||
:argument "--ref="
|
||||
:reader 'magit-notes-read-ref)
|
||||
|
||||
(transient-define-argument magit-notes:--strategy ()
|
||||
:description "Merge strategy"
|
||||
:class 'transient-option
|
||||
:shortarg "-s"
|
||||
:argument "--strategy="
|
||||
:choices '("manual" "ours" "theirs" "union" "cat_sort_uniq"))
|
||||
|
||||
(defun magit-notes-edit (commit &optional ref)
|
||||
"Edit the note attached to COMMIT.
|
||||
REF is the notes ref used to store the notes.
|
||||
|
||||
Interactively or when optional REF is nil use the value of Git
|
||||
variable `core.notesRef' or \"refs/notes/commits\" if that is
|
||||
undefined."
|
||||
(interactive (magit-notes-read-args "Edit notes"))
|
||||
(magit-run-git-with-editor "notes" (and ref (concat "--ref=" ref))
|
||||
"edit" commit))
|
||||
|
||||
(defun magit-notes-remove (commit &optional ref)
|
||||
"Remove the note attached to COMMIT.
|
||||
REF is the notes ref from which the note is removed.
|
||||
|
||||
Interactively or when optional REF is nil use the value of Git
|
||||
variable `core.notesRef' or \"refs/notes/commits\" if that is
|
||||
undefined."
|
||||
(interactive (magit-notes-read-args "Remove notes"))
|
||||
(magit-run-git-with-editor "notes" (and ref (concat "--ref=" ref))
|
||||
"remove" commit))
|
||||
|
||||
(defun magit-notes-merge (ref)
|
||||
"Merge the notes ref REF into the current notes ref.
|
||||
|
||||
The current notes ref is the value of Git variable
|
||||
`core.notesRef' or \"refs/notes/commits\" if that is undefined.
|
||||
|
||||
When there are conflicts, then they have to be resolved in the
|
||||
temporary worktree \".git/NOTES_MERGE_WORKTREE\". When
|
||||
done use `magit-notes-merge-commit' to finish. To abort
|
||||
use `magit-notes-merge-abort'."
|
||||
(interactive (list (magit-read-string-ns "Merge reference")))
|
||||
(magit-run-git-with-editor "notes" "merge" ref))
|
||||
|
||||
(defun magit-notes-merge-commit ()
|
||||
"Commit the current notes ref merge.
|
||||
Also see `magit-notes-merge'."
|
||||
(interactive)
|
||||
(magit-run-git-with-editor "notes" "merge" "--commit"))
|
||||
|
||||
(defun magit-notes-merge-abort ()
|
||||
"Abort the current notes ref merge.
|
||||
Also see `magit-notes-merge'."
|
||||
(interactive)
|
||||
(magit-run-git-with-editor "notes" "merge" "--abort"))
|
||||
|
||||
(defun magit-notes-prune (&optional dry-run)
|
||||
"Remove notes about unreachable commits."
|
||||
(interactive (list (and (member "--dry-run" (transient-args 'magit-notes)) t)))
|
||||
(when dry-run
|
||||
(magit-process-buffer))
|
||||
(magit-run-git-with-editor "notes" "prune" (and dry-run "--dry-run")))
|
||||
|
||||
;;; Readers
|
||||
|
||||
(defun magit-notes-read-ref (prompt _initial-input history)
|
||||
(--when-let (magit-completing-read
|
||||
prompt (magit-list-notes-refnames) nil nil
|
||||
(--when-let (magit-get "core.notesRef")
|
||||
(if (string-prefix-p "refs/notes/" it)
|
||||
(substring it 11)
|
||||
it))
|
||||
history)
|
||||
(if (string-prefix-p "refs/" it)
|
||||
it
|
||||
(concat "refs/notes/" it))))
|
||||
|
||||
(defun magit-notes-read-refs (prompt)
|
||||
(mapcar (lambda (ref)
|
||||
(if (string-prefix-p "refs/" ref)
|
||||
ref
|
||||
(concat "refs/notes/" ref)))
|
||||
(completing-read-multiple
|
||||
(concat prompt ": ")
|
||||
(magit-list-notes-refnames) nil nil
|
||||
(mapconcat (lambda (ref)
|
||||
(if (string-prefix-p "refs/notes/" ref)
|
||||
(substring ref 11)
|
||||
ref))
|
||||
(magit-get-all "notes.displayRef")
|
||||
","))))
|
||||
|
||||
(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))))
|
||||
|
||||
;;; _
|
||||
(provide 'magit-notes)
|
||||
;;; magit-notes.el ends here
|
BIN
elpa/magit-20210414.1306/magit-notes.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-notes.elc
Normal file
Binary file not shown.
112
elpa/magit-20210414.1306/magit-obsolete.el
Normal file
112
elpa/magit-20210414.1306/magit-obsolete.el
Normal file
|
@ -0,0 +1,112 @@
|
|||
;;; magit-obsolete.el --- obsolete definitions -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2010-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
|
||||
;; Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
;; Magit is free software; you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
;;
|
||||
;; Magit is distributed in the hope that it will be useful, but WITHOUT
|
||||
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
;; License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Magit. If not, see http://www.gnu.org/licenses.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; This library defines aliases for obsolete variables and functions.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'magit)
|
||||
|
||||
;;; Obsolete since v3.0.0
|
||||
|
||||
(define-obsolete-function-alias 'magit-diff-visit-file-worktree
|
||||
'magit-diff-visit-worktree-file "Magit 3.0.0")
|
||||
|
||||
(define-obsolete-function-alias 'magit-status-internal
|
||||
'magit-status-setup-buffer "Magit 3.0.0")
|
||||
|
||||
(define-obsolete-variable-alias 'magit-mode-setup-hook
|
||||
'magit-setup-buffer-hook "Magit 3.0.0")
|
||||
|
||||
(define-obsolete-variable-alias 'magit-branch-popup-show-variables
|
||||
'magit-branch-direct-configure "Magit 3.0.0")
|
||||
|
||||
(define-obsolete-function-alias 'magit-dispatch-popup
|
||||
'magit-dispatch "Magit 3.0.0")
|
||||
|
||||
(define-obsolete-function-alias 'magit-repolist-column-dirty
|
||||
'magit-repolist-column-flag "Magit 3.0.0")
|
||||
|
||||
(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.
|
||||
It now uses Transient.
|
||||
See https://emacsair.me/2019/02/14/transient-0.1.
|
||||
|
||||
However your configuration and/or some third-party package that
|
||||
you use still depends on the `magit-popup' package. But because
|
||||
`magit' no longer depends on that, `package' has removed it from
|
||||
your system.
|
||||
|
||||
If some package that you use still depends on `magit-popup' but
|
||||
does not declare it as a dependency, then please contact its
|
||||
maintainer about that and install `magit-popup' explicitly.
|
||||
|
||||
If you yourself use functions that are defined in `magit-popup'
|
||||
in your configuration, then the next step depends on what you use
|
||||
that for.
|
||||
|
||||
* If you use `magit-popup' to define your own popups but do not
|
||||
modify any of Magit's old popups, then you have to install
|
||||
`magit-popup' explicitly. (You can also migrate to Transient,
|
||||
but there is no need to rush that.)
|
||||
|
||||
* If you add additional arguments and/or actions to Magit's popups,
|
||||
then you have to port that to modify the new \"transients\" instead.
|
||||
See https://github.com/magit/magit/wiki/\
|
||||
Converting-popup-modifications-to-transient-modifications
|
||||
|
||||
To find installed packages that still use `magit-popup' you can
|
||||
use e.g. \"M-x rgrep RET magit-popup RET RET ~/.emacs.d/ RET\"."))
|
||||
(cl-eval-when (eval load)
|
||||
(unless (require (quote magit-popup) nil t)
|
||||
(defun magit-define-popup-switch (&rest _)
|
||||
(magit--magit-popup-warning))
|
||||
(defun magit-define-popup-option (&rest _)
|
||||
(magit--magit-popup-warning))
|
||||
(defun magit-define-popup-variable (&rest _)
|
||||
(magit--magit-popup-warning))
|
||||
(defun magit-define-popup-action (&rest _)
|
||||
(magit--magit-popup-warning))
|
||||
(defun magit-define-popup-sequence-action (&rest _)
|
||||
(magit--magit-popup-warning))
|
||||
(defun magit-define-popup-key (&rest _)
|
||||
(magit--magit-popup-warning))
|
||||
(defun magit-define-popup-keys-deferred (&rest _)
|
||||
(magit--magit-popup-warning))
|
||||
(defun magit-change-popup-key (&rest _)
|
||||
(magit--magit-popup-warning))
|
||||
(defun magit-remove-popup-key (&rest _)
|
||||
(magit--magit-popup-warning))))
|
||||
|
||||
;;; _
|
||||
(provide 'magit-obsolete)
|
||||
;;; magit-obsolete.el ends here
|
BIN
elpa/magit-20210414.1306/magit-obsolete.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-obsolete.elc
Normal file
Binary file not shown.
326
elpa/magit-20210414.1306/magit-patch.el
Normal file
326
elpa/magit-20210414.1306/magit-patch.el
Normal file
|
@ -0,0 +1,326 @@
|
|||
;;; magit-patch.el --- creating and applying patches -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2008-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
|
||||
;; Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
;; Magit is free software; you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
;;
|
||||
;; Magit is distributed in the hope that it will be useful, but WITHOUT
|
||||
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
;; License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Magit. If not, see http://www.gnu.org/licenses.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; This library implements patch commands.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'magit)
|
||||
|
||||
;;; Options
|
||||
|
||||
(defcustom magit-patch-save-arguments '(exclude "--stat")
|
||||
"Control arguments used by the command `magit-patch-save'.
|
||||
|
||||
`magit-patch-save' (which see) saves a diff for the changes
|
||||
shown in the current buffer in a patch file. It may use the
|
||||
same arguments as used in the buffer or a subset thereof, or
|
||||
a constant list of arguments, depending on this option and
|
||||
the prefix argument."
|
||||
:package-version '(magit . "2.12.0")
|
||||
:group 'magit-diff
|
||||
:type '(choice (const :tag "use buffer arguments" buffer)
|
||||
(cons :tag "use buffer arguments except"
|
||||
(const :format "" exclude)
|
||||
(repeat :format "%v%i\n"
|
||||
(string :tag "Argument")))
|
||||
(repeat :tag "use constant arguments"
|
||||
(string :tag "Argument"))))
|
||||
|
||||
;;; Commands
|
||||
|
||||
;;;###autoload (autoload 'magit-patch "magit-patch" nil t)
|
||||
(transient-define-prefix magit-patch ()
|
||||
"Create or apply patches."
|
||||
["Actions"
|
||||
("c" "Create patches" magit-patch-create)
|
||||
("a" "Apply patch" magit-patch-apply)
|
||||
("s" "Save diff as patch" magit-patch-save)
|
||||
("r" "Request pull" magit-request-pull)])
|
||||
|
||||
;;;###autoload (autoload 'magit-patch-create "magit-patch" nil t)
|
||||
(transient-define-prefix magit-patch-create (range args files)
|
||||
"Create patches for the commits in RANGE.
|
||||
When a single commit is given for RANGE, create a patch for the
|
||||
changes introduced by that commit (unlike 'git format-patch'
|
||||
which creates patches for all commits that are reachable from
|
||||
`HEAD' but not from the specified commit)."
|
||||
:man-page "git-format-patch"
|
||||
:incompatible '(("--subject-prefix=" "--rfc"))
|
||||
["Mail arguments"
|
||||
(6 magit-format-patch:--in-reply-to)
|
||||
(6 magit-format-patch:--thread)
|
||||
(6 magit-format-patch:--from)
|
||||
(6 magit-format-patch:--to)
|
||||
(6 magit-format-patch:--cc)]
|
||||
["Patch arguments"
|
||||
(magit-format-patch:--base)
|
||||
(magit-format-patch:--reroll-count)
|
||||
(5 magit-format-patch:--interdiff)
|
||||
(magit-format-patch:--range-diff)
|
||||
(magit-format-patch:--subject-prefix)
|
||||
("C-m r " "RFC subject prefix" "--rfc")
|
||||
("C-m l " "Add cover letter" "--cover-letter")
|
||||
(5 magit-format-patch:--cover-from-description)
|
||||
(5 magit-format-patch:--notes)
|
||||
(magit-format-patch:--output-directory)]
|
||||
["Diff arguments"
|
||||
(magit-diff:-U)
|
||||
(magit-diff:-M)
|
||||
(magit-diff:-C)
|
||||
(magit-diff:--diff-algorithm)
|
||||
(magit:--)
|
||||
(7 "-b" "Ignore whitespace changes" ("-b" "--ignore-space-change"))
|
||||
(7 "-w" "Ignore all whitespace" ("-w" "--ignore-all-space"))]
|
||||
["Actions"
|
||||
("c" "Create patches" magit-patch-create)]
|
||||
(interactive
|
||||
(if (not (eq transient-current-command 'magit-patch-create))
|
||||
(list nil nil nil)
|
||||
(cons (if-let ((revs (magit-region-values 'commit t)))
|
||||
(concat (car (last revs)) "^.." (car revs))
|
||||
(let ((range (magit-read-range-or-commit
|
||||
"Format range or commit")))
|
||||
(if (string-match-p "\\.\\." range)
|
||||
range
|
||||
(format "%s~..%s" range range))))
|
||||
(let ((args (transient-args 'magit-patch-create)))
|
||||
(list (-filter #'stringp args)
|
||||
(cdr (assoc "--" args)))))))
|
||||
(if (not range)
|
||||
(transient-setup 'magit-patch-create)
|
||||
(magit-run-git "format-patch" range args "--" files)
|
||||
(when (member "--cover-letter" args)
|
||||
(save-match-data
|
||||
(find-file
|
||||
(expand-file-name
|
||||
(concat (when-let ((v (transient-arg-value "--reroll-count=" args)))
|
||||
(format "v%s-" v))
|
||||
"0000-cover-letter.patch")
|
||||
(let ((topdir (magit-toplevel)))
|
||||
(if-let ((dir (transient-arg-value "--output-directory=" args)))
|
||||
(expand-file-name dir topdir)
|
||||
topdir))))))))
|
||||
|
||||
(transient-define-argument magit-format-patch:--in-reply-to ()
|
||||
:description "In reply to"
|
||||
:class 'transient-option
|
||||
:key "C-m C-r"
|
||||
:argument "--in-reply-to=")
|
||||
|
||||
(transient-define-argument magit-format-patch:--thread ()
|
||||
:description "Thread style"
|
||||
:class 'transient-option
|
||||
:key "C-m s "
|
||||
:argument "--thread="
|
||||
:reader #'magit-format-patch-select-thread-style)
|
||||
|
||||
(defun magit-format-patch-select-thread-style (&rest _ignore)
|
||||
(magit-read-char-case "Thread style " t
|
||||
(?d "[d]eep" "deep")
|
||||
(?s "[s]hallow" "shallow")))
|
||||
|
||||
(transient-define-argument magit-format-patch:--base ()
|
||||
:description "Insert base commit"
|
||||
:class 'transient-option
|
||||
:key "C-m b "
|
||||
:argument "--base="
|
||||
:reader #'magit-format-patch-select-base)
|
||||
|
||||
(defun magit-format-patch-select-base (prompt initial-input history)
|
||||
(or (magit-completing-read prompt (cons "auto" (magit-list-refnames))
|
||||
nil nil initial-input history "auto")
|
||||
(user-error "Nothing selected")))
|
||||
|
||||
(transient-define-argument magit-format-patch:--reroll-count ()
|
||||
:description "Reroll count"
|
||||
:class 'transient-option
|
||||
:key "C-m v "
|
||||
:shortarg "-v"
|
||||
:argument "--reroll-count="
|
||||
:reader 'transient-read-number-N+)
|
||||
|
||||
(transient-define-argument magit-format-patch:--interdiff ()
|
||||
:description "Insert interdiff"
|
||||
:class 'transient-option
|
||||
:key "C-m d i"
|
||||
:argument "--interdiff="
|
||||
:reader #'magit-transient-read-revision)
|
||||
|
||||
(transient-define-argument magit-format-patch:--range-diff ()
|
||||
:description "Insert range-diff"
|
||||
:class 'transient-option
|
||||
:key "C-m d r"
|
||||
:argument "--range-diff="
|
||||
:reader #'magit-format-patch-select-range-diff)
|
||||
|
||||
(defun magit-format-patch-select-range-diff (prompt _initial-input _history)
|
||||
(magit-read-range-or-commit prompt))
|
||||
|
||||
(transient-define-argument magit-format-patch:--subject-prefix ()
|
||||
:description "Subject Prefix"
|
||||
:class 'transient-option
|
||||
:key "C-m p "
|
||||
:argument "--subject-prefix=")
|
||||
|
||||
(transient-define-argument magit-format-patch:--cover-from-description ()
|
||||
:description "Use branch description"
|
||||
:class 'transient-option
|
||||
:key "C-m D "
|
||||
:argument "--cover-from-description="
|
||||
:reader #'magit-format-patch-select-description-mode)
|
||||
|
||||
(defun magit-format-patch-select-description-mode (&rest _ignore)
|
||||
(magit-read-char-case "Use description as " t
|
||||
(?m "[m]essage" "message")
|
||||
(?s "[s]ubject" "subject")
|
||||
(?a "[a]uto" "auto")
|
||||
(?n "[n]othing" "none")))
|
||||
|
||||
(transient-define-argument magit-format-patch:--notes ()
|
||||
:description "Insert commentary from notes"
|
||||
:class 'transient-option
|
||||
:key "C-m n "
|
||||
:argument "--notes="
|
||||
:reader #'magit-notes-read-ref)
|
||||
|
||||
(transient-define-argument magit-format-patch:--from ()
|
||||
:description "From"
|
||||
:class 'transient-option
|
||||
:key "C-m C-f"
|
||||
:argument "--from="
|
||||
:reader 'magit-transient-read-person)
|
||||
|
||||
(transient-define-argument magit-format-patch:--to ()
|
||||
:description "To"
|
||||
:class 'transient-option
|
||||
:key "C-m C-t"
|
||||
:argument "--to="
|
||||
:reader 'magit-transient-read-person)
|
||||
|
||||
(transient-define-argument magit-format-patch:--cc ()
|
||||
:description "CC"
|
||||
:class 'transient-option
|
||||
:key "C-m C-c"
|
||||
:argument "--cc="
|
||||
:reader 'magit-transient-read-person)
|
||||
|
||||
(transient-define-argument magit-format-patch:--output-directory ()
|
||||
:description "Output directory"
|
||||
:class 'transient-option
|
||||
:key "C-m o "
|
||||
:shortarg "-o"
|
||||
:argument "--output-directory="
|
||||
:reader 'transient-read-existing-directory)
|
||||
|
||||
;;;###autoload (autoload 'magit-patch-apply "magit-patch" nil t)
|
||||
(transient-define-prefix magit-patch-apply (file &rest args)
|
||||
"Apply the patch file FILE."
|
||||
:man-page "git-apply"
|
||||
["Arguments"
|
||||
("-i" "Also apply to index" "--index")
|
||||
("-c" "Only apply to index" "--cached")
|
||||
("-3" "Fall back on 3way merge" ("-3" "--3way"))]
|
||||
["Actions"
|
||||
("a" "Apply patch" magit-patch-apply)]
|
||||
(interactive
|
||||
(if (not (eq transient-current-command 'magit-patch-apply))
|
||||
(list nil)
|
||||
(list (expand-file-name
|
||||
(read-file-name "Apply patch: "
|
||||
default-directory nil nil
|
||||
(when-let ((file (magit-file-at-point)))
|
||||
(file-relative-name file))))
|
||||
(transient-args 'magit-patch-apply))))
|
||||
(if (not file)
|
||||
(transient-setup 'magit-patch-apply)
|
||||
(magit-run-git "apply" args "--" (magit-convert-filename-for-git file))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-patch-save (file &optional arg)
|
||||
"Write current diff into patch FILE.
|
||||
|
||||
What arguments are used to create the patch depends on the value
|
||||
of `magit-patch-save-arguments' and whether a prefix argument is
|
||||
used.
|
||||
|
||||
If the value is the symbol `buffer', then use the same arguments
|
||||
as the buffer. With a prefix argument use no arguments.
|
||||
|
||||
If the value is a list beginning with the symbol `exclude', then
|
||||
use the same arguments as the buffer except for those matched by
|
||||
entries in the cdr of the list. The comparison is done using
|
||||
`string-prefix-p'. With a prefix argument use the same arguments
|
||||
as the buffer.
|
||||
|
||||
If the value is a list of strings (including the empty list),
|
||||
then use those arguments. With a prefix argument use the same
|
||||
arguments as the buffer.
|
||||
|
||||
Of course the arguments that are required to actually show the
|
||||
same differences as those shown in the buffer are always used."
|
||||
(interactive (list (read-file-name "Write patch file: " default-directory)
|
||||
current-prefix-arg))
|
||||
(unless (derived-mode-p 'magit-diff-mode)
|
||||
(user-error "Only diff buffers can be saved as patches"))
|
||||
(let ((rev magit-buffer-range)
|
||||
(typearg magit-buffer-typearg)
|
||||
(args magit-buffer-diff-args)
|
||||
(files magit-buffer-diff-files))
|
||||
(cond ((eq magit-patch-save-arguments 'buffer)
|
||||
(when arg
|
||||
(setq args nil)))
|
||||
((eq (car-safe magit-patch-save-arguments) 'exclude)
|
||||
(unless arg
|
||||
(setq args (-difference args (cdr magit-patch-save-arguments)))))
|
||||
((not arg)
|
||||
(setq args magit-patch-save-arguments)))
|
||||
(with-temp-file file
|
||||
(magit-git-insert "diff" rev "-p" typearg args "--" files)))
|
||||
(magit-refresh))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-request-pull (url start end)
|
||||
"Request upstream to pull from your public repository.
|
||||
|
||||
URL is the url of your publicly accessible repository.
|
||||
START is a commit that already is in the upstream repository.
|
||||
END is the last commit, usually a branch name, which upstream
|
||||
is asked to pull. START has to be reachable from that commit."
|
||||
(interactive
|
||||
(list (magit-get "remote" (magit-read-remote "Remote") "url")
|
||||
(magit-read-branch-or-commit "Start" (magit-get-upstream-branch))
|
||||
(magit-read-branch-or-commit "End")))
|
||||
(let ((dir default-directory))
|
||||
;; mu4e changes default-directory
|
||||
(compose-mail)
|
||||
(setq default-directory dir))
|
||||
(message-goto-body)
|
||||
(magit-git-insert "request-pull" start url end)
|
||||
(set-buffer-modified-p nil))
|
||||
|
||||
;;; _
|
||||
(provide 'magit-patch)
|
||||
;;; magit-patch.el ends here
|
BIN
elpa/magit-20210414.1306/magit-patch.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-patch.elc
Normal file
Binary file not shown.
16
elpa/magit-20210414.1306/magit-pkg.el
Normal file
16
elpa/magit-20210414.1306/magit-pkg.el
Normal file
|
@ -0,0 +1,16 @@
|
|||
(define-package "magit" "20210414.1306" "A Git porcelain inside Emacs."
|
||||
'((emacs "25.1")
|
||||
(dash "20200524")
|
||||
(git-commit "20200516")
|
||||
(transient "20200601")
|
||||
(with-editor "20200522"))
|
||||
:commit "c7364e169648f454dc73fe50596d827fbf1f0fb7" :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:
|
1209
elpa/magit-20210414.1306/magit-process.el
Normal file
1209
elpa/magit-20210414.1306/magit-process.el
Normal file
File diff suppressed because it is too large
Load Diff
BIN
elpa/magit-20210414.1306/magit-process.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-process.elc
Normal file
Binary file not shown.
164
elpa/magit-20210414.1306/magit-pull.el
Normal file
164
elpa/magit-20210414.1306/magit-pull.el
Normal file
|
@ -0,0 +1,164 @@
|
|||
;;; magit-pull.el --- update local objects and refs -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2008-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
|
||||
;; Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
;; Magit is free software; you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
;;
|
||||
;; Magit is distributed in the hope that it will be useful, but WITHOUT
|
||||
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
;; License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Magit. If not, see http://www.gnu.org/licenses.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; This library implements pull commands.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'magit)
|
||||
|
||||
;;; Options
|
||||
|
||||
(defcustom magit-pull-or-fetch nil
|
||||
"Whether `magit-pull' also offers some fetch suffixes."
|
||||
:package-version '(magit . "3.0.0")
|
||||
:group 'magit-commands
|
||||
:type 'boolean)
|
||||
|
||||
;;; Commands
|
||||
|
||||
;;;###autoload (autoload 'magit-pull "magit-pull" nil t)
|
||||
(transient-define-prefix magit-pull ()
|
||||
"Pull from another repository."
|
||||
:man-page "git-pull"
|
||||
[:description
|
||||
(lambda () (if magit-pull-or-fetch "Pull arguments" "Arguments"))
|
||||
("-r" "Rebase local commits" ("-r" "--rebase"))
|
||||
("-A" "Autostash" "--autostash" :level 7)]
|
||||
[:description
|
||||
(lambda ()
|
||||
(if-let ((branch (magit-get-current-branch)))
|
||||
(concat
|
||||
(propertize "Pull into " 'face 'transient-heading)
|
||||
(propertize branch 'face 'magit-branch-local)
|
||||
(propertize " from" 'face 'transient-heading))
|
||||
(propertize "Pull from" 'face 'transient-heading)))
|
||||
("p" magit-pull-from-pushremote)
|
||||
("u" magit-pull-from-upstream)
|
||||
("e" "elsewhere" magit-pull-branch)]
|
||||
["Fetch from"
|
||||
:if-non-nil magit-pull-or-fetch
|
||||
("f" "remotes" magit-fetch-all-no-prune)
|
||||
("F" "remotes and prune" magit-fetch-all-prune)]
|
||||
["Fetch"
|
||||
:if-non-nil magit-pull-or-fetch
|
||||
("o" "another branch" magit-fetch-branch)
|
||||
("s" "explicit refspec" magit-fetch-refspec)
|
||||
("m" "submodules" magit-fetch-modules)]
|
||||
["Configure"
|
||||
("r" magit-branch.<branch>.rebase :if magit-get-current-branch)
|
||||
("C" "variables..." magit-branch-configure)]
|
||||
(interactive)
|
||||
(transient-setup 'magit-pull nil nil :scope (magit-get-current-branch)))
|
||||
|
||||
(defun magit-pull-arguments ()
|
||||
(transient-args 'magit-pull))
|
||||
|
||||
;;;###autoload (autoload 'magit-pull-from-pushremote "magit-pull" nil t)
|
||||
(transient-define-suffix magit-pull-from-pushremote (args)
|
||||
"Pull from the push-remote of the current branch.
|
||||
|
||||
With a prefix argument or when the push-remote is either not
|
||||
configured or unusable, then let the user first configure the
|
||||
push-remote."
|
||||
:if 'magit-get-current-branch
|
||||
:description 'magit-pull--pushbranch-description
|
||||
(interactive (list (magit-pull-arguments)))
|
||||
(pcase-let ((`(,branch ,remote)
|
||||
(magit--select-push-remote "pull from there")))
|
||||
(run-hooks 'magit-credential-hook)
|
||||
(magit-run-git-async "pull" args remote branch)))
|
||||
|
||||
(defun magit-pull--pushbranch-description ()
|
||||
;; Also used by `magit-rebase-onto-pushremote'.
|
||||
(let* ((branch (magit-get-current-branch))
|
||||
(target (magit-get-push-branch branch t))
|
||||
(remote (magit-get-push-remote branch))
|
||||
(v (magit--push-remote-variable branch t)))
|
||||
(cond
|
||||
(target)
|
||||
((member remote (magit-list-remotes))
|
||||
(format "%s, replacing non-existent" v))
|
||||
(remote
|
||||
(format "%s, replacing invalid" v))
|
||||
(t
|
||||
(format "%s, setting that" v)))))
|
||||
|
||||
;;;###autoload (autoload 'magit-pull-from-upstream "magit-pull" nil t)
|
||||
(transient-define-suffix magit-pull-from-upstream (args)
|
||||
"Pull from the upstream of the current branch.
|
||||
|
||||
With a prefix argument or when the upstream is either not
|
||||
configured or unusable, then let the user first configure
|
||||
the upstream."
|
||||
:if 'magit-get-current-branch
|
||||
:description 'magit-pull--upstream-description
|
||||
(interactive (list (magit-pull-arguments)))
|
||||
(let* ((branch (or (magit-get-current-branch)
|
||||
(user-error "No branch is checked out")))
|
||||
(remote (magit-get "branch" branch "remote"))
|
||||
(merge (magit-get "branch" branch "merge")))
|
||||
(when (or current-prefix-arg
|
||||
(not (or (magit-get-upstream-branch branch)
|
||||
(magit--unnamed-upstream-p remote merge))))
|
||||
(magit-set-upstream-branch
|
||||
branch (magit-read-upstream-branch
|
||||
branch (format "Set upstream of %s and pull from there" branch)))
|
||||
(setq remote (magit-get "branch" branch "remote"))
|
||||
(setq merge (magit-get "branch" branch "merge")))
|
||||
(run-hooks 'magit-credential-hook)
|
||||
(magit-run-git-with-editor "pull" args remote merge)))
|
||||
|
||||
(defun magit-pull--upstream-description ()
|
||||
(when-let ((branch (magit-get-current-branch)))
|
||||
(or (magit-get-upstream-branch branch)
|
||||
(let ((remote (magit-get "branch" branch "remote"))
|
||||
(merge (magit-get "branch" branch "merge"))
|
||||
(u (magit--propertize-face "@{upstream}" 'bold)))
|
||||
(cond
|
||||
((magit--unnamed-upstream-p remote merge)
|
||||
(format "%s of %s"
|
||||
(magit--propertize-face merge 'magit-branch-remote)
|
||||
(magit--propertize-face remote 'bold)))
|
||||
((magit--valid-upstream-p remote merge)
|
||||
(concat u ", replacing non-existent"))
|
||||
((or remote merge)
|
||||
(concat u ", replacing invalid"))
|
||||
(t
|
||||
(concat u ", setting that")))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-pull-branch (source args)
|
||||
"Pull from a branch read in the minibuffer."
|
||||
(interactive (list (magit-read-remote-branch "Pull" nil nil nil t)
|
||||
(magit-pull-arguments)))
|
||||
(run-hooks 'magit-credential-hook)
|
||||
(pcase-let ((`(,remote . ,branch)
|
||||
(magit-get-tracked source)))
|
||||
(magit-run-git-with-editor "pull" args remote branch)))
|
||||
|
||||
;;; _
|
||||
(provide 'magit-pull)
|
||||
;;; magit-pull.el ends here
|
BIN
elpa/magit-20210414.1306/magit-pull.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-pull.elc
Normal file
Binary file not shown.
339
elpa/magit-20210414.1306/magit-push.el
Normal file
339
elpa/magit-20210414.1306/magit-push.el
Normal file
|
@ -0,0 +1,339 @@
|
|||
;;; magit-push.el --- update remote objects and refs -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2008-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
|
||||
;; Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
;; Magit is free software; you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
;;
|
||||
;; Magit is distributed in the hope that it will be useful, but WITHOUT
|
||||
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
;; License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Magit. If not, see http://www.gnu.org/licenses.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; This library implements push commands.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'magit)
|
||||
|
||||
;;; Commands
|
||||
|
||||
;;;###autoload (autoload 'magit-push "magit-push" nil t)
|
||||
(transient-define-prefix magit-push ()
|
||||
"Push to another repository."
|
||||
:man-page "git-push"
|
||||
["Arguments"
|
||||
("-f" "Force with lease" (nil "--force-with-lease"))
|
||||
("-F" "Force" ("-f" "--force"))
|
||||
("-h" "Disable hooks" "--no-verify")
|
||||
("-n" "Dry run" ("-n" "--dry-run"))
|
||||
(5 "-u" "Set upstream" "--set-upstream")
|
||||
(7 "-t" "Follow tags" "--follow-tags")]
|
||||
[:if magit-get-current-branch
|
||||
:description (lambda ()
|
||||
(format (propertize "Push %s to" 'face 'transient-heading)
|
||||
(propertize (magit-get-current-branch)
|
||||
'face 'magit-branch-local)))
|
||||
("p" magit-push-current-to-pushremote)
|
||||
("u" magit-push-current-to-upstream)
|
||||
("e" "elsewhere" magit-push-current)]
|
||||
["Push"
|
||||
[("o" "another branch" magit-push-other)
|
||||
("r" "explicit refspecs" magit-push-refspecs)
|
||||
("m" "matching branches" magit-push-matching)]
|
||||
[("T" "a tag" magit-push-tag)
|
||||
("t" "all tags" magit-push-tags)
|
||||
(6 "n" "a note ref" magit-push-notes-ref)]]
|
||||
["Configure"
|
||||
("C" "Set variables..." magit-branch-configure)])
|
||||
|
||||
(defun magit-push-arguments ()
|
||||
(transient-args 'magit-push))
|
||||
|
||||
(defun magit-git-push (branch target args)
|
||||
(run-hooks 'magit-credential-hook)
|
||||
;; If the remote branch already exists, then we do not have to
|
||||
;; qualify the target, which we prefer to avoid doing because
|
||||
;; using the default namespace is wrong in obscure cases.
|
||||
(pcase-let ((namespace (if (magit-get-tracked target) "" "refs/heads/"))
|
||||
(`(,remote . ,target)
|
||||
(magit-split-branch-name target)))
|
||||
(magit-run-git-async "push" "-v" args remote
|
||||
(format "%s:%s%s" branch namespace target))))
|
||||
|
||||
;;;###autoload (autoload 'magit-push-current-to-pushremote "magit-push" nil t)
|
||||
(transient-define-suffix magit-push-current-to-pushremote (args)
|
||||
"Push the current branch to its push-remote.
|
||||
|
||||
When the push-remote is not configured, then read the push-remote
|
||||
from the user, set it, and then push to it. With a prefix
|
||||
argument the push-remote can be changed before pushed to it."
|
||||
:if 'magit-get-current-branch
|
||||
:description 'magit-push--pushbranch-description
|
||||
(interactive (list (magit-push-arguments)))
|
||||
(pcase-let ((`(,branch ,remote ,changed)
|
||||
(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)))
|
||||
(run-hooks 'magit-credential-hook)
|
||||
(magit-run-git-async "push" "-v" args remote
|
||||
(format "refs/heads/%s:refs/heads/%s"
|
||||
branch branch)))) ; see #3847 and #3872
|
||||
|
||||
(defun magit-push--pushbranch-description ()
|
||||
(let* ((branch (magit-get-current-branch))
|
||||
(target (magit-get-push-branch branch t))
|
||||
(remote (magit-get-push-remote branch))
|
||||
(v (magit--push-remote-variable branch t)))
|
||||
(cond
|
||||
(target)
|
||||
((member remote (magit-list-remotes))
|
||||
(format "%s, creating it"
|
||||
(magit--propertize-face (concat remote "/" branch)
|
||||
'magit-branch-remote)))
|
||||
(remote
|
||||
(format "%s, replacing invalid" v))
|
||||
(t
|
||||
(format "%s, setting that" v)))))
|
||||
|
||||
;;;###autoload (autoload 'magit-push-current-to-upstream "magit-push" nil t)
|
||||
(transient-define-suffix magit-push-current-to-upstream (args)
|
||||
"Push the current branch to its upstream branch.
|
||||
|
||||
With a prefix argument or when the upstream is either not
|
||||
configured or unusable, then let the user first configure
|
||||
the upstream."
|
||||
:if 'magit-get-current-branch
|
||||
:description 'magit-push--upstream-description
|
||||
(interactive (list (magit-push-arguments)))
|
||||
(let* ((branch (or (magit-get-current-branch)
|
||||
(user-error "No branch is checked out")))
|
||||
(remote (magit-get "branch" branch "remote"))
|
||||
(merge (magit-get "branch" branch "merge")))
|
||||
(when (or current-prefix-arg
|
||||
(not (or (magit-get-upstream-branch branch)
|
||||
(magit--unnamed-upstream-p remote merge)
|
||||
(magit--valid-upstream-p remote merge))))
|
||||
(let* ((branches (-union (--map (concat it "/" branch)
|
||||
(magit-list-remotes))
|
||||
(magit-list-remote-branch-names)))
|
||||
(upstream (magit-completing-read
|
||||
(format "Set upstream of %s and push there" branch)
|
||||
branches nil nil nil 'magit-revision-history
|
||||
(or (car (member (magit-remote-branch-at-point) branches))
|
||||
(car (member "origin/master" branches)))))
|
||||
(upstream* (or (magit-get-tracked upstream)
|
||||
(magit-split-branch-name upstream))))
|
||||
(setq remote (car upstream*))
|
||||
(setq merge (cdr upstream*))
|
||||
(unless (string-prefix-p "refs/" merge)
|
||||
;; User selected a non-existent remote-tracking branch.
|
||||
;; It is very likely, but not certain, that this is the
|
||||
;; correct thing to do. It is even more likely that it
|
||||
;; 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)))
|
||||
(cl-pushnew "--set-upstream" args :test #'equal))
|
||||
(run-hooks 'magit-credential-hook)
|
||||
(magit-run-git-async "push" "-v" args remote (concat branch ":" merge))))
|
||||
|
||||
(defun magit-push--upstream-description ()
|
||||
(when-let ((branch (magit-get-current-branch)))
|
||||
(or (magit-get-upstream-branch branch)
|
||||
(let ((remote (magit-get "branch" branch "remote"))
|
||||
(merge (magit-get "branch" branch "merge"))
|
||||
(u (magit--propertize-face "@{upstream}" 'bold)))
|
||||
(cond
|
||||
((magit--unnamed-upstream-p remote merge)
|
||||
(format "%s as %s"
|
||||
(magit--propertize-face remote 'bold)
|
||||
(magit--propertize-face merge 'magit-branch-remote)))
|
||||
((magit--valid-upstream-p remote merge)
|
||||
(format "%s creating %s"
|
||||
(magit--propertize-face remote 'magit-branch-remote)
|
||||
(magit--propertize-face merge 'magit-branch-remote)))
|
||||
((or remote merge)
|
||||
(concat u ", creating it and replacing invalid"))
|
||||
(t
|
||||
(concat u ", creating it")))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-push-current (target args)
|
||||
"Push the current branch to a branch read in the minibuffer."
|
||||
(interactive
|
||||
(--if-let (magit-get-current-branch)
|
||||
(list (magit-read-remote-branch (format "Push %s to" it)
|
||||
nil nil it 'confirm)
|
||||
(magit-push-arguments))
|
||||
(user-error "No branch is checked out")))
|
||||
(magit-git-push (magit-get-current-branch) target args))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-push-other (source target args)
|
||||
"Push an arbitrary branch or commit somewhere.
|
||||
Both the source and the target are read in the minibuffer."
|
||||
(interactive
|
||||
(let ((source (magit-read-local-branch-or-commit "Push")))
|
||||
(list source
|
||||
(magit-read-remote-branch
|
||||
(format "Push %s to" source) nil
|
||||
(if (magit-local-branch-p source)
|
||||
(or (magit-get-push-branch source)
|
||||
(magit-get-upstream-branch source))
|
||||
(and (magit-rev-ancestor-p source "HEAD")
|
||||
(or (magit-get-push-branch)
|
||||
(magit-get-upstream-branch))))
|
||||
source 'confirm)
|
||||
(magit-push-arguments))))
|
||||
(magit-git-push source target args))
|
||||
|
||||
(defvar magit-push-refspecs-history nil)
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-push-refspecs (remote refspecs args)
|
||||
"Push one or multiple REFSPECS to a REMOTE.
|
||||
Both the REMOTE and the REFSPECS are read in the minibuffer. To
|
||||
use multiple REFSPECS, separate them with commas. Completion is
|
||||
only available for the part before the colon, or when no colon
|
||||
is used."
|
||||
(interactive
|
||||
(list (magit-read-remote "Push to remote")
|
||||
(split-string (magit-completing-read-multiple
|
||||
"Push refspec,s"
|
||||
(cons "HEAD" (magit-list-local-branch-names))
|
||||
nil nil 'magit-push-refspecs-history)
|
||||
crm-default-separator t)
|
||||
(magit-push-arguments)))
|
||||
(run-hooks 'magit-credential-hook)
|
||||
(magit-run-git-async "push" "-v" args remote refspecs))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-push-matching (remote &optional args)
|
||||
"Push all matching branches to another repository.
|
||||
If multiple remotes exist, then read one from the user.
|
||||
If just one exists, use that without requiring confirmation."
|
||||
(interactive (list (magit-read-remote "Push matching branches to" nil t)
|
||||
(magit-push-arguments)))
|
||||
(run-hooks 'magit-credential-hook)
|
||||
(magit-run-git-async "push" "-v" args remote ":"))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-push-tags (remote &optional args)
|
||||
"Push all tags to another repository.
|
||||
If only one remote exists, then push to that. Otherwise prompt
|
||||
for a remote, offering the remote configured for the current
|
||||
branch as default."
|
||||
(interactive (list (magit-read-remote "Push tags to remote" nil t)
|
||||
(magit-push-arguments)))
|
||||
(run-hooks 'magit-credential-hook)
|
||||
(magit-run-git-async "push" remote "--tags" args))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-push-tag (tag remote &optional args)
|
||||
"Push a tag to another repository."
|
||||
(interactive
|
||||
(let ((tag (magit-read-tag "Push tag")))
|
||||
(list tag (magit-read-remote (format "Push %s to remote" tag) nil t)
|
||||
(magit-push-arguments))))
|
||||
(run-hooks 'magit-credential-hook)
|
||||
(magit-run-git-async "push" remote tag args))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-push-notes-ref (ref remote &optional args)
|
||||
"Push a notes ref to another repository."
|
||||
(interactive
|
||||
(let ((note (magit-notes-read-ref "Push notes" nil nil)))
|
||||
(list note
|
||||
(magit-read-remote (format "Push %s to remote" note) nil t)
|
||||
(magit-push-arguments))))
|
||||
(run-hooks 'magit-credential-hook)
|
||||
(magit-run-git-async "push" remote ref args))
|
||||
|
||||
;;;###autoload (autoload 'magit-push-implicitly "magit-push" nil t)
|
||||
(transient-define-suffix magit-push-implicitly (args)
|
||||
"Push somewhere without using an explicit refspec.
|
||||
|
||||
This command simply runs \"git push -v [ARGS]\". ARGS are the
|
||||
arguments specified in the popup buffer. No explicit refspec
|
||||
arguments are used. Instead the behavior depends on at least
|
||||
these Git variables: `push.default', `remote.pushDefault',
|
||||
`branch.<branch>.pushRemote', `branch.<branch>.remote',
|
||||
`branch.<branch>.merge', and `remote.<remote>.push'.
|
||||
|
||||
If you add this suffix to a transient prefix without explicitly
|
||||
specifying the description, then an attempt is made to predict
|
||||
what this command will do. For example:
|
||||
|
||||
(transient-insert-suffix 'magit-push \"p\"
|
||||
'(\"i\" magit-push-implicitly))"
|
||||
:description 'magit-push-implicitly--desc
|
||||
(interactive (list (magit-push-arguments)))
|
||||
(run-hooks 'magit-credential-hook)
|
||||
(magit-run-git-async "push" "-v" args))
|
||||
|
||||
(defun magit-push-implicitly--desc ()
|
||||
(let ((default (magit-get "push.default")))
|
||||
(unless (equal default "nothing")
|
||||
(or (when-let ((remote (or (magit-get-remote)
|
||||
(magit-remote-p "origin")))
|
||||
(refspec (magit-get "remote" remote "push")))
|
||||
(format "%s using %s"
|
||||
(magit--propertize-face remote 'magit-branch-remote)
|
||||
(magit--propertize-face refspec 'bold)))
|
||||
(--when-let (and (not (magit-get-push-branch))
|
||||
(magit-get-upstream-branch))
|
||||
(format "%s aka %s\n"
|
||||
(magit-branch-set-face it)
|
||||
(magit--propertize-face "@{upstream}" 'bold)))
|
||||
(--when-let (magit-get-push-branch)
|
||||
(format "%s aka %s\n"
|
||||
(magit-branch-set-face it)
|
||||
(magit--propertize-face "pushRemote" 'bold)))
|
||||
(--when-let (magit-get-@{push}-branch)
|
||||
(format "%s aka %s\n"
|
||||
(magit-branch-set-face it)
|
||||
(magit--propertize-face "@{push}" 'bold)))
|
||||
(format "using %s (%s is %s)\n"
|
||||
(magit--propertize-face "git push" 'bold)
|
||||
(magit--propertize-face "push.default" 'bold)
|
||||
(magit--propertize-face default 'bold))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-push-to-remote (remote args)
|
||||
"Push to REMOTE without using an explicit refspec.
|
||||
The REMOTE is read in the minibuffer.
|
||||
|
||||
This command simply runs \"git push -v [ARGS] REMOTE\". ARGS
|
||||
are the arguments specified in the popup buffer. No refspec
|
||||
arguments are used. Instead the behavior depends on at least
|
||||
these Git variables: `push.default', `remote.pushDefault',
|
||||
`branch.<branch>.pushRemote', `branch.<branch>.remote',
|
||||
`branch.<branch>.merge', and `remote.<remote>.push'."
|
||||
(interactive (list (magit-read-remote "Push to remote")
|
||||
(magit-push-arguments)))
|
||||
(run-hooks 'magit-credential-hook)
|
||||
(magit-run-git-async "push" "-v" args remote))
|
||||
|
||||
(defun magit-push-to-remote--desc ()
|
||||
(format "using %s\n" (magit--propertize-face "git push <remote>" 'bold)))
|
||||
|
||||
;;; _
|
||||
(provide 'magit-push)
|
||||
;;; magit-push.el ends here
|
BIN
elpa/magit-20210414.1306/magit-push.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-push.elc
Normal file
Binary file not shown.
210
elpa/magit-20210414.1306/magit-reflog.el
Normal file
210
elpa/magit-20210414.1306/magit-reflog.el
Normal file
|
@ -0,0 +1,210 @@
|
|||
;;; magit-reflog.el --- inspect ref history -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2010-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
|
||||
;; Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
;; Magit is free software; you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
;;
|
||||
;; Magit is distributed in the hope that it will be useful, but WITHOUT
|
||||
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
;; License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Magit. If not, see http://www.gnu.org/licenses.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; This library implements support for looking at Git reflogs.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'magit-core)
|
||||
(require 'magit-log)
|
||||
|
||||
;;; Options
|
||||
|
||||
(defcustom magit-reflog-limit 256
|
||||
"Maximal number of entries initially shown in reflog buffers.
|
||||
The limit in the current buffer can be changed using \"+\"
|
||||
and \"-\"."
|
||||
:package-version '(magit . "3.0.0")
|
||||
:group 'magit-commands
|
||||
:type 'number)
|
||||
|
||||
(defcustom magit-reflog-margin
|
||||
(list (nth 0 magit-log-margin)
|
||||
(nth 1 magit-log-margin)
|
||||
'magit-log-margin-width nil
|
||||
(nth 4 magit-log-margin))
|
||||
"Format of the margin in `magit-reflog-mode' buffers.
|
||||
|
||||
The value has the form (INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH).
|
||||
|
||||
If INIT is non-nil, then the margin is shown initially.
|
||||
STYLE controls how to format the author or committer date.
|
||||
It can be one of `age' (to show the age of the commit),
|
||||
`age-abbreviated' (to abbreviate the time unit to a character),
|
||||
or a string (suitable for `format-time-string') to show the
|
||||
actual date. Option `magit-log-margin-show-committer-date'
|
||||
controls which date is being displayed.
|
||||
WIDTH controls the width of the margin. This exists for forward
|
||||
compatibility and currently the value should not be changed.
|
||||
AUTHOR controls whether the name of the author is also shown by
|
||||
default.
|
||||
AUTHOR-WIDTH has to be an integer. When the name of the author
|
||||
is shown, then this specifies how much space is used to do so."
|
||||
:package-version '(magit . "2.9.0")
|
||||
:group 'magit-log
|
||||
:group 'magit-margin
|
||||
:type magit-log-margin--custom-type
|
||||
:initialize 'magit-custom-initialize-reset
|
||||
:set-after '(magit-log-margin)
|
||||
:set (apply-partially #'magit-margin-set-variable 'magit-reflog-mode))
|
||||
|
||||
;;; Faces
|
||||
|
||||
(defface magit-reflog-commit '((t :foreground "green"))
|
||||
"Face for commit commands in reflogs."
|
||||
:group 'magit-faces)
|
||||
|
||||
(defface magit-reflog-amend '((t :foreground "magenta"))
|
||||
"Face for amend commands in reflogs."
|
||||
:group 'magit-faces)
|
||||
|
||||
(defface magit-reflog-merge '((t :foreground "green"))
|
||||
"Face for merge, checkout and branch commands in reflogs."
|
||||
:group 'magit-faces)
|
||||
|
||||
(defface magit-reflog-checkout '((t :foreground "blue"))
|
||||
"Face for checkout commands in reflogs."
|
||||
:group 'magit-faces)
|
||||
|
||||
(defface magit-reflog-reset '((t :foreground "red"))
|
||||
"Face for reset commands in reflogs."
|
||||
:group 'magit-faces)
|
||||
|
||||
(defface magit-reflog-rebase '((t :foreground "magenta"))
|
||||
"Face for rebase commands in reflogs."
|
||||
:group 'magit-faces)
|
||||
|
||||
(defface magit-reflog-cherry-pick '((t :foreground "green"))
|
||||
"Face for cherry-pick commands in reflogs."
|
||||
:group 'magit-faces)
|
||||
|
||||
(defface magit-reflog-remote '((t :foreground "cyan"))
|
||||
"Face for pull and clone commands in reflogs."
|
||||
:group 'magit-faces)
|
||||
|
||||
(defface magit-reflog-other '((t :foreground "cyan"))
|
||||
"Face for other commands in reflogs."
|
||||
:group 'magit-faces)
|
||||
|
||||
;;; Commands
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-reflog-current ()
|
||||
"Display the reflog of the current branch.
|
||||
If `HEAD' is detached, then show the reflog for that instead."
|
||||
(interactive)
|
||||
(magit-reflog-setup-buffer (or (magit-get-current-branch) "HEAD")))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-reflog-other (ref)
|
||||
"Display the reflog of a branch or another ref."
|
||||
(interactive (list (magit-read-local-branch-or-ref "Show reflog for")))
|
||||
(magit-reflog-setup-buffer ref))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-reflog-head ()
|
||||
"Display the `HEAD' reflog."
|
||||
(interactive)
|
||||
(magit-reflog-setup-buffer "HEAD"))
|
||||
|
||||
;;; Mode
|
||||
|
||||
(defvar magit-reflog-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(set-keymap-parent map magit-log-mode-map)
|
||||
(define-key map "\C-c\C-n" 'undefined)
|
||||
(define-key map "L" 'magit-margin-settings)
|
||||
map)
|
||||
"Keymap for `magit-reflog-mode'.")
|
||||
|
||||
(define-derived-mode magit-reflog-mode magit-mode "Magit Reflog"
|
||||
"Mode for looking at Git reflog.
|
||||
|
||||
This mode is documented in info node `(magit)Reflog'.
|
||||
|
||||
\\<magit-mode-map>\
|
||||
Type \\[magit-refresh] to refresh the current buffer.
|
||||
Type \\[magit-visit-thing] or \\[magit-diff-show-or-scroll-up] \
|
||||
to visit the commit at point.
|
||||
|
||||
Type \\[magit-cherry-pick] to apply the commit at point.
|
||||
Type \\[magit-reset] to reset `HEAD' to the commit at point.
|
||||
|
||||
\\{magit-reflog-mode-map}"
|
||||
:group 'magit-log
|
||||
(hack-dir-local-variables-non-file-buffer))
|
||||
|
||||
(defun magit-reflog-setup-buffer (ref)
|
||||
(require 'magit)
|
||||
(magit-setup-buffer #'magit-reflog-mode nil
|
||||
(magit-buffer-refname ref)
|
||||
(magit-buffer-log-args (list (format "-n%s" magit-reflog-limit)))))
|
||||
|
||||
(defun magit-reflog-refresh-buffer ()
|
||||
(magit-set-header-line-format (concat "Reflog for " magit-buffer-refname))
|
||||
(magit-insert-section (reflogbuf)
|
||||
(magit-git-wash (apply-partially 'magit-log-wash-log 'reflog)
|
||||
"reflog" "show" "--format=%h%x00%aN%x00%gd%x00%gs" "--date=raw"
|
||||
magit-buffer-log-args magit-buffer-refname "--")))
|
||||
|
||||
(cl-defmethod magit-buffer-value (&context (major-mode magit-reflog-mode))
|
||||
magit-buffer-refname)
|
||||
|
||||
(defvar magit-reflog-labels
|
||||
'(("commit" . magit-reflog-commit)
|
||||
("amend" . magit-reflog-amend)
|
||||
("merge" . magit-reflog-merge)
|
||||
("checkout" . magit-reflog-checkout)
|
||||
("branch" . magit-reflog-checkout)
|
||||
("reset" . magit-reflog-reset)
|
||||
("rebase" . magit-reflog-rebase)
|
||||
("cherry-pick" . magit-reflog-cherry-pick)
|
||||
("initial" . magit-reflog-commit)
|
||||
("pull" . magit-reflog-remote)
|
||||
("clone" . magit-reflog-remote)
|
||||
("autosave" . magit-reflog-commit)
|
||||
("restart" . magit-reflog-reset)))
|
||||
|
||||
(defun magit-reflog-format-subject (subject)
|
||||
(let* ((match (string-match magit-reflog-subject-re subject))
|
||||
(command (and match (match-string 1 subject)))
|
||||
(option (and match (match-string 2 subject)))
|
||||
(type (and match (match-string 3 subject)))
|
||||
(label (if (string= command "commit")
|
||||
(or type command)
|
||||
command))
|
||||
(text (if (string= command "commit")
|
||||
label
|
||||
(mapconcat #'identity
|
||||
(delq nil (list command option type))
|
||||
" "))))
|
||||
(format "%-16s "
|
||||
(magit--propertize-face
|
||||
text (or (cdr (assoc label magit-reflog-labels))
|
||||
'magit-reflog-other)))))
|
||||
|
||||
;;; _
|
||||
(provide 'magit-reflog)
|
||||
;;; magit-reflog.el ends here
|
BIN
elpa/magit-20210414.1306/magit-reflog.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-reflog.elc
Normal file
Binary file not shown.
753
elpa/magit-20210414.1306/magit-refs.el
Normal file
753
elpa/magit-20210414.1306/magit-refs.el
Normal file
|
@ -0,0 +1,753 @@
|
|||
;;; magit-refs.el --- listing references -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2010-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
|
||||
;; Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
;; Magit is free software; you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
;;
|
||||
;; Magit is distributed in the hope that it will be useful, but WITHOUT
|
||||
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
;; License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Magit. If not, see http://www.gnu.org/licenses.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; This library implements support for listing references in a buffer.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'magit)
|
||||
|
||||
;;; Options
|
||||
|
||||
(defgroup magit-refs nil
|
||||
"Inspect and manipulate Git branches and tags."
|
||||
:link '(info-link "(magit)References Buffer")
|
||||
:group 'magit-modes)
|
||||
|
||||
(defcustom magit-refs-mode-hook nil
|
||||
"Hook run after entering Magit-Refs mode."
|
||||
:package-version '(magit . "2.1.0")
|
||||
:group 'magit-refs
|
||||
:type 'hook)
|
||||
|
||||
(defcustom magit-refs-sections-hook
|
||||
'(magit-insert-error-header
|
||||
magit-insert-branch-description
|
||||
magit-insert-local-branches
|
||||
magit-insert-remote-branches
|
||||
magit-insert-tags)
|
||||
"Hook run to insert sections into a references buffer."
|
||||
:package-version '(magit . "2.1.0")
|
||||
:group 'magit-refs
|
||||
:type 'hook)
|
||||
|
||||
(defcustom magit-refs-show-commit-count nil
|
||||
"Whether to show commit counts in Magit-Refs mode buffers.
|
||||
|
||||
all Show counts for branches and tags.
|
||||
branch Show counts for branches only.
|
||||
nil Never show counts.
|
||||
|
||||
To change the value in an existing buffer use the command
|
||||
`magit-refs-show-commit-count'"
|
||||
:package-version '(magit . "2.1.0")
|
||||
:group 'magit-refs
|
||||
:safe (lambda (val) (memq val '(all branch nil)))
|
||||
:type '(choice (const all :tag "For branches and tags")
|
||||
(const branch :tag "For branches only")
|
||||
(const nil :tag "Never")))
|
||||
(put 'magit-refs-show-commit-count 'safe-local-variable 'symbolp)
|
||||
(put 'magit-refs-show-commit-count 'permanent-local t)
|
||||
|
||||
(defcustom magit-refs-pad-commit-counts nil
|
||||
"Whether to pad all counts on all sides in `magit-refs-mode' buffers.
|
||||
|
||||
If this is nil, then some commit counts are displayed right next
|
||||
to one of the branches that appear next to the count, without any
|
||||
space in between. This might look bad if the branch name faces
|
||||
look too similar to `magit-dimmed'.
|
||||
|
||||
If this is non-nil, then spaces are placed on both sides of all
|
||||
commit counts."
|
||||
:package-version '(magit . "2.12.0")
|
||||
:group 'magit-refs
|
||||
:type 'boolean)
|
||||
|
||||
(defvar magit-refs-show-push-remote nil
|
||||
"Whether to show the push-remotes of local branches.
|
||||
Also show the commits that the local branch is ahead and behind
|
||||
the push-target. Unfortunately there is a bug in Git that makes
|
||||
this useless (the commits ahead and behind the upstream are
|
||||
shown), so this isn't enabled yet.")
|
||||
|
||||
(defcustom magit-refs-show-remote-prefix nil
|
||||
"Whether to show the remote prefix in lists of remote branches.
|
||||
|
||||
This is redundant because the name of the remote is already shown
|
||||
in the heading preceding the list of its branches."
|
||||
:package-version '(magit . "2.12.0")
|
||||
:group 'magit-refs
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom magit-refs-margin
|
||||
(list nil
|
||||
(nth 1 magit-log-margin)
|
||||
'magit-log-margin-width nil
|
||||
(nth 4 magit-log-margin))
|
||||
"Format of the margin in `magit-refs-mode' buffers.
|
||||
|
||||
The value has the form (INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH).
|
||||
|
||||
If INIT is non-nil, then the margin is shown initially.
|
||||
STYLE controls how to format the author or committer date.
|
||||
It can be one of `age' (to show the age of the commit),
|
||||
`age-abbreviated' (to abbreviate the time unit to a character),
|
||||
or a string (suitable for `format-time-string') to show the
|
||||
actual date. Option `magit-log-margin-show-committer-date'
|
||||
controls which date is being displayed.
|
||||
WIDTH controls the width of the margin. This exists for forward
|
||||
compatibility and currently the value should not be changed.
|
||||
AUTHOR controls whether the name of the author is also shown by
|
||||
default.
|
||||
AUTHOR-WIDTH has to be an integer. When the name of the author
|
||||
is shown, then this specifies how much space is used to do so."
|
||||
:package-version '(magit . "2.9.0")
|
||||
:group 'magit-refs
|
||||
:group 'magit-margin
|
||||
:safe (lambda (val) (memq val '(all branch nil)))
|
||||
:type magit-log-margin--custom-type
|
||||
:initialize 'magit-custom-initialize-reset
|
||||
:set-after '(magit-log-margin)
|
||||
:set (apply-partially #'magit-margin-set-variable 'magit-refs-mode))
|
||||
|
||||
(defcustom magit-refs-margin-for-tags nil
|
||||
"Whether to show information about tags in the margin.
|
||||
|
||||
This is disabled by default because it is slow if there are many
|
||||
tags."
|
||||
:package-version '(magit . "2.9.0")
|
||||
:group 'magit-refs
|
||||
:group 'magit-margin
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom magit-refs-primary-column-width (cons 16 32)
|
||||
"Width of the focus column in `magit-refs-mode' buffers.
|
||||
|
||||
The primary column is the column that contains the name of the
|
||||
branch that the current row is about.
|
||||
|
||||
If this is an integer, then the column is that many columns wide.
|
||||
Otherwise it has to be a cons-cell of two integers. The first
|
||||
specifies the minimal width, the second the maximal width. In that
|
||||
case the actual width is determined using the length of the names
|
||||
of the shown local branches. (Remote branches and tags are not
|
||||
taken into account when calculating to optimal width.)"
|
||||
:package-version '(magit . "2.12.0")
|
||||
:group 'magit-refs
|
||||
:type '(choice (integer :tag "Constant wide")
|
||||
(cons :tag "Wide constrains"
|
||||
(integer :tag "Minimum")
|
||||
(integer :tag "Maximum"))))
|
||||
|
||||
(defcustom magit-refs-focus-column-width 5
|
||||
"Width of the focus column in `magit-refs-mode' buffers.
|
||||
|
||||
The focus column is the first column, which marks one
|
||||
branch (usually the current branch) as the focused branch using
|
||||
\"*\" or \"@\". For each other reference, this column optionally
|
||||
shows how many commits it is ahead of the focused branch and \"<\", or
|
||||
if it isn't ahead then the commits it is behind and \">\", or if it
|
||||
isn't behind either, then a \"=\".
|
||||
|
||||
This column may also display only \"*\" or \"@\" for the focused
|
||||
branch, in which case this option is ignored. Use \"L v\" to
|
||||
change the verbosity of this column."
|
||||
:package-version '(magit . "2.12.0")
|
||||
:group 'magit-refs
|
||||
:type 'integer)
|
||||
|
||||
(defcustom magit-refs-filter-alist nil
|
||||
"Alist controlling which refs are omitted from `magit-refs-mode' buffers.
|
||||
|
||||
The purpose of this option is to forgo displaying certain refs
|
||||
based on their name. If you want to not display any refs of a
|
||||
certain type, then you should remove the appropriate function
|
||||
from `magit-refs-sections-hook' instead.
|
||||
|
||||
All keys are tried in order until one matches. Then its value
|
||||
is used and subsequent elements are ignored. If the value is
|
||||
non-nil, then the reference is displayed, otherwise it is not.
|
||||
If no element matches, then the reference is displayed.
|
||||
|
||||
A key can either be a regular expression that the refname has to
|
||||
match, or a function that takes the refname as only argument and
|
||||
returns a boolean. A remote branch such as \"origin/master\" is
|
||||
displayed as just \"master\", however for this comparison the
|
||||
former is used."
|
||||
:package-version '(magit . "2.12.0")
|
||||
:group 'magit-refs
|
||||
:type '(alist :key-type (choice :tag "Key" regexp function)
|
||||
:value-type (boolean :tag "Value"
|
||||
:on "show (non-nil)"
|
||||
:off "omit (nil)")))
|
||||
|
||||
(defcustom magit-visit-ref-behavior nil
|
||||
"Control how `magit-visit-ref' behaves in `magit-refs-mode' buffers.
|
||||
|
||||
By default `magit-visit-ref' behaves like `magit-show-commit',
|
||||
in all buffers, including `magit-refs-mode' buffers. When the
|
||||
type of the section at point is `commit' then \"RET\" is bound to
|
||||
`magit-show-commit', and when the type is either `branch' or
|
||||
`tag' then it is bound to `magit-visit-ref'.
|
||||
|
||||
\"RET\" is one of Magit's most essential keys and at least by
|
||||
default it should behave consistently across all of Magit,
|
||||
especially because users quickly learn that it does something
|
||||
very harmless; it shows more information about the thing at point
|
||||
in another buffer.
|
||||
|
||||
However \"RET\" used to behave differently in `magit-refs-mode'
|
||||
buffers, doing surprising things, some of which cannot really be
|
||||
described as \"visit this thing\". If you have grown accustomed
|
||||
to such inconsistent, but to you useful, behavior, then you can
|
||||
restore that by adding one or more of the below symbols to the
|
||||
value of this option. But keep in mind that by doing so you
|
||||
don't only introduce inconsistencies, you also lose some
|
||||
functionality and might have to resort to `M-x magit-show-commit'
|
||||
to get it back.
|
||||
|
||||
`magit-visit-ref' looks for these symbols in the order in which
|
||||
they are described here. If the presence of a symbol applies to
|
||||
the current situation, then the symbols that follow do not affect
|
||||
the outcome.
|
||||
|
||||
`focus-on-ref'
|
||||
|
||||
With a prefix argument update the buffer to show commit counts
|
||||
and lists of cherry commits relative to the reference at point
|
||||
instead of relative to the current buffer or `HEAD'.
|
||||
|
||||
Instead of adding this symbol, consider pressing \"C-u y o RET\".
|
||||
|
||||
`create-branch'
|
||||
|
||||
If point is on a remote branch, then create a new local branch
|
||||
with the same name, use the remote branch as its upstream, and
|
||||
then check out the local branch.
|
||||
|
||||
Instead of adding this symbol, consider pressing \"b c RET RET\",
|
||||
like you would do in other buffers.
|
||||
|
||||
`checkout-any'
|
||||
|
||||
Check out the reference at point. If that reference is a tag
|
||||
or a remote branch, then this results in a detached `HEAD'.
|
||||
|
||||
Instead of adding this symbol, consider pressing \"b b RET\",
|
||||
like you would do in other buffers.
|
||||
|
||||
`checkout-branch'
|
||||
|
||||
Check out the local branch at point.
|
||||
|
||||
Instead of adding this symbol, consider pressing \"b b RET\",
|
||||
like you would do in other buffers."
|
||||
:package-version '(magit . "2.9.0")
|
||||
:group 'magit-refs
|
||||
:group 'magit-commands
|
||||
:options '(focus-on-ref create-branch checkout-any checkout-branch)
|
||||
:type '(list :convert-widget custom-hook-convert-widget))
|
||||
|
||||
;;; Mode
|
||||
|
||||
(defvar magit-refs-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(set-keymap-parent map magit-mode-map)
|
||||
(define-key map "\C-y" 'magit-refs-set-show-commit-count)
|
||||
(define-key map "L" 'magit-margin-settings)
|
||||
map)
|
||||
"Keymap for `magit-refs-mode'.")
|
||||
|
||||
(define-derived-mode magit-refs-mode magit-mode "Magit Refs"
|
||||
"Mode which lists and compares references.
|
||||
|
||||
This mode is documented in info node `(magit)References Buffer'.
|
||||
|
||||
\\<magit-mode-map>\
|
||||
Type \\[magit-refresh] to refresh the current buffer.
|
||||
Type \\[magit-section-toggle] to expand or hide the section at point.
|
||||
Type \\[magit-visit-thing] or \\[magit-diff-show-or-scroll-up] \
|
||||
to visit the commit or branch at point.
|
||||
|
||||
Type \\[magit-branch] to see available branch commands.
|
||||
Type \\[magit-merge] to merge the branch or commit at point.
|
||||
Type \\[magit-cherry-pick] to apply the commit at point.
|
||||
Type \\[magit-reset] to reset `HEAD' to the commit at point.
|
||||
|
||||
\\{magit-refs-mode-map}"
|
||||
:group 'magit-refs
|
||||
(hack-dir-local-variables-non-file-buffer)
|
||||
(setq imenu-create-index-function
|
||||
#'magit-imenu--refs-create-index-function))
|
||||
|
||||
(defun magit-refs-setup-buffer (ref args)
|
||||
(magit-setup-buffer #'magit-refs-mode nil
|
||||
(magit-buffer-upstream ref)
|
||||
(magit-buffer-arguments args)))
|
||||
|
||||
(defun magit-refs-refresh-buffer ()
|
||||
(setq magit-set-buffer-margin-refresh (not (magit-buffer-margin-p)))
|
||||
(unless (magit-rev-verify magit-buffer-upstream)
|
||||
(setq magit-refs-show-commit-count nil))
|
||||
(magit-set-header-line-format
|
||||
(format "%s %s" magit-buffer-upstream
|
||||
(mapconcat #'identity magit-buffer-arguments " ")))
|
||||
(magit-insert-section (branchbuf)
|
||||
(magit-run-section-hook 'magit-refs-sections-hook))
|
||||
(add-hook 'kill-buffer-hook 'magit-preserve-section-visibility-cache))
|
||||
|
||||
(cl-defmethod magit-buffer-value (&context (major-mode magit-refs-mode))
|
||||
(cons magit-buffer-upstream magit-buffer-arguments))
|
||||
|
||||
;;; Commands
|
||||
|
||||
;;;###autoload (autoload 'magit-show-refs "magit-refs" nil t)
|
||||
(transient-define-prefix magit-show-refs (&optional transient)
|
||||
"List and compare references in a dedicated buffer."
|
||||
:man-page "git-branch"
|
||||
:value (lambda ()
|
||||
(magit-show-refs-arguments magit-prefix-use-buffer-arguments))
|
||||
["Arguments"
|
||||
(magit-for-each-ref:--contains)
|
||||
("-M" "Merged" "--merged=" magit-transient-read-revision)
|
||||
("-m" "Merged to HEAD" "--merged")
|
||||
("-N" "Not merged" "--no-merged=" magit-transient-read-revision)
|
||||
("-n" "Not merged to HEAD" "--no-merged")
|
||||
(magit-for-each-ref:--sort)]
|
||||
["Actions"
|
||||
("y" "Show refs, comparing them with HEAD" magit-show-refs-head)
|
||||
("c" "Show refs, comparing them with current branch" magit-show-refs-current)
|
||||
("o" "Show refs, comparing them with other branch" magit-show-refs-other)]
|
||||
(interactive (list (or (derived-mode-p 'magit-refs-mode)
|
||||
current-prefix-arg)))
|
||||
(if transient
|
||||
(transient-setup 'magit-show-refs)
|
||||
(magit-refs-setup-buffer "HEAD" (magit-show-refs-arguments))))
|
||||
|
||||
(defun magit-show-refs-arguments (&optional use-buffer-args)
|
||||
(unless use-buffer-args
|
||||
(setq use-buffer-args magit-direct-use-buffer-arguments))
|
||||
(let (args)
|
||||
(cond
|
||||
((eq transient-current-command 'magit-show-refs)
|
||||
(setq args (transient-args 'magit-show-refs)))
|
||||
((eq major-mode 'magit-refs-mode)
|
||||
(setq args magit-buffer-arguments))
|
||||
((and (memq use-buffer-args '(always selected))
|
||||
(when-let ((buffer (magit-get-mode-buffer
|
||||
'magit-refs-mode nil
|
||||
(eq use-buffer-args 'selected))))
|
||||
(setq args (buffer-local-value 'magit-buffer-arguments buffer))
|
||||
t)))
|
||||
(t
|
||||
(setq args (alist-get 'magit-show-refs transient-values))))
|
||||
args))
|
||||
|
||||
(transient-define-argument magit-for-each-ref:--contains ()
|
||||
:description "Contains"
|
||||
:class 'transient-option
|
||||
:key "-c"
|
||||
:argument "--contains="
|
||||
:reader 'magit-transient-read-revision)
|
||||
|
||||
(transient-define-argument magit-for-each-ref:--sort ()
|
||||
:description "Sort"
|
||||
:class 'transient-option
|
||||
:key "-s"
|
||||
:argument "--sort="
|
||||
:reader 'magit-read-ref-sort)
|
||||
|
||||
(defun magit-read-ref-sort (prompt initial-input _history)
|
||||
(magit-completing-read prompt
|
||||
'("-committerdate" "-authordate"
|
||||
"committerdate" "authordate")
|
||||
nil nil initial-input))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-show-refs-head (&optional args)
|
||||
"List and compare references in a dedicated buffer.
|
||||
Compared with `HEAD'."
|
||||
(interactive (list (magit-show-refs-arguments)))
|
||||
(magit-refs-setup-buffer "HEAD" args))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-show-refs-current (&optional args)
|
||||
"List and compare references in a dedicated buffer.
|
||||
Compare with the current branch or `HEAD' if it is detached."
|
||||
(interactive (list (magit-show-refs-arguments)))
|
||||
(magit-refs-setup-buffer (magit-get-current-branch) args))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-show-refs-other (&optional ref args)
|
||||
"List and compare references in a dedicated buffer.
|
||||
Compared with a branch read from the user."
|
||||
(interactive (list (magit-read-other-branch "Compare with")
|
||||
(magit-show-refs-arguments)))
|
||||
(magit-refs-setup-buffer ref args))
|
||||
|
||||
(defun magit-refs-set-show-commit-count ()
|
||||
"Change for which refs the commit count is shown."
|
||||
(interactive)
|
||||
(setq-local magit-refs-show-commit-count
|
||||
(magit-read-char-case "Show commit counts for " nil
|
||||
(?a "[a]ll refs" 'all)
|
||||
(?b "[b]ranches only" t)
|
||||
(?n "[n]othing" nil)))
|
||||
(magit-refresh))
|
||||
|
||||
(defun magit-visit-ref ()
|
||||
"Visit the reference or revision at point in another buffer.
|
||||
If there is no revision at point or with a prefix argument prompt
|
||||
for a revision.
|
||||
|
||||
This command behaves just like `magit-show-commit', except if
|
||||
point is on a reference in a `magit-refs-mode' buffer (a buffer
|
||||
listing branches and tags), in which case the behavior may be
|
||||
different, but only if you have customized the option
|
||||
`magit-visit-ref-behavior' (which see)."
|
||||
(interactive)
|
||||
(if (and (derived-mode-p 'magit-refs-mode)
|
||||
(magit-section-match '(branch tag)))
|
||||
(let ((ref (oref (magit-current-section) value)))
|
||||
(cond (current-prefix-arg
|
||||
(cond ((memq 'focus-on-ref magit-visit-ref-behavior)
|
||||
(magit-refs-setup-buffer ref (magit-show-refs-arguments)))
|
||||
(magit-visit-ref-behavior
|
||||
;; Don't prompt for commit to visit.
|
||||
(let ((current-prefix-arg nil))
|
||||
(call-interactively #'magit-show-commit)))))
|
||||
((and (memq 'create-branch magit-visit-ref-behavior)
|
||||
(magit-section-match [branch remote]))
|
||||
(let ((branch (cdr (magit-split-branch-name ref))))
|
||||
(if (magit-branch-p branch)
|
||||
(if (magit-rev-eq branch ref)
|
||||
(magit-call-git "checkout" branch)
|
||||
(setq branch (propertize branch 'face 'magit-branch-local))
|
||||
(setq ref (propertize ref 'face 'magit-branch-remote))
|
||||
(pcase (prog1 (read-char-choice (format (propertize "\
|
||||
Branch %s already exists.
|
||||
[c]heckout %s as-is
|
||||
[r]reset %s to %s and checkout %s
|
||||
[a]bort " 'face 'minibuffer-prompt) branch branch branch ref branch)
|
||||
'(?c ?r ?a))
|
||||
(message "")) ; otherwise prompt sticks
|
||||
(?c (magit-call-git "checkout" branch))
|
||||
(?r (magit-call-git "checkout" "-B" branch ref))
|
||||
(?a (user-error "Abort"))))
|
||||
(magit-call-git "checkout" "-b" branch ref))
|
||||
(setq magit-buffer-upstream branch)
|
||||
(magit-refresh)))
|
||||
((or (memq 'checkout-any magit-visit-ref-behavior)
|
||||
(and (memq 'checkout-branch magit-visit-ref-behavior)
|
||||
(magit-section-match [branch local])))
|
||||
(magit-call-git "checkout" ref)
|
||||
(setq magit-buffer-upstream ref)
|
||||
(magit-refresh))
|
||||
(t
|
||||
(call-interactively #'magit-show-commit))))
|
||||
(call-interactively #'magit-show-commit)))
|
||||
|
||||
;;; Sections
|
||||
|
||||
(defvar magit-remote-section-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map [remap magit-delete-thing] 'magit-remote-remove)
|
||||
(define-key map "R" 'magit-remote-rename)
|
||||
map)
|
||||
"Keymap for `remote' sections.")
|
||||
|
||||
(defvar magit-branch-section-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map [remap magit-visit-thing] 'magit-visit-ref)
|
||||
(define-key map [remap magit-delete-thing] 'magit-branch-delete)
|
||||
(define-key map "R" 'magit-branch-rename)
|
||||
map)
|
||||
"Keymap for `branch' sections.")
|
||||
|
||||
(defvar magit-tag-section-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map [remap magit-visit-thing] 'magit-visit-ref)
|
||||
(define-key map [remap magit-delete-thing] 'magit-tag-delete)
|
||||
map)
|
||||
"Keymap for `tag' sections.")
|
||||
|
||||
(defun magit-insert-branch-description ()
|
||||
"Insert header containing the description of the current branch.
|
||||
Insert a header line with the name and description of the
|
||||
current branch. The description is taken from the Git variable
|
||||
`branch.<NAME>.description'; if that is undefined then no header
|
||||
line is inserted at all."
|
||||
(when-let ((branch (magit-get-current-branch))
|
||||
(desc (magit-get "branch" branch "description"))
|
||||
(desc (split-string desc "\n")))
|
||||
(when (equal (car (last desc)) "")
|
||||
(setq desc (butlast desc)))
|
||||
(magit-insert-section (branchdesc branch t)
|
||||
(magit-insert-heading branch ": " (car desc))
|
||||
(when (cdr desc)
|
||||
(insert (mapconcat 'identity (cdr desc) "\n"))
|
||||
(insert "\n\n")))))
|
||||
|
||||
(defun magit-insert-tags ()
|
||||
"Insert sections showing all tags."
|
||||
(when-let ((tags (magit-git-lines "tag" "--list" "-n" magit-buffer-arguments)))
|
||||
(let ((_head (magit-rev-parse "HEAD")))
|
||||
(magit-insert-section (tags)
|
||||
(magit-insert-heading "Tags:")
|
||||
(dolist (tag tags)
|
||||
(string-match "^\\([^ \t]+\\)[ \t]+\\([^ \t\n].*\\)?" tag)
|
||||
(let ((tag (match-string 1 tag))
|
||||
(msg (match-string 2 tag)))
|
||||
(when (magit-refs--insert-refname-p tag)
|
||||
(magit-insert-section (tag tag t)
|
||||
(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)
|
||||
(and msg (magit-log-propertize-keywords nil msg)))
|
||||
(when (and magit-refs-margin-for-tags (magit-buffer-margin-p))
|
||||
(magit-refs--format-margin tag))
|
||||
(magit-refs--insert-cherry-commits tag)))))
|
||||
(insert ?\n)
|
||||
(magit-make-margin-overlay nil t)))))
|
||||
|
||||
(defun magit-insert-remote-branches ()
|
||||
"Insert sections showing all remote-tracking branches."
|
||||
(dolist (remote (magit-list-remotes))
|
||||
(magit-insert-section (remote remote)
|
||||
(magit-insert-heading
|
||||
(let ((pull (magit-get "remote" remote "url"))
|
||||
(push (magit-get "remote" remote "pushurl")))
|
||||
(format (propertize "Remote %s (%s):"
|
||||
'font-lock-face 'magit-section-heading)
|
||||
(propertize remote 'font-lock-face 'magit-branch-remote)
|
||||
(concat pull (and pull push ", ") push))))
|
||||
(let (head)
|
||||
(dolist (line (magit-git-lines "for-each-ref" "--format=\
|
||||
%(symref:short)%00%(refname:short)%00%(refname)%00%(subject)"
|
||||
(concat "refs/remotes/" remote)
|
||||
magit-buffer-arguments))
|
||||
(pcase-let ((`(,head-branch ,branch ,ref ,msg)
|
||||
(-replace "" nil (split-string line "\0"))))
|
||||
(if head-branch
|
||||
(progn (cl-assert (equal branch (concat remote "/HEAD")))
|
||||
(setq head head-branch))
|
||||
(when (magit-refs--insert-refname-p branch)
|
||||
(magit-insert-section (branch branch t)
|
||||
(let ((headp (equal branch head))
|
||||
(abbrev (if magit-refs-show-remote-prefix
|
||||
branch
|
||||
(substring branch (1+ (length remote))))))
|
||||
(magit-insert-heading
|
||||
(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)
|
||||
(and msg (magit-log-propertize-keywords nil msg))))
|
||||
(when (magit-buffer-margin-p)
|
||||
(magit-refs--format-margin branch))
|
||||
(magit-refs--insert-cherry-commits branch)))))))
|
||||
(insert ?\n)
|
||||
(magit-make-margin-overlay nil t))))
|
||||
|
||||
(defun magit-insert-local-branches ()
|
||||
"Insert sections showing all local branches."
|
||||
(magit-insert-section (local nil)
|
||||
(magit-insert-heading "Branches:")
|
||||
(dolist (line (magit-refs--format-local-branches))
|
||||
(pcase-let ((`(,branch . ,strings) line))
|
||||
(magit-insert-section
|
||||
((eval (if branch 'branch 'commit))
|
||||
(or branch (magit-rev-parse "HEAD"))
|
||||
t)
|
||||
(apply #'magit-insert-heading strings)
|
||||
(when (magit-buffer-margin-p)
|
||||
(magit-refs--format-margin branch))
|
||||
(magit-refs--insert-cherry-commits branch))))
|
||||
(insert ?\n)
|
||||
(magit-make-margin-overlay nil t)))
|
||||
|
||||
(defun magit-refs--format-local-branches ()
|
||||
(let ((lines (-keep 'magit-refs--format-local-branch
|
||||
(magit-git-lines
|
||||
"for-each-ref"
|
||||
(concat "--format=\
|
||||
%(HEAD)%00%(refname:short)%00%(refname)%00\
|
||||
%(upstream:short)%00%(upstream)%00%(upstream:track)%00"
|
||||
(if magit-refs-show-push-remote "\
|
||||
%(push:remotename)%00%(push)%00%(push:track)%00%(subject)"
|
||||
"%00%00%00%(subject)"))
|
||||
"refs/heads"
|
||||
magit-buffer-arguments))))
|
||||
(unless (magit-get-current-branch)
|
||||
(push (magit-refs--format-local-branch
|
||||
(concat "*\0\0\0\0\0\0\0\0" (magit-rev-format "%s")))
|
||||
lines))
|
||||
(setq-local magit-refs-primary-column-width
|
||||
(let ((def (default-value 'magit-refs-primary-column-width)))
|
||||
(if (atom def)
|
||||
def
|
||||
(pcase-let ((`(,min . ,max) def))
|
||||
(min max (apply #'max min (mapcar #'car lines)))))))
|
||||
(mapcar (pcase-lambda (`(,_ ,branch ,focus ,branch-desc ,u:ahead ,p:ahead
|
||||
,u:behind ,upstream ,p:behind ,push ,msg))
|
||||
(list branch focus branch-desc u:ahead p:ahead
|
||||
(make-string (max 1 (- magit-refs-primary-column-width
|
||||
(length (concat branch-desc
|
||||
u:ahead
|
||||
p:ahead
|
||||
u:behind))))
|
||||
?\s)
|
||||
u:behind upstream p:behind push
|
||||
msg))
|
||||
lines)))
|
||||
|
||||
(defun magit-refs--format-local-branch (line)
|
||||
(pcase-let ((`(,head ,branch ,ref ,upstream ,u:ref ,u:track
|
||||
,push ,p:ref ,p:track ,msg)
|
||||
(-replace "" nil (split-string line "\0"))))
|
||||
(when (or (not branch)
|
||||
(magit-refs--insert-refname-p branch))
|
||||
(let* ((headp (equal head "*"))
|
||||
(pushp (and push
|
||||
magit-refs-show-push-remote
|
||||
(magit-rev-verify p:ref)
|
||||
(not (equal p:ref u:ref))))
|
||||
(branch-desc
|
||||
(if branch
|
||||
(magit-refs--propertize-branch
|
||||
branch ref (and headp 'magit-branch-current))
|
||||
(magit--propertize-face "(detached)"
|
||||
'font-lock-warning-face)))
|
||||
(u:ahead (and u:track
|
||||
(string-match "ahead \\([0-9]+\\)" u:track)
|
||||
(magit--propertize-face
|
||||
(concat (and magit-refs-pad-commit-counts " ")
|
||||
(match-string 1 u:track)
|
||||
">")
|
||||
'magit-dimmed)))
|
||||
(u:behind (and u:track
|
||||
(string-match "behind \\([0-9]+\\)" u:track)
|
||||
(magit--propertize-face
|
||||
(concat "<"
|
||||
(match-string 1 u:track)
|
||||
(and magit-refs-pad-commit-counts " "))
|
||||
'magit-dimmed)))
|
||||
(p:ahead (and pushp p:track
|
||||
(string-match "ahead \\([0-9]+\\)" p:track)
|
||||
(magit--propertize-face
|
||||
(concat (match-string 1 p:track)
|
||||
">"
|
||||
(and magit-refs-pad-commit-counts " "))
|
||||
'magit-branch-remote)))
|
||||
(p:behind (and pushp p:track
|
||||
(string-match "behind \\([0-9]+\\)" p:track)
|
||||
(magit--propertize-face
|
||||
(concat "<"
|
||||
(match-string 1 p:track)
|
||||
(and magit-refs-pad-commit-counts " "))
|
||||
'magit-dimmed))))
|
||||
(list (1+ (length (concat branch-desc u:ahead p:ahead u:behind)))
|
||||
branch
|
||||
(magit-refs--format-focus-column branch headp)
|
||||
branch-desc u:ahead p:ahead u:behind
|
||||
(and upstream
|
||||
(concat (if (equal u:track "[gone]")
|
||||
(magit--propertize-face upstream 'error)
|
||||
(magit-refs--propertize-branch upstream u:ref))
|
||||
" "))
|
||||
(and pushp
|
||||
(concat p:behind
|
||||
(magit--propertize-face
|
||||
push 'magit-branch-remote)
|
||||
" "))
|
||||
(and msg (magit-log-propertize-keywords nil msg)))))))
|
||||
|
||||
(defun magit-refs--format-focus-column (ref &optional type)
|
||||
(let ((focus magit-buffer-upstream)
|
||||
(width (if magit-refs-show-commit-count
|
||||
magit-refs-focus-column-width
|
||||
1)))
|
||||
(format
|
||||
(format "%%%ss " width)
|
||||
(cond ((or (equal ref focus)
|
||||
(and (eq type t)
|
||||
(equal focus "HEAD")))
|
||||
(magit--propertize-face (concat (if (equal focus "HEAD") "@" "*")
|
||||
(make-string (1- width) ?\s))
|
||||
'magit-section-heading))
|
||||
((if (eq type 'tag)
|
||||
(eq magit-refs-show-commit-count 'all)
|
||||
magit-refs-show-commit-count)
|
||||
(pcase-let ((`(,behind ,ahead)
|
||||
(magit-rev-diff-count magit-buffer-upstream ref)))
|
||||
(magit--propertize-face
|
||||
(cond ((> ahead 0) (concat "<" (number-to-string ahead)))
|
||||
((> behind 0) (concat (number-to-string behind) ">"))
|
||||
(t "="))
|
||||
'magit-dimmed)))
|
||||
(t "")))))
|
||||
|
||||
(defun magit-refs--propertize-branch (branch ref &optional head-face)
|
||||
(let ((face (cdr (cl-find-if (pcase-lambda (`(,re . ,_))
|
||||
(string-match-p re ref))
|
||||
magit-ref-namespaces))))
|
||||
(magit--propertize-face
|
||||
branch (if head-face (list face head-face) face))))
|
||||
|
||||
(defun magit-refs--insert-refname-p (refname)
|
||||
(--if-let (-first (pcase-lambda (`(,key . ,_))
|
||||
(if (functionp key)
|
||||
(funcall key refname)
|
||||
(string-match-p key refname)))
|
||||
magit-refs-filter-alist)
|
||||
(cdr it)
|
||||
t))
|
||||
|
||||
(defun magit-refs--insert-cherry-commits (ref)
|
||||
(magit-insert-section-body
|
||||
(let ((start (point))
|
||||
(magit-insert-section--current nil))
|
||||
(magit-git-wash (apply-partially 'magit-log-wash-log 'cherry)
|
||||
"cherry" "-v" (magit-abbrev-arg) magit-buffer-upstream ref)
|
||||
(if (= (point) start)
|
||||
(message "No cherries for %s" ref)
|
||||
(magit-make-margin-overlay nil t)))))
|
||||
|
||||
(defun magit-refs--format-margin (commit)
|
||||
(save-excursion
|
||||
(goto-char (line-beginning-position 0))
|
||||
(let ((line (magit-rev-format "%ct%cN" commit)))
|
||||
(magit-log-format-margin commit
|
||||
(substring line 10)
|
||||
(substring line 0 10)))))
|
||||
|
||||
;;; _
|
||||
(provide 'magit-refs)
|
||||
;;; magit-refs.el ends here
|
BIN
elpa/magit-20210414.1306/magit-refs.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-refs.elc
Normal file
Binary file not shown.
350
elpa/magit-20210414.1306/magit-remote.el
Normal file
350
elpa/magit-20210414.1306/magit-remote.el
Normal file
|
@ -0,0 +1,350 @@
|
|||
;;; magit-remote.el --- transfer Git commits -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2008-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
|
||||
;; Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
;; Magit is free software; you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
;;
|
||||
;; Magit is distributed in the hope that it will be useful, but WITHOUT
|
||||
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
;; License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Magit. If not, see http://www.gnu.org/licenses.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; This library implements remote commands.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'magit)
|
||||
|
||||
;;; Options
|
||||
|
||||
(defcustom magit-remote-add-set-remote.pushDefault 'ask-if-unset
|
||||
"Whether to set the value of `remote.pushDefault' after adding a remote.
|
||||
|
||||
If `ask', then always ask. If `ask-if-unset', then ask, but only
|
||||
if the variable isn't set already. If nil, then don't ever set.
|
||||
If the value is a string, then set without asking, provided that
|
||||
the name of the added remote is equal to that string and the
|
||||
variable isn't already set."
|
||||
:package-version '(magit . "2.4.0")
|
||||
:group 'magit-commands
|
||||
:type '(choice (const :tag "ask if unset" ask-if-unset)
|
||||
(const :tag "always ask" ask)
|
||||
(string :tag "set if named")
|
||||
(const :tag "don't set")))
|
||||
|
||||
(defcustom magit-remote-direct-configure t
|
||||
"Whether the command `magit-remote' shows Git variables.
|
||||
When set to nil, no variables are displayed by this transient
|
||||
command, instead the sub-transient `magit-remote-configure'
|
||||
has to be used to view and change remote related variables."
|
||||
:package-version '(magit . "2.12.0")
|
||||
:group 'magit-commands
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom magit-prefer-push-default nil
|
||||
"Whether to prefer `remote.pushDefault' over per-branch variables."
|
||||
:package-version '(magit . "3.0.0")
|
||||
:group 'magit-commands
|
||||
:type 'boolean)
|
||||
|
||||
;;; Commands
|
||||
|
||||
;;;###autoload (autoload 'magit-remote "magit-remote" nil t)
|
||||
(transient-define-prefix magit-remote (remote)
|
||||
"Add, configure or remove a remote."
|
||||
:man-page "git-remote"
|
||||
:value '("-f")
|
||||
["Variables"
|
||||
:if (lambda ()
|
||||
(and magit-remote-direct-configure
|
||||
(oref transient--prefix scope)))
|
||||
("u" magit-remote.<remote>.url)
|
||||
("U" magit-remote.<remote>.fetch)
|
||||
("s" magit-remote.<remote>.pushurl)
|
||||
("S" magit-remote.<remote>.push)
|
||||
("O" magit-remote.<remote>.tagopt)]
|
||||
["Arguments for add"
|
||||
("-f" "Fetch after add" "-f")]
|
||||
["Actions"
|
||||
[("a" "Add" magit-remote-add)
|
||||
("r" "Rename" magit-remote-rename)
|
||||
("k" "Remove" magit-remote-remove)]
|
||||
[("C" "Configure..." magit-remote-configure)
|
||||
("p" "Prune stale branches" magit-remote-prune)
|
||||
("P" "Prune stale refspecs" magit-remote-prune-refspecs)]]
|
||||
(interactive (list (magit-get-current-remote)))
|
||||
(transient-setup 'magit-remote nil nil :scope remote))
|
||||
|
||||
(defun magit-read-url (prompt &optional initial-input)
|
||||
(let ((url (magit-read-string-ns prompt initial-input)))
|
||||
(if (string-prefix-p "~" url)
|
||||
(expand-file-name url)
|
||||
url)))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-remote-add (remote url &optional args)
|
||||
"Add a remote named REMOTE and fetch it."
|
||||
(interactive
|
||||
(let ((origin (magit-get "remote.origin.url"))
|
||||
(remote (magit-read-string-ns "Remote name")))
|
||||
(list remote
|
||||
(magit-read-url
|
||||
"Remote url"
|
||||
(and origin
|
||||
(string-match "\\([^:/]+\\)/[^/]+\\(\\.git\\)?\\'" origin)
|
||||
(replace-match remote t t origin 1)))
|
||||
(transient-args 'magit-remote))))
|
||||
(if (pcase (list magit-remote-add-set-remote.pushDefault
|
||||
(magit-get "remote.pushDefault"))
|
||||
(`(,(pred stringp) ,_) t)
|
||||
((or `(ask ,_) `(ask-if-unset nil))
|
||||
(y-or-n-p (format "Set `remote.pushDefault' to \"%s\"? " remote))))
|
||||
(progn (magit-call-git "remote" "add" args remote url)
|
||||
(setf (magit-get "remote.pushDefault") remote)
|
||||
(magit-refresh))
|
||||
(magit-run-git-async "remote" "add" args remote url)))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-remote-rename (old new)
|
||||
"Rename the remote named OLD to NEW."
|
||||
(interactive
|
||||
(let ((remote (magit-read-remote "Rename remote")))
|
||||
(list remote (magit-read-string-ns (format "Rename %s to" remote)))))
|
||||
(unless (string= old new)
|
||||
(magit-call-git "remote" "rename" old new)
|
||||
(magit-remote--cleanup-push-variables old new)
|
||||
(magit-refresh)))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-remote-remove (remote)
|
||||
"Delete the remote named REMOTE."
|
||||
(interactive (list (magit-read-remote "Delete remote")))
|
||||
(magit-call-git "remote" "rm" remote)
|
||||
(magit-remote--cleanup-push-variables remote)
|
||||
(magit-refresh))
|
||||
|
||||
(defun magit-remote--cleanup-push-variables (remote &optional new-name)
|
||||
(magit-with-toplevel
|
||||
(when (equal (magit-get "remote.pushDefault") remote)
|
||||
(magit-set new-name "remote.pushDefault"))
|
||||
(dolist (var (magit-git-lines "config" "--name-only"
|
||||
"--get-regexp" "^branch\.[^.]*\.pushRemote"
|
||||
(format "^%s$" remote)))
|
||||
(magit-call-git "config" (and (not new-name) "--unset") var new-name))))
|
||||
|
||||
(defconst magit--refspec-re "\\`\\(\\+\\)?\\([^:]+\\):\\(.*\\)\\'")
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-remote-prune (remote)
|
||||
"Remove stale remote-tracking branches for REMOTE."
|
||||
(interactive (list (magit-read-remote "Prune stale branches of remote")))
|
||||
(magit-run-git-async "remote" "prune" remote))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-remote-prune-refspecs (remote)
|
||||
"Remove stale refspecs for REMOTE.
|
||||
|
||||
A refspec is stale if there no longer exists at least one branch
|
||||
on the remote that would be fetched due to that refspec. A stale
|
||||
refspec is problematic because its existence causes Git to refuse
|
||||
to fetch according to the remaining non-stale refspecs.
|
||||
|
||||
If only stale refspecs remain, then offer to either delete the
|
||||
remote or to replace the stale refspecs with the default refspec.
|
||||
|
||||
Also remove the remote-tracking branches that were created due to
|
||||
the now stale refspecs. Other stale branches are not removed."
|
||||
(interactive (list (magit-read-remote "Prune refspecs of remote")))
|
||||
(let* ((tracking-refs (magit-list-remote-branches remote))
|
||||
(remote-refs (magit-remote-list-refs remote))
|
||||
(variable (format "remote.%s.fetch" remote))
|
||||
(refspecs (magit-get-all variable))
|
||||
stale)
|
||||
(dolist (refspec refspecs)
|
||||
(when (string-match magit--refspec-re refspec)
|
||||
(let ((theirs (match-string 2 refspec))
|
||||
(ours (match-string 3 refspec)))
|
||||
(unless (if (string-match "\\*" theirs)
|
||||
(let ((re (replace-match ".*" t t theirs)))
|
||||
(--some (string-match-p re it) remote-refs))
|
||||
(member theirs remote-refs))
|
||||
(push (cons refspec
|
||||
(if (string-match "\\*" ours)
|
||||
(let ((re (replace-match ".*" t t ours)))
|
||||
(--filter (string-match-p re it) tracking-refs))
|
||||
(list (car (member ours tracking-refs)))))
|
||||
stale)))))
|
||||
(if (not stale)
|
||||
(message "No stale refspecs for remote %S" remote)
|
||||
(if (= (length stale)
|
||||
(length refspecs))
|
||||
(magit-read-char-case
|
||||
(format "All of %s's refspecs are stale. " remote) nil
|
||||
(?s "replace with [d]efault refspec"
|
||||
(magit-set-all
|
||||
(list (format "+refs/heads/*:refs/remotes/%s/*" remote))
|
||||
variable))
|
||||
(?r "[r]emove remote"
|
||||
(magit-call-git "remote" "rm" remote))
|
||||
(?a "or [a]abort"
|
||||
(user-error "Abort")))
|
||||
(if (if (= (length stale) 1)
|
||||
(pcase-let ((`(,refspec . ,refs) (car stale)))
|
||||
(magit-confirm 'prune-stale-refspecs
|
||||
(format "Prune stale refspec %s and branch %%s" refspec)
|
||||
(format "Prune stale refspec %s and %%i branches" refspec)
|
||||
nil refs))
|
||||
(magit-confirm 'prune-stale-refspecs nil
|
||||
(format "Prune %%i stale refspecs and %i branches"
|
||||
(length (cl-mapcan (lambda (s) (copy-sequence (cdr s)))
|
||||
stale)))
|
||||
nil
|
||||
(mapcar (pcase-lambda (`(,refspec . ,refs))
|
||||
(concat refspec "\n"
|
||||
(mapconcat (lambda (b) (concat " " b))
|
||||
refs "\n")))
|
||||
stale)))
|
||||
(pcase-dolist (`(,refspec . ,refs) stale)
|
||||
(magit-call-git "config" "--unset" variable
|
||||
(regexp-quote refspec))
|
||||
(magit--log-action
|
||||
(lambda (refs)
|
||||
(format "Deleting %i branches" (length refs)))
|
||||
(lambda (ref)
|
||||
(format "Deleting branch %s (was %s)" ref
|
||||
(magit-rev-parse "--short" ref)))
|
||||
refs)
|
||||
(dolist (ref refs)
|
||||
(magit-call-git "update-ref" "-d" ref)))
|
||||
(user-error "Abort")))
|
||||
(magit-refresh))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-remote-set-head (remote &optional branch)
|
||||
"Set the local representation of REMOTE's default branch.
|
||||
Query REMOTE and set the symbolic-ref refs/remotes/<remote>/HEAD
|
||||
accordingly. With a prefix argument query for the branch to be
|
||||
used, which allows you to select an incorrect value if you fancy
|
||||
doing that."
|
||||
(interactive
|
||||
(let ((remote (magit-read-remote "Set HEAD for remote")))
|
||||
(list remote
|
||||
(and current-prefix-arg
|
||||
(magit-read-remote-branch (format "Set %s/HEAD to" remote)
|
||||
remote nil nil t)))))
|
||||
(magit-run-git "remote" "set-head" remote (or branch "--auto")))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-remote-unset-head (remote)
|
||||
"Unset the local representation of REMOTE's default branch.
|
||||
Delete the symbolic-ref \"refs/remotes/<remote>/HEAD\"."
|
||||
(interactive (list (magit-read-remote "Unset HEAD for remote")))
|
||||
(magit-run-git "remote" "set-head" remote "--delete"))
|
||||
|
||||
;;; Configure
|
||||
|
||||
;;;###autoload (autoload 'magit-remote-configure "magit-remote" nil t)
|
||||
(transient-define-prefix magit-remote-configure (remote)
|
||||
"Configure a remote."
|
||||
:man-page "git-remote"
|
||||
[:description
|
||||
(lambda ()
|
||||
(concat
|
||||
(propertize "Configure " 'face 'transient-heading)
|
||||
(propertize (oref transient--prefix scope) 'face 'magit-branch-remote)))
|
||||
("u" magit-remote.<remote>.url)
|
||||
("U" magit-remote.<remote>.fetch)
|
||||
("s" magit-remote.<remote>.pushurl)
|
||||
("S" magit-remote.<remote>.push)
|
||||
("O" magit-remote.<remote>.tagopt)]
|
||||
(interactive
|
||||
(list (or (and (not current-prefix-arg)
|
||||
(not (and magit-remote-direct-configure
|
||||
(eq transient-current-command 'magit-remote)))
|
||||
(magit-get-current-remote))
|
||||
(magit--read-remote-scope))))
|
||||
(transient-setup 'magit-remote-configure nil nil :scope remote))
|
||||
|
||||
(defun magit--read-remote-scope (&optional obj)
|
||||
(magit-read-remote
|
||||
(if obj
|
||||
(format "Set %s for remote"
|
||||
(format (oref obj variable) "<name>"))
|
||||
"Configure remote")))
|
||||
|
||||
(transient-define-infix magit-remote.<remote>.url ()
|
||||
:class 'magit--git-variable:urls
|
||||
:scope 'magit--read-remote-scope
|
||||
:variable "remote.%s.url"
|
||||
:multi-value t
|
||||
:history-key 'magit-remote.<remote>.*url)
|
||||
|
||||
(transient-define-infix magit-remote.<remote>.fetch ()
|
||||
:class 'magit--git-variable
|
||||
:scope 'magit--read-remote-scope
|
||||
:variable "remote.%s.fetch"
|
||||
:multi-value t)
|
||||
|
||||
(transient-define-infix magit-remote.<remote>.pushurl ()
|
||||
:class 'magit--git-variable:urls
|
||||
:scope 'magit--read-remote-scope
|
||||
:variable "remote.%s.pushurl"
|
||||
:multi-value t
|
||||
:history-key 'magit-remote.<remote>.*url
|
||||
:seturl-arg "--push")
|
||||
|
||||
(transient-define-infix magit-remote.<remote>.push ()
|
||||
:class 'magit--git-variable
|
||||
:scope 'magit--read-remote-scope
|
||||
:variable "remote.%s.push")
|
||||
|
||||
(transient-define-infix magit-remote.<remote>.tagopt ()
|
||||
:class 'magit--git-variable:choices
|
||||
:scope 'magit--read-remote-scope
|
||||
:variable "remote.%s.tagOpt"
|
||||
:choices '("--no-tags" "--tags"))
|
||||
|
||||
;;; Transfer Utilities
|
||||
|
||||
(defun magit--push-remote-variable (&optional branch short)
|
||||
(unless branch
|
||||
(setq branch (magit-get-current-branch)))
|
||||
(magit--propertize-face
|
||||
(if (or (not branch) magit-prefer-push-default)
|
||||
(if short "pushDefault" "remote.pushDefault")
|
||||
(if short "pushRemote" (format "branch.%s.pushRemote" branch)))
|
||||
'bold))
|
||||
|
||||
(defun magit--select-push-remote (prompt-suffix)
|
||||
(let* ((branch (or (magit-get-current-branch)
|
||||
(user-error "No branch is checked out")))
|
||||
(remote (magit-get-push-remote branch))
|
||||
(changed nil))
|
||||
(when (or current-prefix-arg
|
||||
(not remote)
|
||||
(not (member remote (magit-list-remotes))))
|
||||
(setq changed t)
|
||||
(setq remote
|
||||
(magit-read-remote (format "Set %s and %s"
|
||||
(magit--push-remote-variable)
|
||||
prompt-suffix)))
|
||||
(setf (magit-get (magit--push-remote-variable branch)) remote))
|
||||
(list branch remote changed)))
|
||||
|
||||
;;; _
|
||||
(provide 'magit-remote)
|
||||
;;; magit-remote.el ends here
|
BIN
elpa/magit-20210414.1306/magit-remote.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-remote.elc
Normal file
Binary file not shown.
338
elpa/magit-20210414.1306/magit-repos.el
Normal file
338
elpa/magit-20210414.1306/magit-repos.el
Normal file
|
@ -0,0 +1,338 @@
|
|||
;;; magit-repos.el --- listing repositories -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2010-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
|
||||
;; Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
;; Magit is free software; you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
;;
|
||||
;; Magit is distributed in the hope that it will be useful, but WITHOUT
|
||||
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
;; License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Magit. If not, see http://www.gnu.org/licenses.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; This library implements support for listing repositories. This
|
||||
;; includes getting a Lisp list of known repositories as well as a
|
||||
;; mode for listing repositories in a buffer.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'magit-core)
|
||||
|
||||
(declare-function magit-status-setup-buffer "magit-status" (directory))
|
||||
|
||||
(defvar x-stretch-cursor)
|
||||
|
||||
;;; Options
|
||||
|
||||
(defcustom magit-repository-directories nil
|
||||
"List of directories that are or contain Git repositories.
|
||||
|
||||
Each element has the form (DIRECTORY . DEPTH). DIRECTORY has
|
||||
to be a directory or a directory file-name, a string. DEPTH,
|
||||
an integer, specifies the maximum depth to look for Git
|
||||
repositories. If it is 0, then only add DIRECTORY itself.
|
||||
|
||||
This option controls which repositories are being listed by
|
||||
`magit-list-repositories'. It also affects `magit-status'
|
||||
\(which see) in potentially surprising ways."
|
||||
:package-version '(magit . "3.0.0")
|
||||
:group 'magit-essentials
|
||||
:type '(repeat (cons directory (integer :tag "Depth"))))
|
||||
|
||||
(defgroup magit-repolist nil
|
||||
"List repositories in a buffer."
|
||||
:link '(info-link "(magit)Repository List")
|
||||
:group 'magit-modes)
|
||||
|
||||
(defcustom magit-repolist-mode-hook '(hl-line-mode)
|
||||
"Hook run after entering Magit-Repolist mode."
|
||||
:package-version '(magit . "2.9.0")
|
||||
:group 'magit-repolist
|
||||
:type 'hook
|
||||
:get 'magit-hook-custom-get
|
||||
:options '(hl-line-mode))
|
||||
|
||||
(defcustom magit-repolist-columns
|
||||
'(("Name" 25 magit-repolist-column-ident nil)
|
||||
("Version" 25 magit-repolist-column-version nil)
|
||||
("B<U" 3 magit-repolist-column-unpulled-from-upstream
|
||||
((:right-align t)
|
||||
(:help-echo "Upstream changes not in branch")))
|
||||
("B>U" 3 magit-repolist-column-unpushed-to-upstream
|
||||
((:right-align t)
|
||||
(:help-echo "Local changes not in upstream")))
|
||||
("Path" 99 magit-repolist-column-path nil))
|
||||
"List of columns displayed by `magit-list-repositories'.
|
||||
|
||||
Each element has the form (HEADER WIDTH FORMAT PROPS).
|
||||
|
||||
HEADER is the string displayed in the header. WIDTH is the width
|
||||
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'.
|
||||
Some entries also use `:help-echo', but `tabulated-list' does not
|
||||
actually support that yet."
|
||||
:package-version '(magit . "2.12.0")
|
||||
:group 'magit-repolist
|
||||
:type `(repeat (list :tag "Column"
|
||||
(string :tag "Header Label")
|
||||
(integer :tag "Column Width")
|
||||
(function :tag "Inserter Function")
|
||||
(repeat :tag "Properties"
|
||||
(list (choice :tag "Property"
|
||||
(const :right-align)
|
||||
(const :pad-right)
|
||||
(symbol))
|
||||
(sexp :tag "Value"))))))
|
||||
|
||||
(defcustom magit-repolist-column-flag-alist
|
||||
'((magit-untracked-files . "N")
|
||||
(magit-unstaged-files . "U")
|
||||
(magit-staged-files . "S"))
|
||||
"Association list of predicates and flags for `magit-repolist-column-flag'.
|
||||
|
||||
Each element is of the form (FUNCTION . FLAG). Each FUNCTION is
|
||||
called with no arguments, with `default-directory' bound to the
|
||||
top level of a repository working tree, until one of them returns
|
||||
a non-nil value. FLAG corresponding to that function is returned
|
||||
as the value of `magit-repolist-column-flag'."
|
||||
:package-version '(magit . "3.0.0")
|
||||
:group 'magit-repolist
|
||||
:type '(alist :key-type (function :tag "Predicate Function")
|
||||
:value-type (string :tag "Flag")))
|
||||
|
||||
;;; List Repositories
|
||||
;;;; Command
|
||||
;;;###autoload
|
||||
(defun magit-list-repositories ()
|
||||
"Display a list of repositories.
|
||||
|
||||
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")))
|
||||
|
||||
;;;; Mode
|
||||
|
||||
(defvar magit-repolist-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(set-keymap-parent map tabulated-list-mode-map)
|
||||
(define-key map (kbd "C-m") 'magit-repolist-status)
|
||||
map)
|
||||
"Local keymap for Magit-Repolist mode buffers.")
|
||||
|
||||
(defun magit-repolist-status (&optional _button)
|
||||
"Show the status for the repository at point."
|
||||
(interactive)
|
||||
(--if-let (tabulated-list-get-id)
|
||||
(magit-status-setup-buffer (expand-file-name it))
|
||||
(user-error "There is no repository at point")))
|
||||
|
||||
(define-derived-mode magit-repolist-mode tabulated-list-mode "Repos"
|
||||
"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-refresh ()
|
||||
(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)))))
|
||||
(magit-list-repos-uniquify
|
||||
(--map (cons (file-name-nondirectory (directory-file-name it))
|
||||
it)
|
||||
(magit-list-repos))))))
|
||||
|
||||
;;;; Columns
|
||||
|
||||
(defun magit-repolist-column-ident (id)
|
||||
"Insert the identification of the repository.
|
||||
Usually this is just its basename."
|
||||
id)
|
||||
|
||||
(defun magit-repolist-column-path (_id)
|
||||
"Insert the absolute path of the repository."
|
||||
(abbreviate-file-name default-directory))
|
||||
|
||||
(defun magit-repolist-column-version (_id)
|
||||
"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.
|
||||
(magit-git-string "show" "--no-patch" "--format=%cd-g%h"
|
||||
"--date=format:%Y%m%d.%H%M"))))
|
||||
(save-match-data
|
||||
(when (string-match "-dirty\\'" v)
|
||||
(magit--put-face (1+ (match-beginning 0)) (length v) 'error v))
|
||||
(if (and v (string-match "\\`[0-9]" v))
|
||||
(concat " " v)
|
||||
v))))
|
||||
|
||||
(defun magit-repolist-column-branch (_id)
|
||||
"Insert the current branch."
|
||||
(magit-get-current-branch))
|
||||
|
||||
(defun magit-repolist-column-upstream (_id)
|
||||
"Insert the upstream branch of the current branch."
|
||||
(magit-get-upstream-branch))
|
||||
|
||||
(defun magit-repolist-column-flag (_id)
|
||||
"Insert a flag as specified by `magit-repolist-column-flag-alist'.
|
||||
|
||||
By default this indicates whether there are uncommitted changes.
|
||||
- N if there is at least one untracked file.
|
||||
- U if there is at least one unstaged file.
|
||||
- S if there is at least one staged file.
|
||||
Only one letter is shown, the first that applies."
|
||||
(seq-some (pcase-lambda (`(,fun . ,flag))
|
||||
(and (funcall fun) flag))
|
||||
magit-repolist-column-flag-alist))
|
||||
|
||||
(defun magit-repolist-column-unpulled-from-upstream (_id)
|
||||
"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)))))
|
||||
|
||||
(defun magit-repolist-column-unpulled-from-pushremote (_id)
|
||||
"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)))))
|
||||
|
||||
(defun magit-repolist-column-unpushed-to-upstream (_id)
|
||||
"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)))))
|
||||
|
||||
(defun magit-repolist-column-unpushed-to-pushremote (_id)
|
||||
"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)))))
|
||||
|
||||
(defun magit-repolist-column-branches (_id)
|
||||
"Insert number of branches."
|
||||
(let ((n (length (magit-list-local-branches))))
|
||||
(magit--propertize-face (number-to-string n) (if (> n 1) 'bold 'shadow))))
|
||||
|
||||
(defun magit-repolist-column-stashes (_id)
|
||||
"Insert number of stashes."
|
||||
(let ((n (length (magit-list-stashes))))
|
||||
(magit--propertize-face (number-to-string n) (if (> n 0) 'bold 'shadow))))
|
||||
|
||||
;;; Read Repository
|
||||
|
||||
(defun magit-read-repository (&optional read-directory-name)
|
||||
"Read a Git repository in the minibuffer, with completion.
|
||||
|
||||
The completion choices are the basenames of top-levels of
|
||||
repositories found in the directories specified by option
|
||||
`magit-repository-directories'. In case of name conflicts
|
||||
the basenames are prefixed with the name of the respective
|
||||
parent directories. The returned value is the actual path
|
||||
to the selected repository.
|
||||
|
||||
If READ-DIRECTORY-NAME is non-nil or no repositories can be
|
||||
found based on the value of `magit-repository-directories',
|
||||
then read an arbitrary directory using `read-directory-name'
|
||||
instead."
|
||||
(if-let ((repos (and (not read-directory-name)
|
||||
magit-repository-directories
|
||||
(magit-repos-alist))))
|
||||
(let ((reply (magit-completing-read "Git repository" repos)))
|
||||
(file-name-as-directory
|
||||
(or (cdr (assoc reply repos))
|
||||
(if (file-directory-p reply)
|
||||
(expand-file-name reply)
|
||||
(user-error "Not a repository or a directory: %s" reply)))))
|
||||
(file-name-as-directory
|
||||
(read-directory-name "Git repository: "
|
||||
(or (magit-toplevel) default-directory)))))
|
||||
|
||||
(defun magit-list-repos ()
|
||||
(cl-mapcan (pcase-lambda (`(,dir . ,depth))
|
||||
(magit-list-repos-1 dir depth))
|
||||
magit-repository-directories))
|
||||
|
||||
(defun magit-list-repos-1 (directory depth)
|
||||
(cond ((file-readable-p (expand-file-name ".git" directory))
|
||||
(list (file-name-as-directory directory)))
|
||||
((and (> depth 0) (magit-file-accessible-directory-p directory))
|
||||
(--mapcat (and (file-directory-p it)
|
||||
(magit-list-repos-1 it (1- depth)))
|
||||
(directory-files directory t
|
||||
directory-files-no-dot-files-regexp t)))))
|
||||
|
||||
(defun magit-list-repos-uniquify (alist)
|
||||
(let (result (dict (make-hash-table :test 'equal)))
|
||||
(dolist (a (delete-dups alist))
|
||||
(puthash (car a) (cons (cdr a) (gethash (car a) dict)) dict))
|
||||
(maphash
|
||||
(lambda (key value)
|
||||
(if (= (length value) 1)
|
||||
(push (cons key (car value)) result)
|
||||
(setq result
|
||||
(append result
|
||||
(magit-list-repos-uniquify
|
||||
(--map (cons (concat
|
||||
key "\\"
|
||||
(file-name-nondirectory
|
||||
(directory-file-name
|
||||
(substring it 0 (- (1+ (length key)))))))
|
||||
it)
|
||||
value))))))
|
||||
dict)
|
||||
result))
|
||||
|
||||
(defun magit-repos-alist ()
|
||||
(magit-list-repos-uniquify
|
||||
(--map (cons (file-name-nondirectory (directory-file-name it)) it)
|
||||
(magit-list-repos))))
|
||||
|
||||
;;; _
|
||||
(provide 'magit-repos)
|
||||
;;; magit-repos.el ends here
|
BIN
elpa/magit-20210414.1306/magit-repos.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-repos.elc
Normal file
Binary file not shown.
135
elpa/magit-20210414.1306/magit-reset.el
Normal file
135
elpa/magit-20210414.1306/magit-reset.el
Normal file
|
@ -0,0 +1,135 @@
|
|||
;;; magit-reset.el --- reset fuctionality -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2010-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
|
||||
;; Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
;; Magit is free software; you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
;;
|
||||
;; Magit is distributed in the hope that it will be useful, but WITHOUT
|
||||
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
;; License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Magit. If not, see http://www.gnu.org/licenses.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; This library implements reset commands.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'magit)
|
||||
|
||||
;;;###autoload (autoload 'magit-reset "magit" nil t)
|
||||
(transient-define-prefix magit-reset ()
|
||||
"Reset the `HEAD', index and/or worktree to a previous state."
|
||||
:man-page "git-reset"
|
||||
["Reset"
|
||||
("m" "mixed (HEAD and index)" magit-reset-mixed)
|
||||
("s" "soft (HEAD only)" magit-reset-soft)
|
||||
("h" "hard (HEAD, index and files)" magit-reset-hard)
|
||||
("k" "keep (HEAD and index, keeping uncommitted)" magit-reset-keep)
|
||||
("i" "index (only)" magit-reset-index)
|
||||
("w" "worktree (only)" magit-reset-worktree)
|
||||
""
|
||||
("f" "a file" magit-file-checkout)])
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-reset-mixed (commit)
|
||||
"Reset the `HEAD' and index to COMMIT, but not the working tree.
|
||||
\n(git reset --mixed COMMIT)"
|
||||
(interactive (list (magit-reset-read-branch-or-commit "Reset %s to")))
|
||||
(magit-reset-internal "--mixed" commit))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-reset-soft (commit)
|
||||
"Reset the `HEAD' to COMMIT, but not the index and working tree.
|
||||
\n(git reset --soft REVISION)"
|
||||
(interactive (list (magit-reset-read-branch-or-commit "Soft reset %s to")))
|
||||
(magit-reset-internal "--soft" commit))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-reset-hard (commit)
|
||||
"Reset the `HEAD', index, and working tree to COMMIT.
|
||||
\n(git reset --hard REVISION)"
|
||||
(interactive (list (magit-reset-read-branch-or-commit
|
||||
(concat (magit--propertize-face "Hard" 'bold)
|
||||
" reset %s to"))))
|
||||
(magit-reset-internal "--hard" commit))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-reset-keep (commit)
|
||||
"Reset the `HEAD' and index to COMMIT, while keeping uncommitted changes.
|
||||
\n(git reset --keep REVISION)"
|
||||
(interactive (list (magit-reset-read-branch-or-commit "Reset %s to")))
|
||||
(magit-reset-internal "--keep" commit))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-reset-index (commit)
|
||||
"Reset the index to COMMIT.
|
||||
Keep the `HEAD' and working tree as-is, so if COMMIT refers to the
|
||||
head this effectively unstages all changes.
|
||||
\n(git reset COMMIT .)"
|
||||
(interactive (list (magit-read-branch-or-commit "Reset index to")))
|
||||
(magit-reset-internal nil commit "."))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-reset-worktree (commit)
|
||||
"Reset the worktree to COMMIT.
|
||||
Keep the `HEAD' and index as-is."
|
||||
(interactive (list (magit-read-branch-or-commit "Reset worktree to")))
|
||||
(magit-wip-commit-before-change nil " before reset")
|
||||
(magit-with-temp-index commit nil
|
||||
(magit-call-git "checkout-index" "--all" "--force"))
|
||||
(magit-wip-commit-after-apply nil " after reset")
|
||||
(magit-refresh))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-reset-quickly (commit &optional hard)
|
||||
"Reset the `HEAD' and index to COMMIT, and possibly the working tree.
|
||||
With a prefix argument reset the working tree otherwise don't.
|
||||
\n(git reset --mixed|--hard COMMIT)"
|
||||
(interactive (list (magit-reset-read-branch-or-commit
|
||||
(if current-prefix-arg
|
||||
(concat (magit--propertize-face "Hard" 'bold)
|
||||
" reset %s to")
|
||||
"Reset %s to"))
|
||||
current-prefix-arg))
|
||||
(magit-reset-internal (if hard "--hard" "--mixed") commit))
|
||||
|
||||
(defun magit-reset-read-branch-or-commit (prompt)
|
||||
"Prompt for and return a ref to reset HEAD to.
|
||||
|
||||
PROMPT is a format string, where either the current branch name
|
||||
or \"detached head\" will be substituted for %s."
|
||||
(magit-read-branch-or-commit
|
||||
(format prompt (or (magit-get-current-branch) "detached head"))))
|
||||
|
||||
(defun magit-reset-internal (arg commit &optional path)
|
||||
(when (and (not (member arg '("--hard" nil)))
|
||||
(equal (magit-rev-parse commit)
|
||||
(magit-rev-parse "HEAD~")))
|
||||
(with-temp-buffer
|
||||
(magit-git-insert "show" "-s" "--format=%B" "HEAD")
|
||||
(when git-commit-major-mode
|
||||
(funcall git-commit-major-mode))
|
||||
(git-commit-setup-font-lock)
|
||||
(git-commit-save-message)))
|
||||
(let ((cmd (if (and (equal commit "HEAD") (not arg)) "unstage" "reset")))
|
||||
(magit-wip-commit-before-change nil (concat " before " cmd))
|
||||
(magit-run-git "reset" arg commit "--" path)
|
||||
(when (equal cmd "unstage")
|
||||
(magit-wip-commit-after-apply nil " after unstage"))))
|
||||
|
||||
;;; _
|
||||
(provide 'magit-reset)
|
||||
;;; magit-reset.el ends here
|
BIN
elpa/magit-20210414.1306/magit-reset.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-reset.elc
Normal file
Binary file not shown.
1838
elpa/magit-20210414.1306/magit-section.el
Normal file
1838
elpa/magit-20210414.1306/magit-section.el
Normal file
File diff suppressed because it is too large
Load Diff
BIN
elpa/magit-20210414.1306/magit-section.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-section.elc
Normal file
Binary file not shown.
1054
elpa/magit-20210414.1306/magit-sequence.el
Normal file
1054
elpa/magit-20210414.1306/magit-sequence.el
Normal file
File diff suppressed because it is too large
Load Diff
BIN
elpa/magit-20210414.1306/magit-sequence.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-sequence.elc
Normal file
Binary file not shown.
548
elpa/magit-20210414.1306/magit-stash.el
Normal file
548
elpa/magit-20210414.1306/magit-stash.el
Normal file
|
@ -0,0 +1,548 @@
|
|||
;;; magit-stash.el --- stash support for Magit -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2008-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
|
||||
;; Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
;; Magit is free software; you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
;;
|
||||
;; Magit is distributed in the hope that it will be useful, but WITHOUT
|
||||
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
;; License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Magit. If not, see http://www.gnu.org/licenses.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Support for Git stashes.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'magit)
|
||||
(require 'magit-reflog)
|
||||
|
||||
;; For `magit-stash-drop'.
|
||||
(defvar helm-comp-read-use-marked)
|
||||
|
||||
;;; Options
|
||||
|
||||
(defgroup magit-stash nil
|
||||
"List stashes and show stash diffs."
|
||||
:group 'magit-modes)
|
||||
|
||||
;;;; Diff options
|
||||
|
||||
(defcustom magit-stash-sections-hook
|
||||
'(magit-insert-stash-notes
|
||||
magit-insert-stash-worktree
|
||||
magit-insert-stash-index
|
||||
magit-insert-stash-untracked)
|
||||
"Hook run to insert sections into stash diff buffers."
|
||||
:package-version '(magit . "2.1.0")
|
||||
:group 'magit-stash
|
||||
:type 'hook)
|
||||
|
||||
;;;; Log options
|
||||
|
||||
(defcustom magit-stashes-margin
|
||||
(list (nth 0 magit-log-margin)
|
||||
(nth 1 magit-log-margin)
|
||||
'magit-log-margin-width nil
|
||||
(nth 4 magit-log-margin))
|
||||
"Format of the margin in `magit-stashes-mode' buffers.
|
||||
|
||||
The value has the form (INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH).
|
||||
|
||||
If INIT is non-nil, then the margin is shown initially.
|
||||
STYLE controls how to format the author or committer date.
|
||||
It can be one of `age' (to show the age of the commit),
|
||||
`age-abbreviated' (to abbreviate the time unit to a character),
|
||||
or a string (suitable for `format-time-string') to show the
|
||||
actual date. Option `magit-log-margin-show-committer-date'
|
||||
controls which date is being displayed.
|
||||
WIDTH controls the width of the margin. This exists for forward
|
||||
compatibility and currently the value should not be changed.
|
||||
AUTHOR controls whether the name of the author is also shown by
|
||||
default.
|
||||
AUTHOR-WIDTH has to be an integer. When the name of the author
|
||||
is shown, then this specifies how much space is used to do so."
|
||||
:package-version '(magit . "2.9.0")
|
||||
:group 'magit-stash
|
||||
:group 'magit-margin
|
||||
:type magit-log-margin--custom-type
|
||||
:initialize 'magit-custom-initialize-reset
|
||||
:set-after '(magit-log-margin)
|
||||
:set (apply-partially #'magit-margin-set-variable 'magit-stashes-mode))
|
||||
|
||||
;;; Commands
|
||||
|
||||
;;;###autoload (autoload 'magit-stash "magit-stash" nil t)
|
||||
(transient-define-prefix magit-stash ()
|
||||
"Stash uncommitted changes."
|
||||
:man-page "git-stash"
|
||||
["Arguments"
|
||||
("-u" "Also save untracked files" ("-u" "--include-untracked"))
|
||||
("-a" "Also save untracked and ignored files" ("-a" "--all"))]
|
||||
[["Stash"
|
||||
("z" "both" magit-stash-both)
|
||||
("i" "index" magit-stash-index)
|
||||
("w" "worktree" magit-stash-worktree)
|
||||
("x" "keeping index" magit-stash-keep-index)]
|
||||
["Snapshot"
|
||||
("Z" "both" magit-snapshot-both)
|
||||
("I" "index" magit-snapshot-index)
|
||||
("W" "worktree" magit-snapshot-worktree)
|
||||
("r" "to wip ref" magit-wip-commit)]
|
||||
["Use"
|
||||
("a" "Apply" magit-stash-apply)
|
||||
("p" "Pop" magit-stash-pop)
|
||||
("k" "Drop" magit-stash-drop)]
|
||||
["Inspect"
|
||||
("l" "List" magit-stash-list)
|
||||
("v" "Show" magit-stash-show)]
|
||||
["Transform"
|
||||
("b" "Branch" magit-stash-branch)
|
||||
("B" "Branch here" magit-stash-branch-here)
|
||||
("f" "Format patch" magit-stash-format-patch)]])
|
||||
|
||||
(defun magit-stash-arguments ()
|
||||
(transient-args 'magit-stash))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-stash-both (message &optional include-untracked)
|
||||
"Create a stash of the index and working tree.
|
||||
Untracked files are included according to infix arguments.
|
||||
One prefix argument is equivalent to `--include-untracked'
|
||||
while two prefix arguments are equivalent to `--all'."
|
||||
(interactive (magit-stash-read-args))
|
||||
(magit-stash-save message t t include-untracked t))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-stash-index (message)
|
||||
"Create a stash of the index only.
|
||||
Unstaged and untracked changes are not stashed. The stashed
|
||||
changes are applied in reverse to both the index and the
|
||||
worktree. This command can fail when the worktree is not clean.
|
||||
Applying the resulting stash has the inverse effect."
|
||||
(interactive (list (magit-stash-read-message)))
|
||||
(magit-stash-save message t nil nil t 'worktree))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-stash-worktree (message &optional include-untracked)
|
||||
"Create a stash of unstaged changes in the working tree.
|
||||
Untracked files are included according to infix arguments.
|
||||
One prefix argument is equivalent to `--include-untracked'
|
||||
while two prefix arguments are equivalent to `--all'."
|
||||
(interactive (magit-stash-read-args))
|
||||
(magit-stash-save message nil t include-untracked t 'index))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-stash-keep-index (message &optional include-untracked)
|
||||
"Create a stash of the index and working tree, keeping index intact.
|
||||
Untracked files are included according to infix arguments.
|
||||
One prefix argument is equivalent to `--include-untracked'
|
||||
while two prefix arguments are equivalent to `--all'."
|
||||
(interactive (magit-stash-read-args))
|
||||
(magit-stash-save message t t include-untracked t 'index))
|
||||
|
||||
(defun magit-stash-read-args ()
|
||||
(list (magit-stash-read-message)
|
||||
(magit-stash-read-untracked)))
|
||||
|
||||
(defun magit-stash-read-untracked ()
|
||||
(let ((prefix (prefix-numeric-value current-prefix-arg))
|
||||
(args (magit-stash-arguments)))
|
||||
(cond ((or (= prefix 16) (member "--all" args)) 'all)
|
||||
((or (= prefix 4) (member "--include-untracked" args)) t))))
|
||||
|
||||
(defun magit-stash-read-message ()
|
||||
(let* ((default (format "On %s: "
|
||||
(or (magit-get-current-branch) "(no branch)")))
|
||||
(input (magit-read-string "Stash message" default)))
|
||||
(if (equal input default)
|
||||
(concat default (magit-rev-format "%h %s"))
|
||||
input)))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-snapshot-both (&optional include-untracked)
|
||||
"Create a snapshot of the index and working tree.
|
||||
Untracked files are included according to infix arguments.
|
||||
One prefix argument is equivalent to `--include-untracked'
|
||||
while two prefix arguments are equivalent to `--all'."
|
||||
(interactive (magit-snapshot-read-args))
|
||||
(magit-snapshot-save t t include-untracked t))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-snapshot-index ()
|
||||
"Create a snapshot of the index only.
|
||||
Unstaged and untracked changes are not stashed."
|
||||
(interactive)
|
||||
(magit-snapshot-save t nil nil t))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-snapshot-worktree (&optional include-untracked)
|
||||
"Create a snapshot of unstaged changes in the working tree.
|
||||
Untracked files are included according to infix arguments.
|
||||
One prefix argument is equivalent to `--include-untracked'
|
||||
while two prefix arguments are equivalent to `--all'."
|
||||
(interactive (magit-snapshot-read-args))
|
||||
(magit-snapshot-save nil t include-untracked t))
|
||||
|
||||
(defun magit-snapshot-read-args ()
|
||||
(list (magit-stash-read-untracked)))
|
||||
|
||||
(defun magit-snapshot-save (index worktree untracked &optional refresh)
|
||||
(magit-stash-save (concat "WIP on " (magit-stash-summary))
|
||||
index worktree untracked refresh t))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-stash-apply (stash)
|
||||
"Apply a stash to the working tree.
|
||||
Try to preserve the stash index. If that fails because there
|
||||
are staged changes, apply without preserving the stash index."
|
||||
(interactive (list (magit-read-stash "Apply stash")))
|
||||
(if (= (magit-call-git "stash" "apply" "--index" stash) 0)
|
||||
(magit-refresh)
|
||||
(magit-run-git "stash" "apply" stash)))
|
||||
|
||||
(defun magit-stash-pop (stash)
|
||||
"Apply a stash to the working tree and remove it from stash list.
|
||||
Try to preserve the stash index. If that fails because there
|
||||
are staged changes, apply without preserving the stash index
|
||||
and forgo removing the stash."
|
||||
(interactive (list (magit-read-stash "Pop stash")))
|
||||
(if (= (magit-call-git "stash" "apply" "--index" stash) 0)
|
||||
(magit-stash-drop stash)
|
||||
(magit-run-git "stash" "apply" stash)))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-stash-drop (stash)
|
||||
"Remove a stash from the stash list.
|
||||
When the region is active offer to drop all contained stashes."
|
||||
(interactive
|
||||
(list (--if-let (magit-region-values 'stash)
|
||||
(magit-confirm 'drop-stashes nil "Drop %i stashes" nil it)
|
||||
(let ((helm-comp-read-use-marked t))
|
||||
(magit-read-stash "Drop stash")))))
|
||||
(dolist (stash (if (listp stash)
|
||||
(nreverse (prog1 stash (setq stash (car stash))))
|
||||
(list stash)))
|
||||
(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-refresh))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-stash-clear (ref)
|
||||
"Remove all stashes saved in REF's reflog by deleting REF."
|
||||
(interactive (let ((ref (or (magit-section-value-if 'stashes) "refs/stash")))
|
||||
(magit-confirm t (format "Drop all stashes in %s" ref))
|
||||
(list ref)))
|
||||
(magit-run-git "update-ref" "-d" ref))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-stash-branch (stash branch)
|
||||
"Create and checkout a new BRANCH from STASH."
|
||||
(interactive (list (magit-read-stash "Branch stash")
|
||||
(magit-read-string-ns "Branch name")))
|
||||
(magit-run-git "stash" "branch" branch stash))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-stash-branch-here (stash branch)
|
||||
"Create and checkout a new BRANCH and apply STASH.
|
||||
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 ((magit-inhibit-refresh t))
|
||||
(magit-branch-and-checkout branch (or (magit-get-current-branch) "HEAD")))
|
||||
(magit-stash-apply stash))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-stash-format-patch (stash)
|
||||
"Create a patch from STASH"
|
||||
(interactive (list (magit-read-stash "Create patch from stash")))
|
||||
(with-temp-file (magit-rev-format "0001-%f.patch" stash)
|
||||
(magit-git-insert "stash" "show" "-p" stash))
|
||||
(magit-refresh))
|
||||
|
||||
;;; Plumbing
|
||||
|
||||
(defun magit-stash-save (message index worktree untracked
|
||||
&optional refresh keep noerror ref)
|
||||
(if (or (and index (magit-staged-files t))
|
||||
(and worktree (magit-unstaged-files t))
|
||||
(and untracked (magit-untracked-files (eq untracked 'all))))
|
||||
(magit-with-toplevel
|
||||
(magit-stash-store message (or ref "refs/stash")
|
||||
(magit-stash-create message index worktree untracked))
|
||||
(if (eq keep 'worktree)
|
||||
(with-temp-buffer
|
||||
(magit-git-insert "diff" "--cached")
|
||||
(magit-run-git-with-input
|
||||
"apply" "--reverse" "--cached" "--ignore-space-change" "-")
|
||||
(magit-run-git-with-input
|
||||
"apply" "--reverse" "--ignore-space-change" "-"))
|
||||
(unless (eq keep t)
|
||||
(if (eq keep 'index)
|
||||
(magit-call-git "checkout" "--" ".")
|
||||
(magit-call-git "reset" "--hard" "HEAD" "--"))
|
||||
(when untracked
|
||||
(magit-call-git "clean" "--force" "-d"
|
||||
(and (eq untracked 'all) "-x")))))
|
||||
(when refresh
|
||||
(magit-refresh)))
|
||||
(unless noerror
|
||||
(user-error "No %s changes to save" (cond ((not index) "unstaged")
|
||||
((not worktree) "staged")
|
||||
(t "local"))))))
|
||||
|
||||
(defun magit-stash-store (message ref commit)
|
||||
(magit-update-ref ref message commit t))
|
||||
|
||||
(defun magit-stash-create (message index worktree untracked)
|
||||
(unless (magit-rev-parse "--verify" "HEAD")
|
||||
(error "You do not have the initial commit yet"))
|
||||
(let ((magit-git-global-arguments (nconc (list "-c" "commit.gpgsign=false")
|
||||
magit-git-global-arguments))
|
||||
(default-directory (magit-toplevel))
|
||||
(summary (magit-stash-summary))
|
||||
(head "HEAD"))
|
||||
(when (and worktree (not index))
|
||||
(setq head (or (magit-commit-tree "pre-stash index" nil "HEAD")
|
||||
(error "Cannot save the current index state"))))
|
||||
(or (setq index (magit-commit-tree (concat "index on " summary) nil head))
|
||||
(error "Cannot save the current index state"))
|
||||
(and untracked
|
||||
(setq untracked (magit-untracked-files (eq untracked 'all)))
|
||||
(setq untracked (magit-with-temp-index nil nil
|
||||
(or (and (magit-update-files untracked)
|
||||
(magit-commit-tree
|
||||
(concat "untracked files on " summary)))
|
||||
(error "Cannot save the untracked files")))))
|
||||
(magit-with-temp-index index "-m"
|
||||
(when worktree
|
||||
(or (magit-update-files (magit-git-items "diff" "-z" "--name-only" head))
|
||||
(error "Cannot save the current worktree state")))
|
||||
(or (magit-commit-tree message nil head index untracked)
|
||||
(error "Cannot save the current worktree state")))))
|
||||
|
||||
(defun magit-stash-summary ()
|
||||
(concat (or (magit-get-current-branch) "(no branch)")
|
||||
": " (magit-rev-format "%h %s")))
|
||||
|
||||
;;; Sections
|
||||
|
||||
(defvar magit-stashes-section-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map [remap magit-delete-thing] 'magit-stash-clear)
|
||||
map)
|
||||
"Keymap for `stashes' section.")
|
||||
|
||||
(defvar magit-stash-section-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map [remap magit-visit-thing] 'magit-stash-show)
|
||||
(define-key map [remap magit-delete-thing] 'magit-stash-drop)
|
||||
(define-key map "a" 'magit-stash-apply)
|
||||
(define-key map "A" 'magit-stash-pop)
|
||||
map)
|
||||
"Keymap for `stash' sections.")
|
||||
|
||||
(magit-define-section-jumper magit-jump-to-stashes
|
||||
"Stashes" stashes "refs/stash")
|
||||
|
||||
(cl-defun magit-insert-stashes (&optional (ref "refs/stash")
|
||||
(heading "Stashes:"))
|
||||
"Insert `stashes' section showing reflog for \"refs/stash\".
|
||||
If optional REF is non-nil, show reflog for that instead.
|
||||
If optional HEADING is non-nil, use that as section heading
|
||||
instead of \"Stashes:\"."
|
||||
(let ((verified (magit-rev-verify ref))
|
||||
(autostash
|
||||
(and (magit-rebase-in-progress-p)
|
||||
(thread-first
|
||||
(if (file-directory-p (magit-git-dir "rebase-merge"))
|
||||
"rebase-merge/autostash"
|
||||
"rebase-apply/autostash")
|
||||
magit-git-dir
|
||||
magit-file-line))))
|
||||
(when (or autostash verified)
|
||||
(magit-insert-section (stashes ref)
|
||||
(magit-insert-heading heading)
|
||||
(when autostash
|
||||
(pcase-let ((`(,author ,date ,msg)
|
||||
(split-string
|
||||
(car (magit-git-lines
|
||||
"show" "-q" "--format=%aN%x00%at%x00%s"
|
||||
autostash))
|
||||
"\0")))
|
||||
(magit-insert-section (stash autostash)
|
||||
(insert (propertize "AUTOSTASH" 'font-lock-face 'magit-hash))
|
||||
(insert " " msg "\n")
|
||||
(save-excursion
|
||||
(backward-char)
|
||||
(magit-log-format-margin autostash author date)))))
|
||||
(if verified
|
||||
(magit-git-wash (apply-partially 'magit-log-wash-log 'stash)
|
||||
"reflog" "--format=%gd%x00%aN%x00%at%x00%gs" ref)
|
||||
(insert ?\n)
|
||||
(save-excursion
|
||||
(backward-char)
|
||||
(magit-make-margin-overlay)))))))
|
||||
|
||||
;;; List Stashes
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-stash-list ()
|
||||
"List all stashes in a buffer."
|
||||
(interactive)
|
||||
(magit-stashes-setup-buffer))
|
||||
|
||||
(define-derived-mode magit-stashes-mode magit-reflog-mode "Magit Stashes"
|
||||
"Mode for looking at lists of stashes."
|
||||
:group 'magit-log
|
||||
(hack-dir-local-variables-non-file-buffer))
|
||||
|
||||
(defun magit-stashes-setup-buffer ()
|
||||
(magit-setup-buffer #'magit-stashes-mode nil
|
||||
(magit-buffer-refname "refs/stash")))
|
||||
|
||||
(defun magit-stashes-refresh-buffer ()
|
||||
(magit-insert-section (stashesbuf)
|
||||
(magit-insert-heading (if (equal magit-buffer-refname "refs/stash")
|
||||
"Stashes:"
|
||||
(format "Stashes [%s]:" magit-buffer-refname)))
|
||||
(magit-git-wash (apply-partially 'magit-log-wash-log 'stash)
|
||||
"reflog" "--format=%gd%x00%aN%x00%at%x00%gs" magit-buffer-refname)))
|
||||
|
||||
(cl-defmethod magit-buffer-value (&context (major-mode magit-stashes-mode))
|
||||
magit-buffer-refname)
|
||||
|
||||
(defvar magit--update-stash-buffer nil)
|
||||
|
||||
(defun magit-stashes-maybe-update-stash-buffer (&optional _)
|
||||
"When moving in the stashes buffer, update the stash buffer.
|
||||
If there is no stash buffer in the same frame, then do nothing."
|
||||
(when (derived-mode-p 'magit-stashes-mode)
|
||||
(magit--maybe-update-stash-buffer)))
|
||||
|
||||
(defun magit--maybe-update-stash-buffer ()
|
||||
(when-let ((stash (magit-section-value-if 'stash))
|
||||
(buffer (magit-get-mode-buffer 'magit-stash-mode nil t)))
|
||||
(if magit--update-stash-buffer
|
||||
(setq magit--update-stash-buffer (list stash buffer))
|
||||
(setq magit--update-stash-buffer (list stash 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)))))
|
||||
(lambda ()
|
||||
(pcase-let ((`(,stash ,buf) magit--update-stash-buffer))
|
||||
(setq magit--update-stash-buffer nil)
|
||||
(when (buffer-live-p buf)
|
||||
(let ((magit-display-buffer-noselect t))
|
||||
(apply #'magit-stash-show stash args))))
|
||||
(setq magit--update-stash-buffer nil)))))))
|
||||
|
||||
;;; Show Stash
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-stash-show (stash &optional args files)
|
||||
"Show all diffs of a stash in a buffer."
|
||||
(interactive (cons (or (and (not current-prefix-arg)
|
||||
(magit-stash-at-point))
|
||||
(magit-read-stash "Show stash"))
|
||||
(pcase-let ((`(,args ,files)
|
||||
(magit-diff-arguments 'magit-stash-mode)))
|
||||
(list (delete "--stat" args) files))))
|
||||
(magit-stash-setup-buffer stash args files))
|
||||
|
||||
(define-derived-mode magit-stash-mode magit-diff-mode "Magit Stash"
|
||||
"Mode for looking at individual stashes."
|
||||
:group 'magit-diff
|
||||
(hack-dir-local-variables-non-file-buffer))
|
||||
|
||||
(defun magit-stash-setup-buffer (stash args files)
|
||||
(magit-setup-buffer #'magit-stash-mode nil
|
||||
(magit-buffer-revision stash)
|
||||
(magit-buffer-range (format "%s^..%s" stash stash))
|
||||
(magit-buffer-diff-args args)
|
||||
(magit-buffer-diff-files files)))
|
||||
|
||||
(defun magit-stash-refresh-buffer ()
|
||||
(magit-set-header-line-format
|
||||
(concat (capitalize magit-buffer-revision) " "
|
||||
(propertize (magit-rev-format "%s" magit-buffer-revision)
|
||||
'font-lock-face
|
||||
(list :weight 'normal :foreground
|
||||
(face-attribute 'default :foreground)))))
|
||||
(setq magit-buffer-revision-hash (magit-rev-parse magit-buffer-revision))
|
||||
(magit-insert-section (stash)
|
||||
(magit-run-section-hook 'magit-stash-sections-hook)))
|
||||
|
||||
(cl-defmethod magit-buffer-value (&context (major-mode magit-stash-mode))
|
||||
magit-buffer-revision)
|
||||
|
||||
(defun magit-stash-insert-section (commit range message &optional files)
|
||||
(magit-insert-section (commit commit)
|
||||
(magit-insert-heading message)
|
||||
(magit--insert-diff "diff" range "-p" "--no-prefix" magit-buffer-diff-args
|
||||
"--" (or files magit-buffer-diff-files))))
|
||||
|
||||
(defun magit-insert-stash-notes ()
|
||||
"Insert section showing notes for a stash.
|
||||
This shows the notes for stash@{N} but not for the other commits
|
||||
that make up the stash."
|
||||
(magit-insert-section section (note)
|
||||
(magit-insert-heading "Notes")
|
||||
(magit-git-insert "notes" "show" magit-buffer-revision)
|
||||
(if (= (point)
|
||||
(oref section content))
|
||||
(magit-cancel-section)
|
||||
(insert "\n"))))
|
||||
|
||||
(defun magit-insert-stash-index ()
|
||||
"Insert section showing staged changes of the stash."
|
||||
(magit-stash-insert-section
|
||||
(format "%s^2" magit-buffer-revision)
|
||||
(format "%s^..%s^2" magit-buffer-revision magit-buffer-revision)
|
||||
"Staged"))
|
||||
|
||||
(defun magit-insert-stash-worktree ()
|
||||
"Insert section showing unstaged changes of the stash."
|
||||
(magit-stash-insert-section
|
||||
magit-buffer-revision
|
||||
(format "%s^2..%s" magit-buffer-revision magit-buffer-revision)
|
||||
"Unstaged"))
|
||||
|
||||
(defun magit-insert-stash-untracked ()
|
||||
"Insert section showing the untracked files commit of the stash."
|
||||
(let ((stash magit-buffer-revision)
|
||||
(rev (concat magit-buffer-revision "^3")))
|
||||
(when (magit-rev-verify rev)
|
||||
(magit-stash-insert-section (format "%s^3" stash)
|
||||
(format "%s^..%s^3" stash stash)
|
||||
"Untracked files"
|
||||
(magit-git-items "ls-tree" "-z" "--name-only"
|
||||
"-r" "--full-tree" rev)))))
|
||||
|
||||
;;; _
|
||||
(provide 'magit-stash)
|
||||
;;; magit-stash.el ends here
|
BIN
elpa/magit-20210414.1306/magit-stash.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-stash.elc
Normal file
Binary file not shown.
844
elpa/magit-20210414.1306/magit-status.el
Normal file
844
elpa/magit-20210414.1306/magit-status.el
Normal file
|
@ -0,0 +1,844 @@
|
|||
;;; magit-status.el --- the grand overview -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2010-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
|
||||
;; Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
;; Magit is free software; you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
;;
|
||||
;; Magit is distributed in the hope that it will be useful, but WITHOUT
|
||||
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
;; License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Magit. If not, see http://www.gnu.org/licenses.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; This library implements the status buffer.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'magit)
|
||||
|
||||
;;; Options
|
||||
|
||||
(defgroup magit-status nil
|
||||
"Inspect and manipulate Git repositories."
|
||||
:link '(info-link "(magit)Status Buffer")
|
||||
:group 'magit-modes)
|
||||
|
||||
(defcustom magit-status-mode-hook nil
|
||||
"Hook run after entering Magit-Status mode."
|
||||
:group 'magit-status
|
||||
:type 'hook)
|
||||
|
||||
(defcustom magit-status-headers-hook
|
||||
'(magit-insert-error-header
|
||||
magit-insert-diff-filter-header
|
||||
magit-insert-head-branch-header
|
||||
magit-insert-upstream-branch-header
|
||||
magit-insert-push-branch-header
|
||||
magit-insert-tags-header)
|
||||
"Hook run to insert headers into the status buffer.
|
||||
|
||||
This hook is run by `magit-insert-status-headers', which in turn
|
||||
has to be a member of `magit-status-sections-hook' to be used at
|
||||
all."
|
||||
:package-version '(magit . "2.1.0")
|
||||
:group 'magit-status
|
||||
:type 'hook
|
||||
:options '(magit-insert-error-header
|
||||
magit-insert-diff-filter-header
|
||||
magit-insert-repo-header
|
||||
magit-insert-remote-header
|
||||
magit-insert-head-branch-header
|
||||
magit-insert-upstream-branch-header
|
||||
magit-insert-push-branch-header
|
||||
magit-insert-tags-header))
|
||||
|
||||
(defcustom magit-status-sections-hook
|
||||
'(magit-insert-status-headers
|
||||
magit-insert-merge-log
|
||||
magit-insert-rebase-sequence
|
||||
magit-insert-am-sequence
|
||||
magit-insert-sequencer-sequence
|
||||
magit-insert-bisect-output
|
||||
magit-insert-bisect-rest
|
||||
magit-insert-bisect-log
|
||||
magit-insert-untracked-files
|
||||
magit-insert-unstaged-changes
|
||||
magit-insert-staged-changes
|
||||
magit-insert-stashes
|
||||
magit-insert-unpushed-to-pushremote
|
||||
magit-insert-unpushed-to-upstream-or-recent
|
||||
magit-insert-unpulled-from-pushremote
|
||||
magit-insert-unpulled-from-upstream)
|
||||
"Hook run to insert sections into a status buffer."
|
||||
:package-version '(magit . "2.12.0")
|
||||
:group 'magit-status
|
||||
:type 'hook)
|
||||
|
||||
(defcustom magit-status-initial-section '(1)
|
||||
"The section point is placed on when a status buffer is created.
|
||||
|
||||
When such a buffer is merely being refreshed or being shown again
|
||||
after it was merely buried, then this option has no effect.
|
||||
|
||||
If this is nil, then point remains on the very first section as
|
||||
usual. Otherwise it has to be a list of integers and section
|
||||
identity lists. The members of that list are tried in order
|
||||
until a matching section is found.
|
||||
|
||||
An integer means to jump to the nth section, 1 for example
|
||||
jumps over the headings. To get a section's \"identity list\"
|
||||
use \\[universal-argument] \\[magit-describe-section-briefly].
|
||||
|
||||
If, for example, you want to jump to the commits that haven't
|
||||
been pulled from the upstream, or else the second section, then
|
||||
use: (((unpulled . \"..@{upstream}\") (status)) 1).
|
||||
|
||||
See option `magit-section-initial-visibility-alist' for how to
|
||||
control the initial visibility of the jumped to section."
|
||||
:package-version '(magit . "2.90.0")
|
||||
:group 'magit-status
|
||||
:type '(choice (const :tag "as usual" nil)
|
||||
(repeat (choice (number :tag "nth top-level section")
|
||||
(sexp :tag "section identity")))))
|
||||
|
||||
(defcustom magit-status-goto-file-position nil
|
||||
"Whether to go to position corresponding to file position.
|
||||
|
||||
If this is non-nil and the current buffer is visiting a file,
|
||||
then `magit-status' tries to go to the position in the status
|
||||
buffer that corresponds to the position in the file-visiting
|
||||
buffer. This jumps into either the diff of unstaged changes
|
||||
or the diff of staged changes.
|
||||
|
||||
If the previously current buffer does not visit a file, or if
|
||||
the file has neither unstaged nor staged changes then this has
|
||||
no effect.
|
||||
|
||||
The command `magit-status-here' tries to go to that position,
|
||||
regardless of the value of this option."
|
||||
:package-version '(magit . "3.0.0")
|
||||
:group 'magit-status
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom magit-status-show-hashes-in-headers nil
|
||||
"Whether headers in the status buffer show hashes.
|
||||
The functions which respect this option are
|
||||
`magit-insert-head-branch-header',
|
||||
`magit-insert-upstream-branch-header', and
|
||||
`magit-insert-push-branch-header'."
|
||||
:package-version '(magit . "2.4.0")
|
||||
:group 'magit-status
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom magit-status-margin
|
||||
(list nil
|
||||
(nth 1 magit-log-margin)
|
||||
'magit-log-margin-width nil
|
||||
(nth 4 magit-log-margin))
|
||||
"Format of the margin in `magit-status-mode' buffers.
|
||||
|
||||
The value has the form (INIT STYLE WIDTH AUTHOR AUTHOR-WIDTH).
|
||||
|
||||
If INIT is non-nil, then the margin is shown initially.
|
||||
STYLE controls how to format the author or committer date.
|
||||
It can be one of `age' (to show the age of the commit),
|
||||
`age-abbreviated' (to abbreviate the time unit to a character),
|
||||
or a string (suitable for `format-time-string') to show the
|
||||
actual date. Option `magit-log-margin-show-committer-date'
|
||||
controls which date is being displayed.
|
||||
WIDTH controls the width of the margin. This exists for forward
|
||||
compatibility and currently the value should not be changed.
|
||||
AUTHOR controls whether the name of the author is also shown by
|
||||
default.
|
||||
AUTHOR-WIDTH has to be an integer. When the name of the author
|
||||
is shown, then this specifies how much space is used to do so."
|
||||
:package-version '(magit . "2.9.0")
|
||||
:group 'magit-status
|
||||
:group 'magit-margin
|
||||
:type magit-log-margin--custom-type
|
||||
:initialize 'magit-custom-initialize-reset
|
||||
:set-after '(magit-log-margin)
|
||||
:set (apply-partially #'magit-margin-set-variable 'magit-status-mode))
|
||||
|
||||
(defcustom magit-status-use-buffer-arguments 'selected
|
||||
"Whether `magit-status' reuses arguments when the buffer already exists.
|
||||
|
||||
This option has no effect when merely refreshing the status
|
||||
buffer using `magit-refresh'.
|
||||
|
||||
Valid values are:
|
||||
|
||||
`always': Always use the set of arguments that is currently
|
||||
active in the status buffer, provided that buffer exists
|
||||
of course.
|
||||
`selected': Use the set of arguments from the status
|
||||
buffer, but only if it is displayed in a window of the
|
||||
current frame. This is the default.
|
||||
`current': Use the set of arguments from the status buffer,
|
||||
but only if it is the current buffer.
|
||||
`never': Never use the set of arguments from the status
|
||||
buffer."
|
||||
:package-version '(magit . "3.0.0")
|
||||
:group 'magit-buffers
|
||||
:group 'magit-commands
|
||||
:type '(choice
|
||||
(const :tag "always use args from buffer" always)
|
||||
(const :tag "use args from buffer if displayed in frame" selected)
|
||||
(const :tag "use args from buffer if it is current" current)
|
||||
(const :tag "never use args from buffer" never)))
|
||||
|
||||
;;; Commands
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-init (directory)
|
||||
"Initialize a Git repository, then show its status.
|
||||
|
||||
If the directory is below an existing repository, then the user
|
||||
has to confirm that a new one should be created inside. If the
|
||||
directory is the root of the existing repository, then the user
|
||||
has to confirm that it should be reinitialized.
|
||||
|
||||
Non-interactively DIRECTORY is (re-)initialized unconditionally."
|
||||
(interactive
|
||||
(let ((directory (file-name-as-directory
|
||||
(expand-file-name
|
||||
(read-directory-name "Create repository in: ")))))
|
||||
(when-let ((toplevel (magit-toplevel directory)))
|
||||
(setq toplevel (expand-file-name toplevel))
|
||||
(unless (y-or-n-p (if (file-equal-p toplevel directory)
|
||||
(format "Reinitialize existing repository %s? "
|
||||
directory)
|
||||
(format "%s is a repository. Create another in %s? "
|
||||
toplevel directory)))
|
||||
(user-error "Abort")))
|
||||
(list directory)))
|
||||
;; `git init' does not understand the meaning of "~"!
|
||||
(magit-call-git "init" (magit-convert-filename-for-git
|
||||
(expand-file-name directory)))
|
||||
(magit-status-setup-buffer directory))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-status (&optional directory cache)
|
||||
"Show the status of the current Git repository in a buffer.
|
||||
|
||||
If the current directory isn't located within a Git repository,
|
||||
then prompt for an existing repository or an arbitrary directory,
|
||||
depending on option `magit-repository-directories', and show the
|
||||
status of the selected repository instead.
|
||||
|
||||
* If that option specifies any existing repositories, then offer
|
||||
those for completion and show the status buffer for the
|
||||
selected one.
|
||||
|
||||
* Otherwise read an arbitrary directory using regular file-name
|
||||
completion. If the selected directory is the top-level of an
|
||||
existing working tree, then show the status buffer for that.
|
||||
|
||||
* Otherwise offer to initialize the selected directory as a new
|
||||
repository. After creating the repository show its status
|
||||
buffer.
|
||||
|
||||
These fallback behaviors can also be forced using one or more
|
||||
prefix arguments:
|
||||
|
||||
* With two prefix arguments (or more precisely a numeric prefix
|
||||
value of 16 or greater) read an arbitrary directory and act on
|
||||
it as described above. The same could be accomplished using
|
||||
the command `magit-init'.
|
||||
|
||||
* With a single prefix argument read an existing repository, or
|
||||
if none can be found based on `magit-repository-directories',
|
||||
then fall back to the same behavior as with two prefix
|
||||
arguments."
|
||||
(interactive
|
||||
(let ((magit--refresh-cache (list (cons 0 0))))
|
||||
(list (and (or current-prefix-arg (not (magit-toplevel)))
|
||||
(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
|
||||
(let ((toplevel (magit-toplevel directory)))
|
||||
(setq directory (file-name-as-directory
|
||||
(expand-file-name directory)))
|
||||
(if (and toplevel (file-equal-p directory toplevel))
|
||||
(magit-status-setup-buffer directory)
|
||||
(when (y-or-n-p
|
||||
(if toplevel
|
||||
(format "%s is a repository. Create another in %s? "
|
||||
toplevel directory)
|
||||
(format "Create repository in %s? " directory)))
|
||||
;; Creating a new repository invalidates cached values.
|
||||
(setq magit--refresh-cache nil)
|
||||
(magit-init directory))))
|
||||
(magit-status-setup-buffer default-directory))))
|
||||
|
||||
(put 'magit-status 'interactive-only 'magit-status-setup-buffer)
|
||||
|
||||
;;;###autoload
|
||||
(defalias 'magit 'magit-status
|
||||
"An alias for `magit-status' for better discoverability.
|
||||
|
||||
Instead of invoking this alias for `magit-status' using
|
||||
\"M-x magit RET\", you should bind a key to `magit-status'
|
||||
and read the info node `(magit)Getting Started', which
|
||||
also contains other useful hints.")
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-status-here ()
|
||||
"Like `magit-status' but with non-nil `magit-status-goto-file-position'."
|
||||
(interactive)
|
||||
(let ((magit-status-goto-file-position t))
|
||||
(call-interactively #'magit-status)))
|
||||
|
||||
(put 'magit-status-here 'interactive-only 'magit-status-setup-buffer)
|
||||
|
||||
(defvar magit--remotes-using-recent-git nil)
|
||||
|
||||
(defun magit--tramp-asserts (directory)
|
||||
(when-let ((remote (file-remote-p directory)))
|
||||
(unless (member remote magit--remotes-using-recent-git)
|
||||
(if-let ((version (let ((default-directory directory))
|
||||
(magit-git-version))))
|
||||
(if (version<= magit--minimal-git version)
|
||||
(push remote magit--remotes-using-recent-git)
|
||||
(display-warning 'magit (format "\
|
||||
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))
|
||||
(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)))))
|
||||
|
||||
;;; Mode
|
||||
|
||||
(defvar magit-status-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(set-keymap-parent map magit-mode-map)
|
||||
(define-key map "j" 'magit-status-jump)
|
||||
(define-key map [remap dired-jump] 'magit-dired-jump)
|
||||
map)
|
||||
"Keymap for `magit-status-mode'.")
|
||||
|
||||
(transient-define-prefix magit-status-jump ()
|
||||
"In a Magit-Status buffer, jump to a section."
|
||||
["Jump to"
|
||||
[("z " "Stashes" magit-jump-to-stashes
|
||||
:if (lambda () (memq 'magit-insert-stashes magit-status-sections-hook)))
|
||||
("t " "Tracked" magit-jump-to-tracked
|
||||
:if (lambda () (memq 'magit-insert-tracked-files magit-status-sections-hook)))
|
||||
("n " "Untracked" magit-jump-to-untracked
|
||||
:if (lambda () (memq 'magit-insert-untracked-files magit-status-sections-hook)))
|
||||
("u " "Unstaged" magit-jump-to-unstaged
|
||||
:if (lambda () (memq 'magit-insert-unstaged-changes magit-status-sections-hook)))
|
||||
("s " "Staged" magit-jump-to-staged
|
||||
:if (lambda () (memq 'magit-insert-staged-changes magit-status-sections-hook)))]
|
||||
[("fu" "Unpulled from upstream" magit-jump-to-unpulled-from-upstream
|
||||
:if (lambda () (memq 'magit-insert-unpulled-from-upstream magit-status-sections-hook)))
|
||||
("fp" "Unpulled from pushremote" magit-jump-to-unpulled-from-pushremote
|
||||
:if (lambda () (memq 'magit-insert-unpulled-from-pushremote magit-status-sections-hook)))
|
||||
("pu" magit-jump-to-unpushed-to-upstream
|
||||
:if (lambda ()
|
||||
(or (memq 'magit-insert-unpushed-to-upstream-or-recent magit-status-sections-hook)
|
||||
(memq 'magit-insert-unpushed-to-upstream magit-status-sections-hook)))
|
||||
:description (lambda ()
|
||||
(let ((upstream (magit-get-upstream-branch)))
|
||||
(if (or (not upstream)
|
||||
(magit-rev-ancestor-p "HEAD" upstream))
|
||||
"Recent commits"
|
||||
"Unmerged into upstream"))))
|
||||
("pp" "Unpushed to pushremote" magit-jump-to-unpushed-to-pushremote
|
||||
:if (lambda () (memq 'magit-insert-unpushed-to-pushremote magit-status-sections-hook)))
|
||||
("a " "Assumed unstaged" magit-jump-to-assume-unchanged
|
||||
:if (lambda () (memq 'magit-insert-assume-unchanged-files magit-status-sections-hook)))
|
||||
("w " "Skip worktree" magit-jump-to-skip-worktree
|
||||
:if (lambda () (memq 'magit-insert-skip-worktree-files magit-status-sections-hook)))]])
|
||||
|
||||
(define-derived-mode magit-status-mode magit-mode "Magit"
|
||||
"Mode for looking at Git status.
|
||||
|
||||
This mode is documented in info node `(magit)Status Buffer'.
|
||||
|
||||
\\<magit-mode-map>\
|
||||
Type \\[magit-refresh] to refresh the current buffer.
|
||||
Type \\[magit-section-toggle] to expand or hide the section at point.
|
||||
Type \\[magit-visit-thing] to visit the change or commit at point.
|
||||
|
||||
Type \\[magit-dispatch] to invoke major commands.
|
||||
|
||||
Staging and applying changes is documented in info node
|
||||
`(magit)Staging and Unstaging' and info node `(magit)Applying'.
|
||||
|
||||
\\<magit-hunk-section-map>Type \
|
||||
\\[magit-apply] to apply the change at point, \
|
||||
\\[magit-stage] to stage,
|
||||
\\[magit-unstage] to unstage, \
|
||||
\\[magit-discard] to discard, or \
|
||||
\\[magit-reverse] to reverse it.
|
||||
|
||||
\\<magit-status-mode-map>\
|
||||
Type \\[magit-commit] to create a commit.
|
||||
|
||||
\\{magit-status-mode-map}"
|
||||
:group 'magit-status
|
||||
(hack-dir-local-variables-non-file-buffer)
|
||||
(setq imenu-create-index-function
|
||||
'magit-imenu--status-create-index-function))
|
||||
|
||||
(put 'magit-status-mode 'magit-diff-default-arguments
|
||||
'("--no-ext-diff"))
|
||||
(put 'magit-status-mode 'magit-log-default-arguments
|
||||
'("-n256" "--decorate"))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-status-setup-buffer (&optional directory)
|
||||
(unless directory
|
||||
(setq directory default-directory))
|
||||
(magit--tramp-asserts directory)
|
||||
(let* ((default-directory directory)
|
||||
(d (magit-diff--get-value 'magit-status-mode
|
||||
magit-status-use-buffer-arguments))
|
||||
(l (magit-log--get-value 'magit-status-mode
|
||||
magit-status-use-buffer-arguments))
|
||||
(file (and magit-status-goto-file-position
|
||||
(magit-file-relative-name)))
|
||||
(line (and file (line-number-at-pos)))
|
||||
(col (and file (current-column)))
|
||||
(buf (magit-setup-buffer #'magit-status-mode nil
|
||||
(magit-buffer-diff-args (nth 0 d))
|
||||
(magit-buffer-diff-files (nth 1 d))
|
||||
(magit-buffer-log-args (nth 0 l))
|
||||
(magit-buffer-log-files (nth 1 l)))))
|
||||
(when file
|
||||
(with-current-buffer buf
|
||||
(let ((staged (magit-get-section '((staged) (status)))))
|
||||
(if (and staged
|
||||
(cadr (magit-diff--locate-hunk file line staged)))
|
||||
(magit-diff--goto-position file line col staged)
|
||||
(let ((unstaged (magit-get-section '((unstaged) (status)))))
|
||||
(unless (and unstaged
|
||||
(magit-diff--goto-position file line col unstaged))
|
||||
(when staged
|
||||
(magit-diff--goto-position file line col staged))))))))
|
||||
buf))
|
||||
|
||||
(defun magit-status-refresh-buffer ()
|
||||
(magit-git-exit-code "update-index" "--refresh")
|
||||
(magit-insert-section (status)
|
||||
(magit-run-section-hook 'magit-status-sections-hook)))
|
||||
|
||||
(defun magit-status-goto-initial-section ()
|
||||
"In a `magit-status-mode' buffer, jump `magit-status-initial-section'.
|
||||
Actually doing so is deferred until `magit-refresh-buffer-hook'
|
||||
runs `magit-status-goto-initial-section-1'. That function then
|
||||
removes itself from the hook, so that this only happens when the
|
||||
status buffer is first created."
|
||||
(when (and magit-status-initial-section
|
||||
(derived-mode-p 'magit-status-mode))
|
||||
(add-hook 'magit-refresh-buffer-hook
|
||||
'magit-status-goto-initial-section-1 nil t)))
|
||||
|
||||
(defun magit-status-goto-initial-section-1 ()
|
||||
"In a `magit-status-mode' buffer, jump `magit-status-initial-section'.
|
||||
This function removes itself from `magit-refresh-buffer-hook'."
|
||||
(when-let ((section
|
||||
(--some (if (integerp it)
|
||||
(nth (1- it)
|
||||
(magit-section-siblings (magit-current-section)
|
||||
'next))
|
||||
(magit-get-section it))
|
||||
magit-status-initial-section)))
|
||||
(goto-char (oref section start))
|
||||
(when-let ((vis (cdr (assq 'magit-status-initial-section
|
||||
magit-section-initial-visibility-alist))))
|
||||
(if (eq vis 'hide)
|
||||
(magit-section-hide section)
|
||||
(magit-section-show section))))
|
||||
(remove-hook 'magit-refresh-buffer-hook
|
||||
'magit-status-goto-initial-section-1 t))
|
||||
|
||||
(defun magit-status-maybe-update-revision-buffer (&optional _)
|
||||
"When moving in the status buffer, update the revision buffer.
|
||||
If there is no revision buffer in the same frame, then do nothing."
|
||||
(when (derived-mode-p 'magit-status-mode)
|
||||
(magit--maybe-update-revision-buffer)))
|
||||
|
||||
(defun magit-status-maybe-update-stash-buffer (&optional _)
|
||||
"When moving in the status buffer, update the stash buffer.
|
||||
If there is no stash buffer in the same frame, then do nothing."
|
||||
(when (derived-mode-p 'magit-status-mode)
|
||||
(magit--maybe-update-stash-buffer)))
|
||||
|
||||
(defun magit-status-maybe-update-blob-buffer (&optional _)
|
||||
"When moving in the status buffer, update the blob buffer.
|
||||
If there is no blob buffer in the same frame, then do nothing."
|
||||
(when (derived-mode-p 'magit-status-mode)
|
||||
(magit--maybe-update-blob-buffer)))
|
||||
|
||||
;;; Sections
|
||||
;;;; Special Headers
|
||||
|
||||
(defun magit-insert-status-headers ()
|
||||
"Insert header sections appropriate for `magit-status-mode' buffers.
|
||||
The sections are inserted by running the functions on the hook
|
||||
`magit-status-headers-hook'."
|
||||
(if (magit-rev-verify "HEAD")
|
||||
(magit-insert-headers 'magit-status-headers-hook)
|
||||
(insert "In the beginning there was darkness\n\n")))
|
||||
|
||||
(defvar magit-error-section-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map [remap magit-visit-thing] 'magit-process-buffer)
|
||||
map)
|
||||
"Keymap for `error' sections.")
|
||||
|
||||
(defun magit-insert-error-header ()
|
||||
"Insert the message about the Git error that just occurred.
|
||||
|
||||
This function is only aware of the last error that occur when Git
|
||||
was run for side-effects. If, for example, an error occurs while
|
||||
generating a diff, then that error won't be inserted. Refreshing
|
||||
the status buffer causes this section to disappear again."
|
||||
(when magit-this-error
|
||||
(magit-insert-section (error 'git)
|
||||
(insert (propertize (format "%-10s" "GitError! ")
|
||||
'font-lock-face 'magit-section-heading))
|
||||
(insert (propertize magit-this-error
|
||||
'font-lock-face 'font-lock-warning-face))
|
||||
(when-let ((key (car (where-is-internal 'magit-process-buffer))))
|
||||
(insert (format " [Type `%s' for details]" (key-description key))))
|
||||
(insert ?\n))
|
||||
(setq magit-this-error nil)))
|
||||
|
||||
(defun magit-insert-diff-filter-header ()
|
||||
"Insert a header line showing the effective diff filters."
|
||||
(let ((ignore-modules (magit-ignore-submodules-p)))
|
||||
(when (or ignore-modules
|
||||
magit-buffer-diff-files)
|
||||
(insert (propertize (format "%-10s" "Filter! ")
|
||||
'font-lock-face 'magit-section-heading))
|
||||
(when ignore-modules
|
||||
(insert ignore-modules)
|
||||
(when magit-buffer-diff-files
|
||||
(insert " -- ")))
|
||||
(when magit-buffer-diff-files
|
||||
(insert (mapconcat #'identity magit-buffer-diff-files " ")))
|
||||
(insert ?\n))))
|
||||
|
||||
;;;; Reference Headers
|
||||
|
||||
(defun magit-insert-head-branch-header (&optional branch)
|
||||
"Insert a header line about the current branch.
|
||||
If `HEAD' is detached, then insert information about that commit
|
||||
instead. The optional BRANCH argument is for internal use only."
|
||||
(let ((branch (or branch (magit-get-current-branch)))
|
||||
(output (magit-rev-format "%h %s" (or branch "HEAD"))))
|
||||
(string-match "^\\([^ ]+\\) \\(.*\\)" output)
|
||||
(magit-bind-match-strings (commit summary) output
|
||||
(when (equal summary "")
|
||||
(setq summary "(no commit message)"))
|
||||
(if branch
|
||||
(magit-insert-section (branch branch)
|
||||
(insert (format "%-10s" "Head: "))
|
||||
(when magit-status-show-hashes-in-headers
|
||||
(insert (propertize commit 'font-lock-face 'magit-hash) ?\s))
|
||||
(insert (propertize branch 'font-lock-face 'magit-branch-local))
|
||||
(insert ?\s)
|
||||
(insert (funcall magit-log-format-message-function branch summary))
|
||||
(insert ?\n))
|
||||
(magit-insert-section (commit commit)
|
||||
(insert (format "%-10s" "Head: "))
|
||||
(insert (propertize commit 'font-lock-face 'magit-hash))
|
||||
(insert ?\s)
|
||||
(insert (funcall magit-log-format-message-function nil summary))
|
||||
(insert ?\n))))))
|
||||
|
||||
(defun magit-insert-upstream-branch-header (&optional branch upstream keyword)
|
||||
"Insert a header line about the upstream of the current branch.
|
||||
If no branch is checked out, then insert nothing. The optional
|
||||
arguments are for internal use only."
|
||||
(when-let ((branch (or branch (magit-get-current-branch))))
|
||||
(let ((remote (magit-get "branch" branch "remote"))
|
||||
(merge (magit-get "branch" branch "merge"))
|
||||
(rebase (magit-get "branch" branch "rebase")))
|
||||
(when (or remote merge)
|
||||
(unless upstream
|
||||
(setq upstream (magit-get-upstream-branch branch)))
|
||||
(magit-insert-section (branch upstream)
|
||||
(pcase rebase
|
||||
("true")
|
||||
("false" (setq rebase nil))
|
||||
(_ (setq rebase (magit-get-boolean "pull.rebase"))))
|
||||
(insert (format "%-10s" (or keyword (if rebase "Rebase: " "Merge: "))))
|
||||
(insert
|
||||
(if upstream
|
||||
(concat (and magit-status-show-hashes-in-headers
|
||||
(concat (propertize (magit-rev-format "%h" upstream)
|
||||
'font-lock-face 'magit-hash)
|
||||
" "))
|
||||
upstream " "
|
||||
(funcall magit-log-format-message-function upstream
|
||||
(funcall magit-log-format-message-function nil
|
||||
(or (magit-rev-format "%s" upstream)
|
||||
"(no commit message)"))))
|
||||
(cond
|
||||
((magit--unnamed-upstream-p remote merge)
|
||||
(concat (propertize merge 'font-lock-face 'magit-branch-remote)
|
||||
" from "
|
||||
(propertize remote 'font-lock-face 'bold)))
|
||||
((magit--valid-upstream-p remote merge)
|
||||
(if (equal remote ".")
|
||||
(concat
|
||||
(propertize merge 'font-lock-face 'magit-branch-local)
|
||||
(propertize " does not exist"
|
||||
'font-lock-face 'font-lock-warning-face))
|
||||
(concat
|
||||
(propertize merge 'font-lock-face 'magit-branch-remote)
|
||||
(propertize " does not exist on "
|
||||
'font-lock-face 'font-lock-warning-face)
|
||||
(propertize remote 'font-lock-face 'magit-branch-remote))))
|
||||
(t
|
||||
(propertize "invalid upstream configuration"
|
||||
'font-lock-face 'font-lock-warning-face)))))
|
||||
(insert ?\n))))))
|
||||
|
||||
(defun magit-insert-push-branch-header ()
|
||||
"Insert a header line about the branch the current branch is pushed to."
|
||||
(when-let ((branch (magit-get-current-branch))
|
||||
(target (magit-get-push-branch branch)))
|
||||
(magit-insert-section (branch target)
|
||||
(insert (format "%-10s" "Push: "))
|
||||
(insert
|
||||
(if (magit-rev-verify target)
|
||||
(concat target " "
|
||||
(and magit-status-show-hashes-in-headers
|
||||
(concat (propertize (magit-rev-format "%h" target)
|
||||
'font-lock-face 'magit-hash)
|
||||
" "))
|
||||
(funcall magit-log-format-message-function target
|
||||
(funcall magit-log-format-message-function nil
|
||||
(or (magit-rev-format "%s" target)
|
||||
"(no commit message)"))))
|
||||
(let ((remote (magit-get-push-remote branch)))
|
||||
(if (magit-remote-p remote)
|
||||
(concat target
|
||||
(propertize " does not exist"
|
||||
'font-lock-face 'font-lock-warning-face))
|
||||
(concat remote
|
||||
(propertize " remote does not exist"
|
||||
'font-lock-face 'font-lock-warning-face))))))
|
||||
(insert ?\n))))
|
||||
|
||||
(defun magit-insert-tags-header ()
|
||||
"Insert a header line about the current and/or next tag."
|
||||
(let* ((this-tag (magit-get-current-tag nil t))
|
||||
(next-tag (magit-get-next-tag nil t))
|
||||
(this-cnt (cadr this-tag))
|
||||
(next-cnt (cadr next-tag))
|
||||
(this-tag (car this-tag))
|
||||
(next-tag (car next-tag))
|
||||
(both-tags (and this-tag next-tag t)))
|
||||
(when (or this-tag next-tag)
|
||||
(magit-insert-section (tag (or this-tag next-tag))
|
||||
(insert (format "%-10s" (if both-tags "Tags: " "Tag: ")))
|
||||
(cl-flet ((insert-count
|
||||
(tag count face)
|
||||
(insert (concat (propertize tag 'font-lock-face 'magit-tag)
|
||||
(and (> count 0)
|
||||
(format " (%s)"
|
||||
(propertize
|
||||
(format "%s" count)
|
||||
'font-lock-face face)))))))
|
||||
(when this-tag (insert-count this-tag this-cnt 'magit-branch-local))
|
||||
(when both-tags (insert ", "))
|
||||
(when next-tag (insert-count next-tag next-cnt 'magit-tag)))
|
||||
(insert ?\n)))))
|
||||
|
||||
;;;; Auxiliary Headers
|
||||
|
||||
(defun magit-insert-user-header ()
|
||||
"Insert a header line about the current user."
|
||||
(let ((name (magit-get "user.name"))
|
||||
(email (magit-get "user.email")))
|
||||
(when (and name email)
|
||||
(magit-insert-section (user name)
|
||||
(insert (format "%-10s" "User: "))
|
||||
(insert (propertize name 'font-lock-face 'magit-log-author))
|
||||
(insert " <" email ">\n")))))
|
||||
|
||||
(defun magit-insert-repo-header ()
|
||||
"Insert a header line showing the path to the repository top-level."
|
||||
(let ((topdir (magit-toplevel)))
|
||||
(magit-insert-section (repo topdir)
|
||||
(insert (format "%-10s%s\n" "Repo: " (abbreviate-file-name topdir))))))
|
||||
|
||||
(defun magit-insert-remote-header ()
|
||||
"Insert a header line about the remote of the current branch.
|
||||
|
||||
If no remote is configured for the current branch, then fall back
|
||||
showing the \"origin\" remote, or if that does not exist the first
|
||||
remote in alphabetic order."
|
||||
(when-let ((name (magit-get-some-remote))
|
||||
;; Under certain configurations it's possible for url
|
||||
;; to be nil, when name is not, see #2858.
|
||||
(url (magit-get "remote" name "url")))
|
||||
(magit-insert-section (remote name)
|
||||
(insert (format "%-10s" "Remote: "))
|
||||
(insert (propertize name 'font-lock-face 'magit-branch-remote) ?\s)
|
||||
(insert url ?\n))))
|
||||
|
||||
;;;; File Sections
|
||||
|
||||
(defvar magit-untracked-section-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map [remap magit-delete-thing] 'magit-discard)
|
||||
(define-key map "s" 'magit-stage)
|
||||
map)
|
||||
"Keymap for the `untracked' section.")
|
||||
|
||||
(magit-define-section-jumper magit-jump-to-untracked "Untracked files" untracked)
|
||||
|
||||
(defun magit-insert-untracked-files ()
|
||||
"Maybe insert a list or tree of untracked files.
|
||||
|
||||
Do so depending on the value of `status.showUntrackedFiles'.
|
||||
Note that even if the value is `all', Magit still initially
|
||||
only shows directories. But the directory sections can then
|
||||
be expanded using \"TAB\".
|
||||
|
||||
If the first element of `magit-buffer-diff-files' is a
|
||||
directory, then limit the list to files below that. The value
|
||||
value of that variable can be set using \"D -- DIRECTORY RET g\"."
|
||||
(let* ((show (or (magit-get "status.showUntrackedFiles") "normal"))
|
||||
(base (car magit-buffer-diff-files))
|
||||
(base (and base (file-directory-p base) base)))
|
||||
(unless (equal show "no")
|
||||
(if (equal show "all")
|
||||
(when-let ((files (magit-untracked-files nil base)))
|
||||
(magit-insert-section (untracked)
|
||||
(magit-insert-heading "Untracked files:")
|
||||
(magit-insert-files files base)
|
||||
(insert ?\n)))
|
||||
(when-let ((files
|
||||
(--mapcat (and (eq (aref it 0) ??)
|
||||
(list (substring it 3)))
|
||||
(magit-git-items "status" "-z" "--porcelain"
|
||||
(magit-ignore-submodules-p t)
|
||||
"--" base))))
|
||||
(magit-insert-section (untracked)
|
||||
(magit-insert-heading "Untracked files:")
|
||||
(dolist (file files)
|
||||
(magit-insert-section (file file)
|
||||
(insert (propertize file 'font-lock-face 'magit-filename) ?\n)))
|
||||
(insert ?\n)))))))
|
||||
|
||||
(magit-define-section-jumper magit-jump-to-tracked "Tracked files" tracked)
|
||||
|
||||
(defun magit-insert-tracked-files ()
|
||||
"Insert a tree of tracked files.
|
||||
|
||||
If the first element of `magit-buffer-diff-files' is a
|
||||
directory, then limit the list to files below that. The value
|
||||
value of that variable can be set using \"D -- DIRECTORY RET g\"."
|
||||
(when-let ((files (magit-list-files)))
|
||||
(let* ((base (car magit-buffer-diff-files))
|
||||
(base (and base (file-directory-p base) base)))
|
||||
(magit-insert-section (tracked nil t)
|
||||
(magit-insert-heading "Tracked files:")
|
||||
(magit-insert-files files base)
|
||||
(insert ?\n)))))
|
||||
|
||||
(defun magit-insert-ignored-files ()
|
||||
"Insert a tree of ignored files.
|
||||
|
||||
If the first element of `magit-buffer-diff-files' is a
|
||||
directory, then limit the list to files below that. The value
|
||||
of that variable can be set using \"D -- DIRECTORY RET g\"."
|
||||
(when-let ((files (magit-ignored-files)))
|
||||
(let* ((base (car magit-buffer-diff-files))
|
||||
(base (and base (file-directory-p base) base)))
|
||||
(magit-insert-section (tracked nil t)
|
||||
(magit-insert-heading "Ignored files:")
|
||||
(magit-insert-files files base)
|
||||
(insert ?\n)))))
|
||||
|
||||
(magit-define-section-jumper magit-jump-to-skip-worktree "Skip-worktree files" skip-worktree)
|
||||
|
||||
(defun magit-insert-skip-worktree-files ()
|
||||
"Insert a tree of skip-worktree files.
|
||||
|
||||
If the first element of `magit-buffer-diff-files' is a
|
||||
directory, then limit the list to files below that. The value
|
||||
of that variable can be set using \"D -- DIRECTORY RET g\"."
|
||||
(when-let ((files (magit-skip-worktree-files)))
|
||||
(let* ((base (car magit-buffer-diff-files))
|
||||
(base (and base (file-directory-p base) base)))
|
||||
(magit-insert-section (skip-worktree nil t)
|
||||
(magit-insert-heading "Skip-worktree files:")
|
||||
(magit-insert-files files base)
|
||||
(insert ?\n)))))
|
||||
|
||||
(magit-define-section-jumper magit-jump-to-assume-unchanged "Assume-unchanged files" assume-unchanged)
|
||||
|
||||
(defun magit-insert-assume-unchanged-files ()
|
||||
"Insert a tree of files that are assumed to be unchanged.
|
||||
|
||||
If the first element of `magit-buffer-diff-files' is a
|
||||
directory, then limit the list to files below that. The value
|
||||
of that variable can be set using \"D -- DIRECTORY RET g\"."
|
||||
(when-let ((files (magit-assume-unchanged-files)))
|
||||
(let* ((base (car magit-buffer-diff-files))
|
||||
(base (and base (file-directory-p base) base)))
|
||||
(magit-insert-section (assume-unchanged nil t)
|
||||
(magit-insert-heading "Assume-unchanged files:")
|
||||
(magit-insert-files files base)
|
||||
(insert ?\n)))))
|
||||
|
||||
(defun magit-insert-files (files directory)
|
||||
(while (and files (string-prefix-p (or directory "") (car files)))
|
||||
(let ((dir (file-name-directory (car files))))
|
||||
(if (equal dir directory)
|
||||
(let ((file (pop files)))
|
||||
(magit-insert-section (file file)
|
||||
(insert (propertize file 'font-lock-face 'magit-filename) ?\n)))
|
||||
(magit-insert-section (file dir t)
|
||||
(insert (propertize dir 'file 'magit-filename) ?\n)
|
||||
(magit-insert-heading)
|
||||
(setq files (magit-insert-files files dir))))))
|
||||
files)
|
||||
|
||||
;;; _
|
||||
(provide 'magit-status)
|
||||
;;; magit-status.el ends here
|
BIN
elpa/magit-20210414.1306/magit-status.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-status.elc
Normal file
Binary file not shown.
662
elpa/magit-20210414.1306/magit-submodule.el
Normal file
662
elpa/magit-20210414.1306/magit-submodule.el
Normal file
|
@ -0,0 +1,662 @@
|
|||
;;; magit-submodule.el --- submodule support for Magit -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2011-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
|
||||
;; Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
;; Magit is free software; you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
;;
|
||||
;; Magit is distributed in the hope that it will be useful, but WITHOUT
|
||||
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
;; License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Magit. If not, see http://www.gnu.org/licenses.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'magit)
|
||||
|
||||
(defvar x-stretch-cursor)
|
||||
|
||||
;;; Options
|
||||
|
||||
(defcustom magit-module-sections-hook
|
||||
'(magit-insert-modules-overview
|
||||
magit-insert-modules-unpulled-from-upstream
|
||||
magit-insert-modules-unpulled-from-pushremote
|
||||
magit-insert-modules-unpushed-to-upstream
|
||||
magit-insert-modules-unpushed-to-pushremote)
|
||||
"Hook run by `magit-insert-modules'.
|
||||
|
||||
That function isn't part of `magit-status-sections-hook's default
|
||||
value, so you have to add it yourself for this hook to have any
|
||||
effect."
|
||||
:package-version '(magit . "2.11.0")
|
||||
:group 'magit-status
|
||||
:type 'hook)
|
||||
|
||||
(defcustom magit-module-sections-nested t
|
||||
"Whether `magit-insert-modules' wraps inserted sections.
|
||||
|
||||
If this is non-nil, then only a single top-level section
|
||||
is inserted. If it is nil, then all sections listed in
|
||||
`magit-module-sections-hook' become top-level sections."
|
||||
:package-version '(magit . "2.11.0")
|
||||
:group 'magit-status
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom magit-submodule-list-mode-hook '(hl-line-mode)
|
||||
"Hook run after entering Magit-Submodule-List mode."
|
||||
:package-version '(magit . "2.9.0")
|
||||
:group 'magit-repolist
|
||||
:type 'hook
|
||||
:get 'magit-hook-custom-get
|
||||
:options '(hl-line-mode))
|
||||
|
||||
(defcustom magit-submodule-list-columns
|
||||
'(("Path" 25 magit-modulelist-column-path nil)
|
||||
("Version" 25 magit-repolist-column-version nil)
|
||||
("Branch" 20 magit-repolist-column-branch nil)
|
||||
("B<U" 3 magit-repolist-column-unpulled-from-upstream ((:right-align t)))
|
||||
("B>U" 3 magit-repolist-column-unpushed-to-upstream ((:right-align t)))
|
||||
("B<P" 3 magit-repolist-column-unpulled-from-pushremote ((:right-align t)))
|
||||
("B>P" 3 magit-repolist-column-unpushed-to-pushremote ((:right-align t)))
|
||||
("B" 3 magit-repolist-column-branches ((:right-align t)))
|
||||
("S" 3 magit-repolist-column-stashes ((:right-align t))))
|
||||
"List of columns displayed by `magit-list-submodules'.
|
||||
|
||||
Each element has the form (HEADER WIDTH FORMAT PROPS).
|
||||
|
||||
HEADER is the string displayed in the header. WIDTH is the width
|
||||
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'."
|
||||
:package-version '(magit . "2.8.0")
|
||||
:group 'magit-repolist-mode
|
||||
:type `(repeat (list :tag "Column"
|
||||
(string :tag "Header Label")
|
||||
(integer :tag "Column Width")
|
||||
(function :tag "Inserter Function")
|
||||
(repeat :tag "Properties"
|
||||
(list (choice :tag "Property"
|
||||
(const :right-align)
|
||||
(const :pad-right)
|
||||
(symbol))
|
||||
(sexp :tag "Value"))))))
|
||||
|
||||
(defcustom magit-submodule-remove-trash-gitdirs nil
|
||||
"Whether `magit-submodule-remove' offers to trash module gitdirs.
|
||||
|
||||
If this is nil, then that command does not offer to do so unless
|
||||
a prefix argument is used. When this is t, then it does offer to
|
||||
do so even without a prefix argument.
|
||||
|
||||
In both cases the action still has to be confirmed unless that is
|
||||
disabled using the option `magit-no-confirm'. Doing the latter
|
||||
and also setting this variable to t will lead to tears."
|
||||
:package-version '(magit . "2.90.0")
|
||||
:group 'magit-commands
|
||||
:type 'boolean)
|
||||
|
||||
;;; Popup
|
||||
|
||||
;;;###autoload (autoload 'magit-submodule "magit-submodule" nil t)
|
||||
(transient-define-prefix magit-submodule ()
|
||||
"Act on a submodule."
|
||||
:man-page "git-submodule"
|
||||
["Arguments"
|
||||
("-f" "Force" ("-f" "--force"))
|
||||
("-r" "Recursive" "--recursive")
|
||||
("-N" "Do not fetch" ("-N" "--no-fetch"))
|
||||
("-C" "Checkout tip" "--checkout")
|
||||
("-R" "Rebase onto tip" "--rebase")
|
||||
("-M" "Merge tip" "--merge")
|
||||
("-U" "Use upstream tip" "--remote")]
|
||||
["One module actions"
|
||||
("a" magit-submodule-add)
|
||||
("r" magit-submodule-register)
|
||||
("p" magit-submodule-populate)
|
||||
("u" magit-submodule-update)
|
||||
("s" magit-submodule-synchronize)
|
||||
("d" magit-submodule-unpopulate)
|
||||
("k" "Remove" magit-submodule-remove)]
|
||||
["All modules actions"
|
||||
("l" "List all modules" magit-list-submodules)
|
||||
("f" "Fetch all modules" magit-fetch-modules)])
|
||||
|
||||
(defun magit-submodule-arguments (&rest filters)
|
||||
(--filter (and (member it filters) it)
|
||||
(transient-args 'magit-submodule)))
|
||||
|
||||
(defclass magit--git-submodule-suffix (transient-suffix)
|
||||
())
|
||||
|
||||
(cl-defmethod transient-format-description ((obj magit--git-submodule-suffix))
|
||||
(let ((value (delq nil (mapcar 'transient-infix-value transient--suffixes))))
|
||||
(replace-regexp-in-string
|
||||
"\\[--[^]]+\\]"
|
||||
(lambda (match)
|
||||
(format (propertize "[%s]" 'face 'transient-inactive-argument)
|
||||
(mapconcat (lambda (arg)
|
||||
(propertize arg 'face
|
||||
(if (member arg value)
|
||||
'transient-argument
|
||||
'transient-inactive-argument)))
|
||||
(save-match-data
|
||||
(split-string (substring match 1 -1) "|"))
|
||||
(propertize "|" 'face 'transient-inactive-argument))))
|
||||
(cl-call-next-method obj))))
|
||||
|
||||
;;;###autoload (autoload 'magit-submodule-add "magit-submodule" nil t)
|
||||
(transient-define-suffix magit-submodule-add (url &optional path name args)
|
||||
"Add the repository at URL as a module.
|
||||
|
||||
Optional PATH is the path to the module relative to the root of
|
||||
the superproject. If it is nil, then the path is determined
|
||||
based on the URL. Optional NAME is the name of the module. If
|
||||
it is nil, then PATH also becomes the name."
|
||||
:class 'magit--git-submodule-suffix
|
||||
:description "Add git submodule add [--force]"
|
||||
(interactive
|
||||
(magit-with-toplevel
|
||||
(let* ((url (magit-read-string-ns "Add submodule (remote url)"))
|
||||
(path (let ((read-file-name-function
|
||||
(if (or (eq read-file-name-function 'ido-read-file-name)
|
||||
(advice-function-member-p
|
||||
'ido-read-file-name
|
||||
read-file-name-function))
|
||||
;; The Ido variant doesn't work properly here.
|
||||
#'read-file-name-default
|
||||
read-file-name-function)))
|
||||
(directory-file-name
|
||||
(file-relative-name
|
||||
(read-directory-name
|
||||
"Add submodules at path: " nil nil nil
|
||||
(and (string-match "\\([^./]+\\)\\(\\.git\\)?$" url)
|
||||
(match-string 1 url))))))))
|
||||
(list url
|
||||
(directory-file-name path)
|
||||
(magit-submodule-read-name-for-path path)
|
||||
(magit-submodule-arguments "--force")))))
|
||||
(magit-submodule-add-1 url path name args))
|
||||
|
||||
(defun magit-submodule-add-1 (url &optional path name args)
|
||||
(magit-with-toplevel
|
||||
(magit-submodule--maybe-reuse-gitdir name path)
|
||||
(magit-run-git-async "submodule" "add"
|
||||
(and name (list "--name" name))
|
||||
args "--" url path)
|
||||
(set-process-sentinel
|
||||
magit-this-process
|
||||
(lambda (process event)
|
||||
(when (memq (process-status process) '(exit signal))
|
||||
(if (> (process-exit-status process) 0)
|
||||
(magit-process-sentinel process event)
|
||||
(process-put process 'inhibit-refresh t)
|
||||
(magit-process-sentinel process event)
|
||||
(unless (version< (magit-git-version) "2.12.0")
|
||||
(magit-call-git "submodule" "absorbgitdirs" path))
|
||||
(magit-refresh)))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-submodule-read-name-for-path (path &optional prefer-short)
|
||||
(let* ((path (directory-file-name (file-relative-name path)))
|
||||
(name (file-name-nondirectory path)))
|
||||
(push (if prefer-short path name) minibuffer-history)
|
||||
(magit-read-string-ns
|
||||
"Submodule name" nil (cons 'minibuffer-history 2)
|
||||
(or (--keep (pcase-let ((`(,var ,val) (split-string it "=")))
|
||||
(and (equal val path)
|
||||
(cadr (split-string var "\\."))))
|
||||
(magit-git-lines "config" "--list" "-f" ".gitmodules"))
|
||||
(if prefer-short name path)))))
|
||||
|
||||
;;;###autoload (autoload 'magit-submodule-register "magit-submodule" nil t)
|
||||
(transient-define-suffix magit-submodule-register (modules)
|
||||
"Register MODULES.
|
||||
|
||||
With a prefix argument act on all suitable modules. Otherwise,
|
||||
if the region selects modules, then act on those. Otherwise, if
|
||||
there is a module at point, then act on that. Otherwise read a
|
||||
single module from the user."
|
||||
;; This command and the underlying "git submodule init" do NOT
|
||||
;; "initialize" modules. They merely "register" modules in the
|
||||
;; super-projects $GIT_DIR/config file, the purpose of which is to
|
||||
;; allow users to change such values before actually initializing
|
||||
;; the modules.
|
||||
:description "Register git submodule init"
|
||||
(interactive
|
||||
(list (magit-module-confirm "Register" 'magit-module-no-worktree-p)))
|
||||
(magit-with-toplevel
|
||||
(magit-run-git-async "submodule" "init" "--" modules)))
|
||||
|
||||
;;;###autoload (autoload 'magit-submodule-populate "magit-submodule" nil t)
|
||||
(transient-define-suffix magit-submodule-populate (modules)
|
||||
"Create MODULES working directories, checking out the recorded commits.
|
||||
|
||||
With a prefix argument act on all suitable modules. Otherwise,
|
||||
if the region selects modules, then act on those. Otherwise, if
|
||||
there is a module at point, then act on that. Otherwise read a
|
||||
single module from the user."
|
||||
;; This is the command that actually "initializes" modules.
|
||||
;; A module is initialized when it has a working directory,
|
||||
;; a gitlink, and a .gitmodules entry.
|
||||
:description "Populate git submodule update --init"
|
||||
(interactive
|
||||
(list (magit-module-confirm "Populate" 'magit-module-no-worktree-p)))
|
||||
(magit-with-toplevel
|
||||
(magit-run-git-async "submodule" "update" "--init" "--" modules)))
|
||||
|
||||
;;;###autoload (autoload 'magit-submodule-update "magit-submodule" nil t)
|
||||
(transient-define-suffix magit-submodule-update (modules args)
|
||||
"Update MODULES by checking out the recorded commits.
|
||||
|
||||
With a prefix argument act on all suitable modules. Otherwise,
|
||||
if the region selects modules, then act on those. Otherwise, if
|
||||
there is a module at point, then act on that. Otherwise read a
|
||||
single module from the user."
|
||||
;; Unlike `git-submodule's `update' command ours can only update
|
||||
;; "initialized" modules by checking out other commits but not
|
||||
;; "initialize" modules by creating the working directories.
|
||||
;; To do the latter we provide the "setup" command.
|
||||
:class 'magit--git-submodule-suffix
|
||||
:description "Update git submodule update [--force] [--no-fetch]
|
||||
[--remote] [--recursive] [--checkout|--rebase|--merge]"
|
||||
(interactive
|
||||
(list (magit-module-confirm "Update" 'magit-module-worktree-p)
|
||||
(magit-submodule-arguments
|
||||
"--force" "--remote" "--recursive" "--checkout" "--rebase" "--merge"
|
||||
"--no-fetch")))
|
||||
(magit-with-toplevel
|
||||
(magit-run-git-async "submodule" "update" args "--" modules)))
|
||||
|
||||
;;;###autoload (autoload 'magit-submodule-synchronize "magit-submodule" nil t)
|
||||
(transient-define-suffix magit-submodule-synchronize (modules args)
|
||||
"Synchronize url configuration of MODULES.
|
||||
|
||||
With a prefix argument act on all suitable modules. Otherwise,
|
||||
if the region selects modules, then act on those. Otherwise, if
|
||||
there is a module at point, then act on that. Otherwise read a
|
||||
single module from the user."
|
||||
:class 'magit--git-submodule-suffix
|
||||
:description "Synchronize git submodule sync [--recursive]"
|
||||
(interactive
|
||||
(list (magit-module-confirm "Synchronize" 'magit-module-worktree-p)
|
||||
(magit-submodule-arguments "--recursive")))
|
||||
(magit-with-toplevel
|
||||
(magit-run-git-async "submodule" "sync" args "--" modules)))
|
||||
|
||||
;;;###autoload (autoload 'magit-submodule-unpopulate "magit-submodule" nil t)
|
||||
(transient-define-suffix magit-submodule-unpopulate (modules args)
|
||||
"Remove working directories of MODULES.
|
||||
|
||||
With a prefix argument act on all suitable modules. Otherwise,
|
||||
if the region selects modules, then act on those. Otherwise, if
|
||||
there is a module at point, then act on that. Otherwise read a
|
||||
single module from the user."
|
||||
;; Even though a package is "uninitialized" (it has no worktree)
|
||||
;; the super-projects $GIT_DIR/config may never-the-less set the
|
||||
;; module's url. This may happen if you `deinit' and then `init'
|
||||
;; to register (NOT initialize). Because the purpose of `deinit'
|
||||
;; is to remove the working directory AND to remove the url, this
|
||||
;; command does not limit itself to modules that have no working
|
||||
;; directory.
|
||||
:class 'magit--git-submodule-suffix
|
||||
:description "Unpopulate git submodule deinit [--force]"
|
||||
(interactive
|
||||
(list (magit-module-confirm "Unpopulate")
|
||||
(magit-submodule-arguments "--force")))
|
||||
(magit-with-toplevel
|
||||
(magit-run-git-async "submodule" "deinit" args "--" modules)))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-submodule-remove (modules args trash-gitdirs)
|
||||
"Unregister MODULES and remove their working directories.
|
||||
|
||||
For safety reasons, do not remove the gitdirs and if a module has
|
||||
uncommitted changes, then do not remove it at all. If a module's
|
||||
gitdir is located inside the working directory, then move it into
|
||||
the gitdir of the superproject first.
|
||||
|
||||
With the \"--force\" argument offer to remove dirty working
|
||||
directories and with a prefix argument offer to delete gitdirs.
|
||||
Both actions are very dangerous and have to be confirmed. There
|
||||
are additional safety precautions in place, so you might be able
|
||||
to recover from making a mistake here, but don't count on it."
|
||||
(interactive
|
||||
(list (if-let ((modules (magit-region-values 'magit-module-section t)))
|
||||
(magit-confirm 'remove-modules nil "Remove %i modules" nil modules)
|
||||
(list (magit-read-module-path "Remove module")))
|
||||
(magit-submodule-arguments "--force")
|
||||
current-prefix-arg))
|
||||
(when (version< (magit-git-version) "2.12.0")
|
||||
(error "This command requires Git v2.12.0"))
|
||||
(when magit-submodule-remove-trash-gitdirs
|
||||
(setq trash-gitdirs t))
|
||||
(magit-with-toplevel
|
||||
(when-let
|
||||
((modified
|
||||
(-filter (lambda (module)
|
||||
(let ((default-directory (file-name-as-directory
|
||||
(expand-file-name module))))
|
||||
(and (cddr (directory-files default-directory))
|
||||
(magit-anything-modified-p))))
|
||||
modules)))
|
||||
(if (member "--force" args)
|
||||
(if (magit-confirm 'remove-dirty-modules
|
||||
"Remove dirty module %s"
|
||||
"Remove %i dirty modules"
|
||||
t modified)
|
||||
(dolist (module modified)
|
||||
(let ((default-directory (file-name-as-directory
|
||||
(expand-file-name module))))
|
||||
(magit-git "stash" "push"
|
||||
"-m" "backup before removal of this module")))
|
||||
(setq modules (cl-set-difference modules modified)))
|
||||
(if (cdr modified)
|
||||
(message "Omitting %s modules with uncommitted changes: %s"
|
||||
(length modified)
|
||||
(mapconcat #'identity modified ", "))
|
||||
(message "Omitting module %s, it has uncommitted changes"
|
||||
(car modified)))
|
||||
(setq modules (cl-set-difference modules modified))))
|
||||
(when modules
|
||||
(let ((alist
|
||||
(and trash-gitdirs
|
||||
(--map (split-string it "\0")
|
||||
(magit-git-lines "submodule" "foreach" "-q"
|
||||
"printf \"$sm_path\\0$name\n\"")))))
|
||||
(magit-git "submodule" "absorbgitdirs" "--" modules)
|
||||
(magit-git "submodule" "deinit" args "--" modules)
|
||||
(magit-git "rm" args "--" modules)
|
||||
(when (and trash-gitdirs
|
||||
(magit-confirm 'trash-module-gitdirs
|
||||
"Trash gitdir of module %s"
|
||||
"Trash gitdirs of %i modules"
|
||||
t modules))
|
||||
(dolist (module modules)
|
||||
(if-let ((name (cadr (assoc module alist))))
|
||||
;; Disregard if `magit-delete-by-moving-to-trash'
|
||||
;; is nil. Not doing so would be too dangerous.
|
||||
(delete-directory (magit-git-dir
|
||||
(convert-standard-filename
|
||||
(concat "modules/" name)))
|
||||
t t)
|
||||
(error "BUG: Weird module name and/or path for %s" module)))))
|
||||
(magit-refresh))))
|
||||
|
||||
;;; Sections
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-insert-modules ()
|
||||
"Insert submodule sections.
|
||||
Hook `magit-module-sections-hook' controls which module sections
|
||||
are inserted, and option `magit-module-sections-nested' controls
|
||||
whether they are wrapped in an additional section."
|
||||
(when-let ((modules (magit-list-module-paths)))
|
||||
(if magit-module-sections-nested
|
||||
(magit-insert-section (modules nil t)
|
||||
(magit-insert-heading
|
||||
(format "%s (%s)"
|
||||
(propertize "Modules"
|
||||
'font-lock-face 'magit-section-heading)
|
||||
(length modules)))
|
||||
(magit-insert-section-body
|
||||
(magit--insert-modules)))
|
||||
(magit--insert-modules))))
|
||||
|
||||
(defun magit--insert-modules (&optional _section)
|
||||
(magit-run-section-hook 'magit-module-sections-hook))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-insert-modules-overview ()
|
||||
"Insert sections for all modules.
|
||||
For each section insert the path and the output of `git describe --tags',
|
||||
or, failing that, the abbreviated HEAD commit hash."
|
||||
(when-let ((modules (magit-list-module-paths)))
|
||||
(magit-insert-section (modules nil t)
|
||||
(magit-insert-heading
|
||||
(format "%s (%s)"
|
||||
(propertize "Modules overview"
|
||||
'font-lock-face 'magit-section-heading)
|
||||
(length modules)))
|
||||
(magit-insert-section-body
|
||||
(magit--insert-modules-overview)))))
|
||||
|
||||
(defvar magit-modules-overview-align-numbers t)
|
||||
|
||||
(defun magit--insert-modules-overview (&optional _section)
|
||||
(magit-with-toplevel
|
||||
(let* ((modules (magit-list-module-paths))
|
||||
(path-format (format "%%-%is "
|
||||
(min (apply 'max (mapcar 'length modules))
|
||||
(/ (window-width) 2))))
|
||||
(branch-format (format "%%-%is " (min 25 (/ (window-width) 3)))))
|
||||
(dolist (module modules)
|
||||
(let ((default-directory
|
||||
(expand-file-name (file-name-as-directory module))))
|
||||
(magit-insert-section (magit-module-section module t)
|
||||
(insert (propertize (format path-format module)
|
||||
'font-lock-face 'magit-diff-file-heading))
|
||||
(if (not (file-exists-p ".git"))
|
||||
(insert "(unpopulated)")
|
||||
(insert (format
|
||||
branch-format
|
||||
(--if-let (magit-get-current-branch)
|
||||
(propertize it 'font-lock-face 'magit-branch-local)
|
||||
(propertize "(detached)" 'font-lock-face 'warning))))
|
||||
(--if-let (magit-git-string "describe" "--tags")
|
||||
(progn (when (and magit-modules-overview-align-numbers
|
||||
(string-match-p "\\`[0-9]" it))
|
||||
(insert ?\s))
|
||||
(insert (propertize it 'font-lock-face 'magit-tag)))
|
||||
(--when-let (magit-rev-format "%h")
|
||||
(insert (propertize it 'font-lock-face 'magit-hash)))))
|
||||
(insert ?\n))))))
|
||||
(insert ?\n))
|
||||
|
||||
(defvar magit-modules-section-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map [remap magit-visit-thing] 'magit-list-submodules)
|
||||
map)
|
||||
"Keymap for `modules' sections.")
|
||||
|
||||
(defvar magit-module-section-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(set-keymap-parent map magit-file-section-map)
|
||||
(define-key map (kbd "C-j") 'magit-submodule-visit)
|
||||
(define-key map [C-return] 'magit-submodule-visit)
|
||||
(define-key map [remap magit-visit-thing] 'magit-submodule-visit)
|
||||
(define-key map [remap magit-delete-thing] 'magit-submodule-unpopulate)
|
||||
(define-key map "K" 'magit-file-untrack)
|
||||
(define-key map "R" 'magit-file-rename)
|
||||
map)
|
||||
"Keymap for `module' sections.")
|
||||
|
||||
(defun magit-submodule-visit (module &optional other-window)
|
||||
"Visit MODULE by calling `magit-status' on it.
|
||||
Offer to initialize MODULE if it's not checked out yet.
|
||||
With a prefix argument, visit in another window."
|
||||
(interactive (list (or (magit-section-value-if 'module)
|
||||
(magit-read-module-path "Visit module"))
|
||||
current-prefix-arg))
|
||||
(magit-with-toplevel
|
||||
(let ((path (expand-file-name module)))
|
||||
(cond
|
||||
((file-exists-p (expand-file-name ".git" module))
|
||||
(magit-diff-visit-directory path other-window))
|
||||
((y-or-n-p (format "Initialize submodule '%s' first?" module))
|
||||
(magit-run-git-async "submodule" "update" "--init" "--" module)
|
||||
(set-process-sentinel
|
||||
magit-this-process
|
||||
(lambda (process event)
|
||||
(let ((magit-process-raise-error t))
|
||||
(magit-process-sentinel process event))
|
||||
(when (and (eq (process-status process) 'exit)
|
||||
(= (process-exit-status process) 0))
|
||||
(magit-diff-visit-directory path other-window)))))
|
||||
((file-exists-p path)
|
||||
(dired-jump other-window (concat path "/.")))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-insert-modules-unpulled-from-upstream ()
|
||||
"Insert sections for modules that haven't been pulled from the upstream.
|
||||
These sections can be expanded to show the respective commits."
|
||||
(magit--insert-modules-logs "Modules unpulled from @{upstream}"
|
||||
'modules-unpulled-from-upstream
|
||||
"HEAD..@{upstream}"))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-insert-modules-unpulled-from-pushremote ()
|
||||
"Insert sections for modules that haven't been pulled from the push-remote.
|
||||
These sections can be expanded to show the respective commits."
|
||||
(magit--insert-modules-logs "Modules unpulled from @{push}"
|
||||
'modules-unpulled-from-pushremote
|
||||
"HEAD..@{push}"))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-insert-modules-unpushed-to-upstream ()
|
||||
"Insert sections for modules that haven't been pushed to the upstream.
|
||||
These sections can be expanded to show the respective commits."
|
||||
(magit--insert-modules-logs "Modules unmerged into @{upstream}"
|
||||
'modules-unpushed-to-upstream
|
||||
"@{upstream}..HEAD"))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-insert-modules-unpushed-to-pushremote ()
|
||||
"Insert sections for modules that haven't been pushed to the push-remote.
|
||||
These sections can be expanded to show the respective commits."
|
||||
(magit--insert-modules-logs "Modules unpushed to @{push}"
|
||||
'modules-unpushed-to-pushremote
|
||||
"@{push}..HEAD"))
|
||||
|
||||
(defun magit--insert-modules-logs (heading type range)
|
||||
"For internal use, don't add to a hook."
|
||||
(unless (magit-ignore-submodules-p)
|
||||
(when-let ((modules (magit-list-module-paths)))
|
||||
(magit-insert-section section ((eval type) nil t)
|
||||
(string-match "\\`\\(.+\\) \\([^ ]+\\)\\'" heading)
|
||||
(magit-insert-heading
|
||||
(propertize (match-string 1 heading)
|
||||
'font-lock-face 'magit-section-heading)
|
||||
" "
|
||||
(propertize (match-string 2 heading)
|
||||
'font-lock-face 'magit-branch-remote)
|
||||
":")
|
||||
(magit-with-toplevel
|
||||
(dolist (module modules)
|
||||
(when (magit-module-worktree-p module)
|
||||
(let ((default-directory
|
||||
(expand-file-name (file-name-as-directory module))))
|
||||
(when (magit-file-accessible-directory-p default-directory)
|
||||
(magit-insert-section sec (magit-module-section module t)
|
||||
(magit-insert-heading
|
||||
(propertize module
|
||||
'font-lock-face 'magit-diff-file-heading)
|
||||
":")
|
||||
(magit-git-wash
|
||||
(apply-partially 'magit-log-wash-log 'module)
|
||||
"-c" "push.default=current" "log" "--oneline" range)
|
||||
(when (> (point)
|
||||
(oref sec content))
|
||||
(delete-char -1))))))))
|
||||
(if (> (point)
|
||||
(oref section content))
|
||||
(insert ?\n)
|
||||
(magit-cancel-section))))))
|
||||
|
||||
;;; List
|
||||
|
||||
;;;###autoload
|
||||
(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))
|
||||
|
||||
(defvar magit-submodule-list-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(set-keymap-parent map magit-repolist-mode-map)
|
||||
map)
|
||||
"Local keymap for Magit-Submodule-List mode buffers.")
|
||||
|
||||
(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)
|
||||
(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-refresh ()
|
||||
(setq tabulated-list-entries
|
||||
(-keep (lambda (module)
|
||||
(let ((default-directory
|
||||
(expand-file-name (file-name-as-directory module))))
|
||||
(and (file-exists-p ".git")
|
||||
(list module
|
||||
(vconcat
|
||||
(--map (or (funcall (nth 2 it) module) "")
|
||||
magit-submodule-list-columns))))))
|
||||
(magit-list-module-paths))))
|
||||
|
||||
(defun magit-modulelist-column-path (path)
|
||||
"Insert the relative path of the submodule."
|
||||
path)
|
||||
|
||||
;;; Utilities
|
||||
|
||||
(defun magit-submodule--maybe-reuse-gitdir (name path)
|
||||
(let ((gitdir
|
||||
(magit-git-dir (convert-standard-filename (concat "modules/" name)))))
|
||||
(when (and (file-exists-p gitdir)
|
||||
(not (file-exists-p path)))
|
||||
(pcase (read-char-choice
|
||||
(concat
|
||||
gitdir " already exists.\n"
|
||||
"Type [u] to use the existing gitdir and create the working tree\n"
|
||||
" [r] to rename the existing gitdir and clone again\n"
|
||||
" [t] to trash the existing gitdir and clone again\n"
|
||||
" [C-g] to abort ")
|
||||
'(?u ?r ?t))
|
||||
(?u (magit-submodule--restore-worktree (expand-file-name path) gitdir))
|
||||
(?r (rename-file gitdir (concat gitdir "-"
|
||||
(format-time-string "%F-%T"))))
|
||||
(?t (delete-directory gitdir t t))))))
|
||||
|
||||
(defun magit-submodule--restore-worktree (worktree gitdir)
|
||||
(make-directory worktree t)
|
||||
(with-temp-file (expand-file-name ".git" worktree)
|
||||
(insert "gitdir: " (file-relative-name gitdir worktree) "\n"))
|
||||
(let ((default-directory worktree))
|
||||
(magit-call-git "reset" "--hard" "HEAD" "--")))
|
||||
|
||||
;;; _
|
||||
(provide 'magit-submodule)
|
||||
;;; magit-submodule.el ends here
|
BIN
elpa/magit-20210414.1306/magit-submodule.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-submodule.elc
Normal file
Binary file not shown.
182
elpa/magit-20210414.1306/magit-subtree.el
Normal file
182
elpa/magit-20210414.1306/magit-subtree.el
Normal file
|
@ -0,0 +1,182 @@
|
|||
;;; magit-subtree.el --- subtree support for Magit -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2011-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
|
||||
;; Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
;; Magit is free software; you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
;;
|
||||
;; Magit is distributed in the hope that it will be useful, but WITHOUT
|
||||
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
;; License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Magit. If not, see http://www.gnu.org/licenses.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'magit)
|
||||
|
||||
;;; Commands
|
||||
|
||||
;;;###autoload (autoload 'magit-subtree "magit-subtree" nil t)
|
||||
(transient-define-prefix magit-subtree ()
|
||||
"Import or export subtrees."
|
||||
:man-page "git-subtree"
|
||||
["Actions"
|
||||
("i" "Import" magit-subtree-import)
|
||||
("e" "Export" magit-subtree-export)])
|
||||
|
||||
;;;###autoload (autoload 'magit-subtree-import "magit-subtree" nil t)
|
||||
(transient-define-prefix magit-subtree-import ()
|
||||
"Import subtrees."
|
||||
:man-page "git-subtree"
|
||||
["Arguments"
|
||||
(magit-subtree:--prefix)
|
||||
(magit-subtree:--message)
|
||||
("-s" "Squash" "--squash")]
|
||||
["Actions"
|
||||
[("a" "Add" magit-subtree-add)
|
||||
("c" "Add commit" magit-subtree-add-commit)]
|
||||
[("m" "Merge" magit-subtree-merge)
|
||||
("f" "Pull" magit-subtree-pull)]])
|
||||
|
||||
;;;###autoload (autoload 'magit-subtree-export "magit-subtree" nil t)
|
||||
(transient-define-prefix magit-subtree-export ()
|
||||
"Export subtrees."
|
||||
:man-page "git-subtree"
|
||||
["Arguments"
|
||||
(magit-subtree:--prefix)
|
||||
(magit-subtree:--annotate)
|
||||
(magit-subtree:--branch)
|
||||
(magit-subtree:--onto)
|
||||
("-i" "Ignore joins" "--ignore-joins")
|
||||
("-j" "Rejoin" "--rejoin")]
|
||||
["Actions"
|
||||
("p" "Push" magit-subtree-push)
|
||||
("s" "Split" magit-subtree-split)])
|
||||
|
||||
(transient-define-argument magit-subtree:--prefix ()
|
||||
:description "Prefix"
|
||||
:class 'transient-option
|
||||
:shortarg "-P"
|
||||
:argument "--prefix="
|
||||
:reader 'magit-subtree-read-prefix)
|
||||
|
||||
(defun magit-subtree-read-prefix (prompt &optional default _history)
|
||||
(let* ((insert-default-directory nil)
|
||||
(topdir (magit-toplevel))
|
||||
(prefix (read-directory-name (concat prompt ": ") topdir default)))
|
||||
(if (file-name-absolute-p prefix)
|
||||
;; At least `ido-mode's variant is not compatible.
|
||||
(if (string-prefix-p topdir prefix)
|
||||
(file-relative-name prefix topdir)
|
||||
(user-error "%s isn't inside the repository at %s" prefix topdir))
|
||||
prefix)))
|
||||
|
||||
(transient-define-argument magit-subtree:--message ()
|
||||
:description "Message"
|
||||
:class 'transient-option
|
||||
:shortarg "-m"
|
||||
:argument "--message=")
|
||||
|
||||
(transient-define-argument magit-subtree:--annotate ()
|
||||
:description "Annotate"
|
||||
:class 'transient-option
|
||||
:key "-a"
|
||||
:argument "--annotate=")
|
||||
|
||||
(transient-define-argument magit-subtree:--branch ()
|
||||
:description "Branch"
|
||||
:class 'transient-option
|
||||
:shortarg "-b"
|
||||
:argument "--branch=")
|
||||
|
||||
(transient-define-argument magit-subtree:--onto ()
|
||||
:description "Onto"
|
||||
:class 'transient-option
|
||||
:key "-o"
|
||||
:argument "--onto="
|
||||
:reader 'magit-transient-read-revision)
|
||||
|
||||
(defun magit-subtree-prefix (transient prompt)
|
||||
(--if-let (--first (string-prefix-p "--prefix=" it)
|
||||
(transient-args transient))
|
||||
(substring it 9)
|
||||
(magit-subtree-read-prefix prompt)))
|
||||
|
||||
(defun magit-subtree-arguments (transient)
|
||||
(--remove (string-prefix-p "--prefix=" it)
|
||||
(transient-args transient)))
|
||||
|
||||
(defun magit-git-subtree (subcmd prefix &rest args)
|
||||
(magit-run-git-async "subtree" subcmd (concat "--prefix=" prefix) args))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-subtree-add (prefix repository ref args)
|
||||
"Add REF from REPOSITORY as a new subtree at PREFIX."
|
||||
(interactive
|
||||
(cons (magit-subtree-prefix 'magit-subtree-import "Add subtree")
|
||||
(let ((remote (magit-read-remote-or-url "From repository")))
|
||||
(list remote
|
||||
(magit-read-refspec "Ref" remote)
|
||||
(magit-subtree-arguments 'magit-subtree-import)))))
|
||||
(magit-git-subtree "add" prefix args repository ref))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-subtree-add-commit (prefix commit args)
|
||||
"Add COMMIT as a new subtree at PREFIX."
|
||||
(interactive
|
||||
(list (magit-subtree-prefix 'magit-subtree-import "Add subtree")
|
||||
(magit-read-string-ns "Commit")
|
||||
(magit-subtree-arguments 'magit-subtree-import)))
|
||||
(magit-git-subtree "add" prefix args commit))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-subtree-merge (prefix commit args)
|
||||
"Merge COMMIT into the PREFIX subtree."
|
||||
(interactive
|
||||
(list (magit-subtree-prefix 'magit-subtree-import "Merge into subtree")
|
||||
(magit-read-string-ns "Commit")
|
||||
(magit-subtree-arguments 'magit-subtree-import)))
|
||||
(magit-git-subtree "merge" prefix args commit))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-subtree-pull (prefix repository ref args)
|
||||
"Pull REF from REPOSITORY into the PREFIX subtree."
|
||||
(interactive
|
||||
(cons (magit-subtree-prefix 'magit-subtree-import "Pull into subtree")
|
||||
(let ((remote (magit-read-remote-or-url "From repository")))
|
||||
(list remote
|
||||
(magit-read-refspec "Ref" remote)
|
||||
(magit-subtree-arguments 'magit-subtree-import)))))
|
||||
(magit-git-subtree "pull" prefix args repository ref))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-subtree-push (prefix repository ref args)
|
||||
"Extract the history of the subtree PREFIX and push it to REF on REPOSITORY."
|
||||
(interactive (list (magit-subtree-prefix 'magit-subtree-export "Push subtree")
|
||||
(magit-read-remote-or-url "To repository")
|
||||
(magit-read-string-ns "To reference")
|
||||
(magit-subtree-arguments 'magit-subtree-export)))
|
||||
(magit-git-subtree "push" prefix args repository ref))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-subtree-split (prefix commit args)
|
||||
"Extract the history of the subtree PREFIX."
|
||||
(interactive (list (magit-subtree-prefix 'magit-subtree-export "Split subtree")
|
||||
(magit-read-string-ns "Commit")
|
||||
(magit-subtree-arguments 'magit-subtree-export)))
|
||||
(magit-git-subtree "split" prefix args commit))
|
||||
|
||||
;;; _
|
||||
(provide 'magit-subtree)
|
||||
;;; magit-subtree.el ends here
|
BIN
elpa/magit-20210414.1306/magit-subtree.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-subtree.elc
Normal file
Binary file not shown.
217
elpa/magit-20210414.1306/magit-tag.el
Normal file
217
elpa/magit-20210414.1306/magit-tag.el
Normal file
|
@ -0,0 +1,217 @@
|
|||
;;; magit-tag.el --- tag functionality -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2010-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
|
||||
;; Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
;; Magit is free software; you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
;;
|
||||
;; Magit is distributed in the hope that it will be useful, but WITHOUT
|
||||
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
;; License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Magit. If not, see http://www.gnu.org/licenses.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; This library implements tag commands.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'magit)
|
||||
|
||||
;; For `magit-tag-delete'.
|
||||
(defvar helm-comp-read-use-marked)
|
||||
|
||||
;;;###autoload (autoload 'magit-tag "magit" nil t)
|
||||
(transient-define-prefix magit-tag ()
|
||||
"Create or delete a tag."
|
||||
:man-page "git-tag"
|
||||
["Arguments"
|
||||
("-f" "Force" ("-f" "--force"))
|
||||
("-a" "Annotate" ("-a" "--annotate"))
|
||||
("-s" "Sign" ("-s" "--sign"))
|
||||
(magit-tag:--local-user)]
|
||||
[["Create"
|
||||
("t" "tag" magit-tag-create)
|
||||
("r" "release" magit-tag-release)]
|
||||
["Do"
|
||||
("k" "delete" magit-tag-delete)
|
||||
("p" "prune" magit-tag-prune)]])
|
||||
|
||||
(defun magit-tag-arguments ()
|
||||
(transient-args 'magit-tag))
|
||||
|
||||
(transient-define-argument magit-tag:--local-user ()
|
||||
:description "Sign as"
|
||||
:class 'transient-option
|
||||
:shortarg "-u"
|
||||
:argument "--local-user="
|
||||
:reader 'magit-read-gpg-signing-key
|
||||
:history-key 'magit:--gpg-sign)
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-tag-create (name rev &optional args)
|
||||
"Create a new tag with the given NAME at REV.
|
||||
With a prefix argument annotate the tag.
|
||||
\n(git tag [--annotate] NAME REV)"
|
||||
(interactive (list (magit-read-tag "Tag name")
|
||||
(magit-read-branch-or-commit "Place tag on")
|
||||
(let ((args (magit-tag-arguments)))
|
||||
(when current-prefix-arg
|
||||
(cl-pushnew "--annotate" args))
|
||||
args)))
|
||||
(magit-run-git-with-editor "tag" args name rev))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-tag-delete (tags)
|
||||
"Delete one or more tags.
|
||||
If the region marks multiple tags (and nothing else), then offer
|
||||
to delete those, otherwise prompt for a single tag to be deleted,
|
||||
defaulting to the tag at point.
|
||||
\n(git tag -d TAGS)"
|
||||
(interactive (list (--if-let (magit-region-values 'tag)
|
||||
(magit-confirm t nil "Delete %i tags" nil it)
|
||||
(let ((helm-comp-read-use-marked t))
|
||||
(magit-read-tag "Delete tag" t)))))
|
||||
(magit-run-git "tag" "-d" tags))
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-tag-prune (tags remote-tags remote)
|
||||
"Offer to delete tags missing locally from REMOTE, and vice versa."
|
||||
(interactive
|
||||
(let* ((remote (magit-read-remote "Prune tags using remote"))
|
||||
(tags (magit-list-tags))
|
||||
(rtags (prog2 (message "Determining remote tags...")
|
||||
(magit-remote-list-tags remote)
|
||||
(message "Determining remote tags...done")))
|
||||
(ltags (-difference tags rtags))
|
||||
(rtags (-difference rtags tags)))
|
||||
(unless (or ltags rtags)
|
||||
(message "Same tags exist locally and remotely"))
|
||||
(unless (magit-confirm t
|
||||
"Delete %s locally"
|
||||
"Delete %i tags locally"
|
||||
'noabort ltags)
|
||||
(setq ltags nil))
|
||||
(unless (magit-confirm t
|
||||
"Delete %s from remote"
|
||||
"Delete %i tags from remote"
|
||||
'noabort rtags)
|
||||
(setq rtags nil))
|
||||
(list ltags rtags remote)))
|
||||
(when tags
|
||||
(magit-call-git "tag" "-d" tags))
|
||||
(when remote-tags
|
||||
(magit-run-git-async "push" remote (--map (concat ":" it) remote-tags))))
|
||||
|
||||
(defvar magit-tag-version-regexp-alist
|
||||
'(("^[-._+ ]?snapshot\\.?$" . -4)
|
||||
("^[-._+]$" . -4)
|
||||
("^[-._+ ]?\\(cvs\\|git\\|bzr\\|svn\\|hg\\|darcs\\)\\.?$" . -4)
|
||||
("^[-._+ ]?unknown\\.?$" . -4)
|
||||
("^[-._+ ]?alpha\\.?$" . -3)
|
||||
("^[-._+ ]?beta\\.?$" . -2)
|
||||
("^[-._+ ]?\\(pre\\|rc\\)\\.?$" . -1))
|
||||
"Overrides `version-regexp-alist' for `magit-tag-release'.
|
||||
See also `magit-release-tag-regexp'.")
|
||||
|
||||
(defvar magit-release-tag-regexp "\\`\
|
||||
\\(?1:\\(?:v\\(?:ersion\\)?\\|r\\(?:elease\\)?\\)?[-_]?\\)?\
|
||||
\\(?2:[0-9]+\\(?:\\.[0-9]+\\)*\
|
||||
\\(?:-[a-zA-Z0-9-]+\\(?:\\.[a-zA-Z0-9-]+\\)*\\)?\\)\\'"
|
||||
"Regexp used by `magit-tag-release' to parse release tags.
|
||||
|
||||
The first submatch must match the prefix, if any. The second
|
||||
submatch must match the version string.
|
||||
|
||||
If this matches versions that are not dot separated numbers,
|
||||
then `magit-tag-version-regexp-alist' has to contain entries
|
||||
for the separators allowed here.")
|
||||
|
||||
;;;###autoload
|
||||
(defun magit-tag-release (tag msg &optional args)
|
||||
"Create a release tag.
|
||||
|
||||
Assume that release tags match `magit-release-tag-regexp'.
|
||||
|
||||
First prompt for the name of the new tag using the highest
|
||||
existing tag as initial input and leaving it to the user to
|
||||
increment the desired part of the version string.
|
||||
|
||||
If `--annotate' is enabled, then prompt for the message of the
|
||||
new tag. Base the proposed tag message on the message of the
|
||||
highest tag, provided that that contains the corresponding
|
||||
version string and substituting the new version string for that.
|
||||
Otherwise propose something like \"Foo-Bar 1.2.3\", given, for
|
||||
example, a TAG \"v1.2.3\" and a repository located at something
|
||||
like \"/path/to/foo-bar\"."
|
||||
(interactive
|
||||
(save-match-data
|
||||
(pcase-let*
|
||||
((`(,pver ,ptag ,pmsg) (car (magit--list-releases)))
|
||||
(tag (read-string "Create release tag: " ptag))
|
||||
(ver (and (string-match magit-release-tag-regexp tag)
|
||||
(match-string 2 tag)))
|
||||
(args (magit-tag-arguments)))
|
||||
(list tag
|
||||
(and (member "--annotate" args)
|
||||
(read-string
|
||||
(format "Message for %S: " tag)
|
||||
(cond ((and pver (string-match (regexp-quote pver) pmsg))
|
||||
(replace-match ver t t pmsg))
|
||||
((and ptag (string-match (regexp-quote ptag) pmsg))
|
||||
(replace-match tag t t pmsg))
|
||||
(t (format "%s %s"
|
||||
(capitalize
|
||||
(file-name-nondirectory
|
||||
(directory-file-name (magit-toplevel))))
|
||||
ver)))))
|
||||
args))))
|
||||
(magit-run-git-async "tag" args (and msg (list "-m" msg)) tag)
|
||||
(set-process-sentinel
|
||||
magit-this-process
|
||||
(lambda (process event)
|
||||
(when (memq (process-status process) '(exit signal))
|
||||
(magit-process-sentinel process event)
|
||||
(magit-refs-setup-buffer "HEAD" (magit-show-refs-arguments))))))
|
||||
|
||||
(defun magit--list-releases ()
|
||||
"Return a list of releases.
|
||||
The list is ordered, beginning with the highest release.
|
||||
Each release element has the form (VERSION TAG MESSAGE).
|
||||
`magit-release-tag-regexp' is used to determine whether
|
||||
a tag qualifies as a release tag."
|
||||
(save-match-data
|
||||
(mapcar
|
||||
#'cdr
|
||||
(nreverse
|
||||
(cl-sort (cl-mapcan
|
||||
(lambda (line)
|
||||
(and (string-match " +" line)
|
||||
(let ((tag (substring line 0 (match-beginning 0)))
|
||||
(msg (substring line (match-end 0))))
|
||||
(and (string-match magit-release-tag-regexp tag)
|
||||
(let ((ver (match-string 2 tag))
|
||||
(version-regexp-alist
|
||||
magit-tag-version-regexp-alist))
|
||||
(list (list (version-to-list ver)
|
||||
ver tag msg)))))))
|
||||
;; Cannot rely on "--sort=-version:refname" because
|
||||
;; that gets confused if the version prefix has changed.
|
||||
(magit-git-lines "tag" "-n"))
|
||||
;; The inverse of this function does not exist.
|
||||
#'version-list-< :key #'car)))))
|
||||
|
||||
;;; _
|
||||
(provide 'magit-tag)
|
||||
;;; magit-tag.el ends here
|
BIN
elpa/magit-20210414.1306/magit-tag.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-tag.elc
Normal file
Binary file not shown.
199
elpa/magit-20210414.1306/magit-transient.el
Normal file
199
elpa/magit-20210414.1306/magit-transient.el
Normal file
|
@ -0,0 +1,199 @@
|
|||
;;; magit-transient.el --- support for transients -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2008-2021 The Magit Project Contributors
|
||||
;;
|
||||
;; You should have received a copy of the AUTHORS.md file which
|
||||
;; lists all contributors. If not, see http://magit.vc/authors.
|
||||
|
||||
;; Author: Jonas Bernoulli <jonas@bernoul.li>
|
||||
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
;; Magit is free software; you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
;;
|
||||
;; Magit is distributed in the hope that it will be useful, but WITHOUT
|
||||
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
;; License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with Magit. If not, see http://www.gnu.org/licenses.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; This library implements Magit-specific prefix and suffix classes,
|
||||
;; and their methods.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'magit-git)
|
||||
(require 'magit-mode)
|
||||
(require 'magit-process)
|
||||
|
||||
(require 'transient)
|
||||
|
||||
;;; Classes
|
||||
|
||||
(defclass magit--git-variable (transient-variable)
|
||||
((scope :initarg :scope)))
|
||||
|
||||
(defclass magit--git-variable:choices (magit--git-variable)
|
||||
((choices :initarg :choices)
|
||||
(fallback :initarg :fallback :initform nil)
|
||||
(default :initarg :default :initform nil)))
|
||||
|
||||
(defclass magit--git-variable:urls (magit--git-variable)
|
||||
((seturl-arg :initarg :seturl-arg :initform nil)))
|
||||
|
||||
;;; Methods
|
||||
;;;; Init
|
||||
|
||||
(cl-defmethod transient-init-scope ((obj magit--git-variable))
|
||||
(oset obj scope
|
||||
(cond (transient--prefix
|
||||
(oref transient--prefix scope))
|
||||
((slot-boundp obj 'scope)
|
||||
(funcall (oref obj scope) obj)))))
|
||||
|
||||
(cl-defmethod transient-init-value ((obj magit--git-variable))
|
||||
(let ((variable (format (oref obj variable)
|
||||
(oref obj scope))))
|
||||
(oset obj variable variable)
|
||||
(oset obj value
|
||||
(cond ((oref obj multi-value)
|
||||
(magit-get-all variable))
|
||||
(t
|
||||
(magit-git-string "config" "--local" variable))))))
|
||||
|
||||
;;;; Read
|
||||
|
||||
(cl-defmethod transient-infix-read :around ((obj magit--git-variable:urls))
|
||||
(mapcar (lambda (url)
|
||||
(if (string-prefix-p "~" url)
|
||||
(expand-file-name url)
|
||||
url))
|
||||
(cl-call-next-method obj)))
|
||||
|
||||
(cl-defmethod transient-infix-read ((obj magit--git-variable:choices))
|
||||
(let ((choices (oref obj choices)))
|
||||
(when (functionp choices)
|
||||
(setq choices (funcall choices)))
|
||||
(if-let ((value (oref obj value)))
|
||||
(cadr (member value choices))
|
||||
(car choices))))
|
||||
|
||||
;;;; Readers
|
||||
|
||||
(defun magit-transient-read-person (prompt initial-input history)
|
||||
(magit-completing-read
|
||||
prompt
|
||||
(mapcar (lambda (line)
|
||||
(save-excursion
|
||||
(and (string-match "\\`[\s\t]+[0-9]+\t" line)
|
||||
(list (substring line (match-end 0))))))
|
||||
(magit-git-lines "shortlog" "-n" "-s" "-e" "HEAD"))
|
||||
nil nil initial-input history))
|
||||
|
||||
(defun magit-transient-read-revision (prompt initial-input history)
|
||||
(or (magit-completing-read prompt (cons "HEAD" (magit-list-refnames))
|
||||
nil nil initial-input history
|
||||
(or (magit-branch-or-commit-at-point)
|
||||
(magit-get-current-branch)))
|
||||
(user-error "Nothing selected")))
|
||||
|
||||
;;;; Set
|
||||
|
||||
(cl-defmethod transient-infix-set ((obj magit--git-variable) value)
|
||||
(let ((variable (oref obj variable)))
|
||||
(oset obj value value)
|
||||
(if (oref obj multi-value)
|
||||
(magit-set-all value variable)
|
||||
(magit-set value variable))
|
||||
(magit-refresh)
|
||||
(unless (or value transient--prefix)
|
||||
(message "Unset %s" variable))))
|
||||
|
||||
(cl-defmethod transient-infix-set ((obj magit--git-variable:urls) values)
|
||||
(let ((previous (oref obj value))
|
||||
(seturl (oref obj seturl-arg))
|
||||
(remote (oref transient--prefix scope)))
|
||||
(oset obj value values)
|
||||
(dolist (v (-difference values previous))
|
||||
(magit-call-git "remote" "set-url" seturl "--add" remote v))
|
||||
(dolist (v (-difference previous values))
|
||||
(magit-call-git "remote" "set-url" seturl "--delete" remote
|
||||
(concat "^" (regexp-quote v) "$")))
|
||||
(magit-refresh)))
|
||||
|
||||
;;;; Draw
|
||||
|
||||
(cl-defmethod transient-format-description ((obj magit--git-variable))
|
||||
(or (oref obj description)
|
||||
(oref obj variable)))
|
||||
|
||||
(cl-defmethod transient-format-value ((obj magit--git-variable))
|
||||
(if-let ((value (oref obj value)))
|
||||
(if (oref obj multi-value)
|
||||
(if (cdr value)
|
||||
(mapconcat (lambda (v)
|
||||
(concat "\n "
|
||||
(propertize v 'face 'transient-value)))
|
||||
value "")
|
||||
(propertize (car value) 'face 'transient-value))
|
||||
(propertize (car (split-string value "\n"))
|
||||
'face 'transient-value))
|
||||
(propertize "unset" 'face 'transient-inactive-value)))
|
||||
|
||||
(cl-defmethod transient-format-value ((obj magit--git-variable:choices))
|
||||
(let* ((variable (oref obj variable))
|
||||
(choices (oref obj choices))
|
||||
(local (magit-git-string "config" "--local" variable))
|
||||
(global (magit-git-string "config" "--global" variable))
|
||||
(default (oref obj default))
|
||||
(fallback (oref obj fallback))
|
||||
(fallback (and fallback
|
||||
(when-let ((val (magit-get fallback)))
|
||||
(concat fallback ":" val)))))
|
||||
(when (functionp choices)
|
||||
(setq choices (funcall choices)))
|
||||
(concat
|
||||
(propertize "[" 'face 'transient-inactive-value)
|
||||
(mapconcat (lambda (choice)
|
||||
(propertize choice 'face (if (equal choice local)
|
||||
(if (member choice choices)
|
||||
'transient-value
|
||||
'font-lock-warning-face)
|
||||
'transient-inactive-value)))
|
||||
(if (and local (not (member local choices)))
|
||||
(cons local choices)
|
||||
choices)
|
||||
(propertize "|" 'face 'transient-inactive-value))
|
||||
(and (or global fallback default)
|
||||
(concat
|
||||
(propertize "|" 'face 'transient-inactive-value)
|
||||
(cond (global
|
||||
(propertize (concat "global:" global)
|
||||
'face (cond (local
|
||||
'transient-inactive-value)
|
||||
((member global choices)
|
||||
'transient-value)
|
||||
(t
|
||||
'font-lock-warning-face))))
|
||||
(fallback
|
||||
(propertize fallback
|
||||
'face (if local
|
||||
'transient-inactive-value
|
||||
'transient-value)))
|
||||
(default
|
||||
(propertize (concat "default:" default)
|
||||
'face (if local
|
||||
'transient-inactive-value
|
||||
'transient-value))))))
|
||||
(propertize "]" 'face 'transient-inactive-value))))
|
||||
|
||||
;;; _
|
||||
(provide 'magit-transient)
|
||||
;;; magit-transient.el ends here
|
||||
|
BIN
elpa/magit-20210414.1306/magit-transient.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-transient.elc
Normal file
Binary file not shown.
1192
elpa/magit-20210414.1306/magit-utils.el
Normal file
1192
elpa/magit-20210414.1306/magit-utils.el
Normal file
File diff suppressed because it is too large
Load Diff
BIN
elpa/magit-20210414.1306/magit-utils.elc
Normal file
BIN
elpa/magit-20210414.1306/magit-utils.elc
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user