;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (require 'magit) (defvar magit-find-file-hook nil) (add-hook 'magit-find-file-hook 'magit-blob-mode) #@279 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. (fn REV FILE) (defalias 'magit-find-file #[514 "\300\301#\207" [magit-find-file--internal pop-to-buffer-same-window] 6 (#$ . 189) (magit-find-file-read-args "Find file")]) #@298 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. (fn REV FILE) (defalias 'magit-find-file-other-window #[514 "\300\301#\207" [magit-find-file--internal switch-to-buffer-other-window] 6 (#$ . 634) (magit-find-file-read-args "Find file in other window")]) #@297 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. (fn REV FILE) (defalias 'magit-find-file-other-frame #[514 "\300\301#\207" [magit-find-file--internal switch-to-buffer-other-frame] 6 (#$ . 1131) (magit-find-file-read-args "Find file in other frame")]) #@15 (fn PROMPT) (defalias 'magit-find-file-read-args #[257 "\300\301\302\303\304\305\306\"\"\305\211\211\307\310 \206\311 &\211\203,\211\312\235\203'\313\202(\"D\207\314\315!\207" [("{worktree}" "{index}") magit-completing-read "Find file from revision" append magit-list-refnames nil t magit-revision-history magit-branch-or-commit-at-point magit-get-current-branch magit-read-file-from-rev "HEAD" user-error "Nothing selected"] 10 (#$ . 1624)]) #@20 (fn REV FILE FN) (defalias 'magit-find-file--internal #[771 "\301\"\302\211\303 \211\203_\304 \262i\262\211\232\203_\232\204_\305\267\202@\306#\262\210\202`\306\302#\262\210\202`\203T\306\307\nQ#\262\210\202`\306\310 D#\262\210!\210\203zrq\210~\210eb\210Sy\210\311!\210)\207" [magit-buffer-revision magit-find-file-noselect nil magit-file-relative-name line-number-at-pos #s(hash-table size 2 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data ("{worktree}" 40 "{index}" 52)) magit-diff-visit--offset ".." "-R" move-to-column] 12 (#$ . 2086)]) #@189 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. (fn REV FILE) (defalias 'magit-find-file-noselect #[514 "\300\"\207" [magit-find-file-noselect-1] 5 (#$ . 2703)]) #@354 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}". (fn REV FILE &optional REVERT) (defalias 'magit-find-file-noselect-1 #[770 "\305\232\203\306\307\310 \"!\207\310 \311!\203\312\"\262r\313\"q\210\203;\314=\2037\315\316\317\320 \"!\204;\203{\321\232\203E\321\202I\322\323\"\307\"\324!\325!\203^\211\202_\262\326\304!\210\327\330\331\211\"\210\332\321\232\203x\333\202y\334!\210p)\207" [magit-buffer-file-name magit-buffer-revision magit-buffer-refname default-directory revert-buffer-function "{worktree}" find-file-noselect expand-file-name magit-toplevel file-name-absolute-p file-relative-name magit-get-revision-buffer-create ask-revert y-or-n-p format "%s already exists; revert it? " buffer-name "{index}" magit-rev-format "%H" file-name-directory file-exists-p make-local-variable magit-revert-rev-file-buffer revert-buffer t run-hooks magit-find-index-hook magit-find-file-hook] 8 (#$ . 3000)]) #@17 (fn REV FILE) (defalias 'magit-get-revision-buffer-create #[514 "\300\301#\207" [magit-get-revision-buffer t] 6 (#$ . 4219)]) #@34 (fn REV FILE &optional CREATE) (defalias 'magit-get-revision-buffer #[770 "\211\203\300\202 \301\302\303\304\305\306 ##!\207" [get-buffer-create get-buffer format "%s.~%s~" subst-char-in-string 47 95] 11 (#$ . 4355)]) #@30 (fn IGNORE-AUTO NOCONFIRM) (defalias 'magit-revert-rev-file-buffer #[514 "\211\204B\306 \204-\3072*\211\205'\211@\310 \"\203 \311\307\312\"\210A\266\202\202\2620\204B\313\314\315\n\316\232\203:\317\202=\320\nP\"!\205\206\312\321 \322 ! \206O\323\324 \210\325\326\327\n\316\232\203b\330P\202f\n\330Q#\210+\210 \331\332 \" !\333\312!\210*\312\"\334\335!\210eb\207" [revert-without-query magit-buffer-file-name magit-buffer-refname inhibit-read-only default-directory coding-system-for-read buffer-modified-p found string-match throw t yes-or-no-p format "Revert buffer from Git %s? " "{index}" "index" "revision " magit-toplevel file-relative-name undecided erase-buffer magit-git-insert "cat-file" "-p" ":" remq global-diff-hl-mode-enable-in-buffers normal-mode set-buffer-modified-p nil last-coding-system-used buffer-file-coding-system after-change-major-mode-hook buffer-file-name buffer-read-only] 9 (#$ . 4586)]) (defvar magit-find-index-hook nil) #@156 Read FILE from the index into a buffer and return the buffer. FILE must to be relative to the top directory of the repository. (fn FILE &optional REVERT) (defalias 'magit-find-file-index-noselect #[513 "\300\301\206\302#\207" [magit-find-file-noselect-1 "{index}" ask-revert] 6 (#$ . 5578)]) #@167 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'. (defalias 'magit-update-index #[0 "\306 \307\232\204 \310\311\"\210\312\313\314\315 \"!\203\226\316\317\320!!p \203'\321C\322\"\210\323\324\"\216\n\325\326\327\"\323\330\"\216r\211q\210\331!\210)r\211q\210\332\333\211\333\334%\210*\266)\335 \211\203~\211\336\337\340\341\342\343 #\334\344O\341\345\346\347\350\351 P\352\353!&%\210)\210\202\202\354 \266)\355\333!\210 \203\221\356C\357\"\210\266\202\233\360\361!\266\362\363!\211\203\252r\211q\210\364 \210)\210\327\207" [magit-buffer-refname magit-wip-before-change-mode buffer-file-coding-system coding-system-for-write default-directory magit-wip-after-apply-mode magit-file-relative-name "{index}" user-error "%s isn't visiting the index" y-or-n-p format "Update index with contents of %s" buffer-name make-temp-name magit-git-dir "magit-update-index-" magit-wip-commit-before-change " before un-/stage" make-closure #[0 "\3011 \302\300!0\207\210\303\207" [V0 (error) delete-file nil] 2] generate-new-buffer " *temp file*" t #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] insert-buffer-substring write-region nil 0 magit-toplevel magit-call-git "update-index" "--cacheinfo" magit-git-string "ls-files" "-s" 6 "hash-object" "-t" "blob" "-w" "--path=" "--" magit-convert-filename-for-git magit--not-inside-repository-error set-buffer-modified-p magit-wip-commit-after-apply " after un-/stage" message "Abort" magit-get-mode-buffer magit-status-mode magit-refresh] 17 (#$ . 5882) nil]) #@400 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. (fn FILENAME &optional WILDCARDS) (defalias 'magit-find-git-config-file #[513 "\300\"\207" [find-file] 5 (#$ . 7542) (byte-code "\301 \302\303\304 \")\207" [default-directory magit-git-dir find-file-read-args "Find file: " confirm-nonexistent-file-or-buffer] 3)]) #@432 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. (fn FILENAME &optional WILDCARDS) (defalias 'magit-find-git-config-file-other-window #[513 "\300\"\207" [find-file-other-window] 5 (#$ . 8181) (byte-code "\301 \302\303\304 \")\207" [default-directory magit-git-dir find-file-read-args "Find file in other window: " confirm-nonexistent-file-or-buffer] 3)]) #@430 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. (fn FILENAME &optional WILDCARDS) (defalias 'magit-find-git-config-file-other-frame #[513 "\300\"\207" [find-file-other-frame] 5 (#$ . 8894) (byte-code "\301 \302\303\304 \")\207" [default-directory magit-git-dir find-file-read-args "Find file in other frame: " confirm-nonexistent-file-or-buffer] 3)]) (defalias 'magit-file-dispatch #[0 "\300\301 \203\n\302\202 \303!\207" [transient-setup magit-file-relative-name magit-file-dispatch magit-dispatch] 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-file-dispatch interactive-only t function-documentation "Invoke a Magit command that acts on the visited file.\nWhen invoked outside a file-visiting buffer, then fall back\nto `magit-dispatch'." transient--prefix transient-prefix :command :info-manual "(magit) Minor Mode for Buffers Visiting Files" transient--layout ([1 transient-columns (:description "Actions") ([1 transient-column nil ((1 transient-suffix (:key "s" :description "Stage" :command magit-stage-file)) (1 transient-suffix (:key "u" :description "Unstage" :command magit-unstage-file)) (1 transient-suffix (:key "c" :description "Commit" :command magit-commit)) (1 transient-suffix (:key "e" :description "Edit line" :command magit-edit-line-commit)))] [1 transient-column nil ((1 transient-suffix (:key "D" :description "Diff..." :command magit-diff)) (1 transient-suffix (:key "d" :description "Diff" :command magit-diff-buffer-file)) (1 transient-suffix (:key "g" :description "Status" :command magit-status-here)))] [1 transient-column nil ((1 transient-suffix (:key "L" :description "Log..." :command magit-log)) (1 transient-suffix (:key "l" :description "Log" :command magit-log-buffer-file)) (1 transient-suffix (:key "t" :description "Trace" :command magit-log-trace-definition)))] [1 transient-column nil ((1 transient-suffix (:key "B" :description "Blame..." :command magit-blame)) (1 transient-suffix (:key "b" :description "Blame" :command magit-blame-addition)) (1 transient-suffix (:key "r" :description "...removal" :command magit-blame-removal)) (1 transient-suffix (:key "f" :description "...reverse" :command magit-blame-reverse)) (1 transient-suffix (:key "m" :description "Blame echo" :command magit-blame-echo)) (1 transient-suffix (:key "q" :description "Quit blame" :command magit-blame-quit)))] [1 transient-column nil ((1 transient-suffix (:key "p" :description "Prev blob" :command magit-blob-previous)) (1 transient-suffix (:key "n" :description "Next blob" :command magit-blob-next)) (1 transient-suffix (:key "v" :description "Goto blob" :command magit-find-file)) (1 transient-suffix (:key "V" :description "Goto file" :command magit-blob-visit-file)))] [1 transient-column nil ((5 transient-suffix (:key "C-c r" :description "Rename file" :command magit-file-rename)) (5 transient-suffix (:key "C-c d" :description "Delete file" :command magit-file-delete)) (5 transient-suffix (:key "C-c u" :description "Untrack file" :command magit-file-untrack)) (5 transient-suffix (:key "C-c c" :description "Checkout file" :command magit-file-checkout)))])])] 8) #@31 Keymap for `magit-blob-mode'. (defvar magit-blob-mode-map (byte-code "\300 \301\302\303#\210\301\304\305#\210\301\306\307#\210\301\310\311#\210\301\312\313#\210\301\314\315#\210\207" [make-sparse-keymap define-key "p" magit-blob-previous "n" magit-blob-next "b" magit-blame-addition "r" magit-blame-removal "f" magit-blame-reverse "q" magit-kill-this-buffer] 5) (#$ . 12442)) #@99 Non-nil if Magit-Blob mode is enabled. Use the command `magit-blob-mode' to change this variable. (defvar magit-blob-mode nil (#$ . 12830)) (make-variable-buffer-local 'magit-blob-mode) #@686 Enable some Magit features in blob-visiting buffers. This is a minor mode. If called interactively, toggle the `Magit-Blob mode' mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable the mode. If called from Lisp, toggle the mode if ARG is `toggle'. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number. To check whether the minor mode is enabled in the current buffer, evaluate `magit-blob-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. Currently this only adds the following key bindings. \{magit-blob-mode-map} (fn &optional ARG) (defalias 'magit-blob-mode #[256 "\302 \303=\203 ?\202\247\203\304W\203\305\202\306\307\301!\2031\310\300 \"\2031\300 B\311\312\203;\313\202<\314\"\210\315\316!\203^\302 \203P\211\302 \232\203^\317\320\203Z\321\202[\322\323#\210\210\324 \210\207" [magit-blob-mode local-minor-modes current-message toggle 1 nil t boundp delq run-hooks magit-blob-mode-hook magit-blob-mode-on-hook magit-blob-mode-off-hook called-interactively-p any message "Magit-Blob mode %sabled%s" "en" "dis" " in current buffer" force-mode-line-update] 6 (#$ . 13023) (byte-code "\203\n\301!\202 \302C\207" [current-prefix-arg prefix-numeric-value toggle] 2)]) (defvar magit-blob-mode-hook nil) (byte-code "\301\302N\204\f\303\301\302\304#\210\303\301\305\306#\210\303\301\307\310C#\210\311\312\310\313\300!\205#\310\211%\207" [magit-blob-mode-map magit-blob-mode-hook variable-documentation put "Hook run after entering or leaving `magit-blob-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" custom-type hook standard-value nil add-minor-mode magit-blob-mode boundp] 6) #@54 Visit the next blob which modified the current file. (defalias 'magit-blob-next #[0 "\203\302\303 \"\206 !\207\304\305 !\203\306\307!\207\306\310!\207" [magit-buffer-file-name magit-buffer-revision magit-blob-visit magit-blob-successor buffer-file-name buffer-base-buffer user-error "You have reached the end of time" "Buffer isn't visiting a file or blob"] 4 (#$ . 14878) nil]) #@58 Visit the previous blob which modified the current file. (defalias 'magit-blob-previous #[0 "\206\302\303 !\211\203\304 \"\211\203\305!\207\306\307!\207\306\310!\207" [magit-buffer-file-name magit-buffer-revision buffer-file-name buffer-base-buffer magit-blob-ancestor magit-blob-visit user-error "You have reached the beginning of time" "Buffer isn't visiting a file or blob"] 4 (#$ . 15271) nil]) #@193 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. (defalias 'magit-blob-visit-file #[0 "\300 \211\203\f\301\302\303#\207\304\305!\207" [magit-file-relative-name magit-find-file--internal "{worktree}" pop-to-buffer-same-window user-error "Not visiting a blob"] 5 (#$ . 15686) nil]) #@21 (fn BLOB-OR-FILE) (defalias 'magit-blob-visit #[257 "\211;\203 \300!\207\211\242\243\211\242\243\301\"\210\302\303\304\305\306\"\307\305\310\"!$\207" [find-file magit-find-file apply message "%s (%s %s ago)" magit-rev-format "%s" magit--age "%ct"] 15 (#$ . 16117)]) #@17 (fn REV FILE) (defalias 'magit-blob-ancestor #[514 "\301 \211\203\211\302\303\304\305\306\307\206\310\311 &)\202\312 \262\203)\211AA\207\313\314\"\207" [default-directory magit-toplevel magit-git-lines "log" "-2" "--format=%H" "--name-only" "--follow" "HEAD" "--" magit--not-inside-repository-error butlast 2] 12 (#$ . 16403)]) #@17 (fn REV FILE) (defalias 'magit-blob-successor #[514 "\301 \211\203\211\302\303\304\305\306\307\310&)\202\311 \262\3122A\211\205@\3138\232\2038\314\312@A@D\"\210\202\211AA\262\2020\207" [default-directory magit-toplevel magit-git-lines "log" "--format=%H" "--name-only" "--follow" "HEAD" "--" magit--not-inside-repository-error found 2 throw] 11 (#$ . 16754)]) #@157 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'. (fn FILE NEWNAME) (defalias 'magit-file-rename #[514 "\302!\303!\304!\203\305!P\202\203%\306!\203%\307\310\"\210\311!\2030\307\312\"\210\311!\204;\307\313\"\210\314\315!!\203S\316\317\315!\315!#\210\202Y\320#\210\203zrq\210 \321\322\323#\210)\324\325!\203v\325 \210\202y\326 \210)\266\327 \207" [current-prefix-arg buffer-read-only get-file-buffer file-name-directory directory-name-p file-name-nondirectory buffer-modified-p user-error "Save %s before moving it" file-exists-p "%s already exists" "Destination directory %s does not exist" magit-file-tracked-p magit-convert-filename-for-git magit-call-git "mv" rename-file set-visited-file-name nil t fboundp vc-refresh-state vc-find-file-hook magit-refresh] 10 (#$ . 17144) (byte-code "\300\301!\302!\303\304\305\"\205\306!\"\306\307 \"\306!D\207" [magit-read-file "Rename file" file-name-directory read-file-name format "Move %s to destination: " expand-file-name magit-toplevel] 6)]) #@189 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. (fn FILES &optional FORCE) (defalias 'magit-file-untrack #[513 "\301 \211\203\211\302\303\304\205\305\306%)\207\307 \207" [default-directory magit-toplevel magit-run-git "rm" "--cached" "--force" "--" magit--not-inside-repository-error] 9 (#$ . 18276) (byte-code "\301\302\303\"\211\203\304@!\204\305\306!\210\307\310\311#\202\312\313!C\262D\207" [current-prefix-arg magit-region-values file t magit-file-tracked-p user-error "Already untracked" magit-confirm-files untrack "Untrack" magit-read-tracked-file "Untrack file"] 5)]) #@256 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'. (fn FILES &optional FORCE) (defalias 'magit-file-delete #[513 "\300@!\203\301\302\205\303\304$\210\202/\305 \211\203-\211@\306\307\"\310\"\210A\266\202\202\266\311 \207" [magit-file-tracked-p magit-call-git "rm" "--force" "--" magit-toplevel delete-file expand-file-name t magit-refresh] 9 (#$ . 18991) (byte-code "\301\302\303\"\211\203\304\305\306#\202\307\310!C\262D\207" [current-prefix-arg magit-region-values file t magit-confirm-files delete "Delete" magit-read-file "Delete file"] 5)]) #@40 Checkout FILE from REV. (fn REV FILE) (defalias 'magit-file-checkout #[514 "\301 \211\203\211\302\303\304$)\207\305 \207" [default-directory magit-toplevel magit-run-git "checkout" "--" magit--not-inside-repository-error] 8 (#$ . 19742) (byte-code "\301\302\"\211\303\304\"D\207" [magit-buffer-revision magit-read-branch-or-commit "Checkout from revision" magit-read-file-from-rev "Checkout file"] 5)]) (defvar magit-read-file-hist nil) #@37 (fn REV PROMPT &optional DEFAULT) (defalias 'magit-read-file-from-rev #[770 "\300!\301\302\303\302\304\206\305 \235@&\207" [magit-revision-files magit-completing-read nil t magit-read-file-hist magit-current-file] 13 (#$ . 20193)]) #@38 (fn PROMPT &optional TRACKED-ONLY) (defalias 'magit-read-file #[513 "\300 ?\205 \301 \244\302\303\304\303\211\305\306!\206\307\303\n\"\235@&\207" [magit-list-files magit-untracked-files magit-completing-read nil t magit-section-value-if (file submodule) magit-file-relative-name] 13 (#$ . 20443)]) #@15 (fn PROMPT) (defalias 'magit-read-tracked-file #[257 "\300\301\"\207" [magit-read-file t] 4 (#$ . 20759)]) #@319 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'. (fn PROMPT FILES &optional ERROR DEFAULT) (defalias 'magit-read-file-choice #[1026 "G\211\300\267\202\301\206\302!\207@\207\303\304\305\304\306\206!\307  \235@&\207" [#s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (0 8 1 16)) user-error "No file choices" magit-completing-read nil t magit-read-file-hist magit-current-file] 14 (#$ . 20876)]) #@46 (fn REV-OR-RANGE PROMPT &optional DEFAULT) (defalias 'magit-read-changed-file #[770 "\300\301!\302P$\207" [magit-read-file-choice magit-changed-files "No file changed in "] 9 (#$ . 21552)]) (provide 'magit-files)