;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\302\303\304\305\306DD\307\310\311\312\313\314\305& \207" [require magit custom-declare-variable magit-worktree-read-directory-name-function funcall function #[0 "\300\207" [read-directory-name] 1] "Function used to read a directory for worktree commands.\nThis is called with one argument, the prompt, and can be used\nto e.g. use a base directory other than `default-directory'.\nUsed by `magit-worktree-checkout' and `magit-worktree-branch'." :package-version (magit . "3.0.0") :group magit-commands :type] 10) (defalias 'magit-worktree #[0 "\300\301!\207" [transient-setup magit-worktree] 2 nil nil]) (byte-code "\300\301\302\303#\210\300\301\304\305#\210\300\301\306\307\310\301\311\312$#\210\300\301\313\314#\207" [put magit-worktree interactive-only t function-documentation "Act on a worktree." transient--prefix transient-prefix :command :man-page "git-worktree" transient--layout ([1 transient-columns nil ([1 transient-column (:description "Create new") ((1 transient-suffix (:key "b" :description "worktree" :command magit-worktree-checkout)) (1 transient-suffix (:key "c" :description "branch and worktree" :command magit-worktree-branch)))] [1 transient-column (:description "Commands") ((1 transient-suffix (:key "m" :description "Move worktree" :command magit-worktree-move)) (1 transient-suffix (:key "k" :description "Delete worktree" :command magit-worktree-delete)) (1 transient-suffix (:key "g" :description "Visit worktree" :command magit-worktree-status)))])])] 8) #@62 Checkout BRANCH in a new worktree at PATH. (fn PATH BRANCH) (defalias 'magit-worktree-checkout #[514 "\300\301\302\303!$\210\304!\207" [magit-run-git "worktree" "add" expand-file-name magit-diff-visit-directory] 7 (#$ . 1600) (byte-code "\301\302!\303\304\"!D\207" [magit-worktree-read-directory-name-function magit-read-branch-or-commit "Checkout" format "Checkout %s in new worktree: "] 5)]) #@111 Create a new BRANCH and check it out in a new worktree at PATH. (fn PATH BRANCH START-POINT &optional FORCE) (defalias 'magit-worktree-branch #[1027 "\300\301\302\203 \303\202\f\304\305 !&\210\306!\207" [magit-run-git "worktree" "add" "-B" "-b" expand-file-name magit-diff-visit-directory] 11 (#$ . 2008) (byte-code "\302!\303\304\305! C\"B\207" [magit-worktree-read-directory-name-function current-prefix-arg "Create worktree: " append magit-branch-read-args "Create and checkout branch"] 4)]) #@44 Move WORKTREE to PATH. (fn WORKTREE PATH) (defalias 'magit-worktree-move #[514 "\301\302\303\"!\203 \304\305!\207\301!\306\307\310\302!$\311U\203?\312!\204?\313\314!\203?\315 \210\316\203<\317!\320!P\202=!\210\321 \207" [default-directory file-directory-p expand-file-name ".git" user-error "You may not move the main working tree" magit-call-git "worktree" "move" 0 file-exists-p derived-mode-p magit-status-mode kill-buffer magit-diff-visit-directory file-name-as-directory file-name-nondirectory magit-refresh] 9 (#$ . 2521) (byte-code "\301\302\303 A\304\305\304\211\306\307!&\310!D\207" [magit-worktree-read-directory-name-function magit-completing-read "Move worktree" magit-list-worktrees nil t magit-section-value-if worktree "Move worktree to: "] 9)]) #@112 Delete a worktree, defaulting to the worktree at point. The primary worktree cannot be deleted. (fn WORKTREE) (defalias 'magit-worktree-delete #[257 "\303\304\305\"!\203\306\307\"\207\310\311 @@!\312\203\313\202\314\315C\"\210\316!\2031\317\320#\210)\316\n!\203<\321\315\322\"\207\211\321\315\322\"\210)\323\324!\205P\325 \210\326!\207" [magit-delete-by-moving-to-trash delete-by-moving-to-trash default-directory file-directory-p expand-file-name ".git" user-error "Deleting %s would delete the shared .git directory" file-name-as-directory magit-list-worktrees magit-confirm-files trash delete "worktree" file-exists-p delete-directory t magit-run-git "prune" derived-mode-p magit-status-mode kill-buffer magit-status-setup-buffer] 6 (#$ . 3308) (byte-code "\300\301\302 A\303\304\303\211\305\306!&C\207" [magit-completing-read "Delete worktree" magit-list-worktrees nil t magit-section-value-if worktree] 9)]) #@257 Show the status for the worktree at point. If there is no worktree at point, then read one in the minibuffer. If the worktree at point is the one whose status is already being displayed in the current buffer, then show it in Dired instead. (fn WORKTREE) (defalias 'magit-worktree-status #[257 "\300!\207" [magit-diff-visit-directory] 3 (#$ . 4249) (byte-code "\300\301!\206\302\303\304\305\306 !\307 \310\311\312\313&\"C\207" [magit-section-value-if worktree magit-completing-read "Show status for worktree" cl-delete directory-file-name magit-toplevel magit-list-worktrees :test equal :key car] 9)]) #@33 Keymap for `worktree' sections. (defvar magit-worktree-section-map (byte-code "\300 \301\302\303#\210\301\304\305#\210\207" [make-sparse-keymap define-key [remap magit-visit-thing] magit-worktree-status [remap magit-delete-thing] magit-worktree-delete] 5) (#$ . 4862)) #@88 Insert sections for all worktrees. If there is only one worktree, then insert nothing. (defalias 'magit-insert-worktrees #[0 "\306 \211G\307V\205\277\310\311!\203\311\202\311\236A\206\312\313\310\311!\203*\314\311\"@\206+\311\315\316\317\320 \321 &\322\323\324\325\"\211\203E\211\326=\202w\n\205P\327\330!\n\"\211\203[\331\323\"\202u\332 \"\211\205s\333!\203p\211!\262\211\326=\262\262\262#\210\211\n\206\211 ?\205\211\f\3342\272\335\336!\210\337\340\"\341\337\342\"!T\211\203\211@\211\242\243\310\343!\203\266\343\202\276\343\236A\206\276\312\313\310\343!\203\315\314\343\"@\206\316\343\315\317\320 \321 &\322\323\324\325\"\211\203\350\211\326=\202\n\205\363\327\330!\n\"\211\203\376\331\323\"\202\332 \"\211\205\333!\203\211!\262\211\326=\262\262\262#\210\211\n\206, ?\205,\f\3342c\210\344GZ\345\"c\210\346!\347!\350!\350!W\203V\266\202\202Y\211\266\202c\210\351c\210\352\353!\210\354!\210\355\331\356\"\357\"\210\322\360\320 #\361\362\"\363\364\365\331\366\"\"!\363\364\367\331\366\"\"!\203\225J\206\250\370!\203\240J\206\250\370!\205\250\211J\212\331\356\"b\210`W\203\337\371`\312\"\206\276\372`\312\"\204\330\373`\312\n$\210\203\330\373`\362$\210\211b\266\202\260)\266\211\f=\203\362\316?\374!)\202\322\331\375\"\376\331\211\375\"\376\"C\244#0\210+\266A\266\202\202\240\266\351c\210\352\353!\210\354!\210\355\331\356\"\357\"\210\322\360\320 #\361\362\"\363\364\365\331\366\"\"!\363\364\367\331\366\"\"!\203KJ\206^\370!\203VJ\206^\370!\205^\211J\212\331\356\"b\210`W\203\225\371`\312\"\206t\372`\312\"\204\216\373`\312\n$\210\203\216\373`\362$\210\211b\266\202f)\266\211\f=\203\250\316?\374!)\202\271\322\331\375\"\376\331\211\375\"\376\"C\244#0\210+\211\262\207" [magit--section-type-alist magit-insert-section--parent magit-insert-section--oldroot magit-section-initial-visibility-alist magit-root-section magit-insert-section--current magit-list-worktrees 1 class-p worktrees magit-section :type rassq :value nil :start point-marker :parent eieio-oset hidden run-hook-with-args-until-success magit-section-set-visibility-hook hide magit-get-section magit-section-ident eieio-oref magit-section-match-assoc functionp cancel-section magit-insert-heading "Worktrees:" mapcar #[257 "\211\242\243\211\242\243\211\242\243\211\242\243\211\203-\300\301\302 \232\203(\303\202)\304#\202@\203;\300\305!\301\306#\202@\205@\307B\207" [propertize font-lock-face magit-get-current-branch magit-branch-current magit-branch-local magit-rev-abbrev magit-hash "(bare)"] 18 "\n\n(fn ARG0)"] -max #[257 "\300@!\207" [string-width] 3 "\n\n(fn IT)"] worktree make-string 32 file-relative-name abbreviate-file-name string-width 10 run-hooks magit-insert-section-hook magit-insert-child-count set-marker-insertion-type start t end eieio-oref-default keymap intern format "magit-%s-section-map" type "forge-%s-section-map" boundp next-single-property-change get-text-property put-text-property magit-section-show parent children magit-section-cache-visibility] 22 (#$ . 5139)]) (provide 'magit-worktree)