;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\315& \210\302\316\304\305\317DD\320\310\321\312\313\314\322& \210\302\323\304\305\324DD\325\310\326\312\313\314\327& \210\302\330\304\305\331DD\332\310\333\312\313\314\315& \210\302\334\304\305\335DD\336\310\337\312\313\314\340& \210\302\341\304\305\342DD\343\310\344\312\313\314\345& \207" [require magit custom-declare-variable magit-clone-set-remote-head funcall function #[0 "\300\207" [nil] 1] "Whether cloning creates the symbolic-ref `/HEAD'." :package-version (magit . "2.4.2") :group magit-commands :type boolean magit-clone-set-remote\.pushDefault #[0 "\300\207" [ask] 1] "Whether to set the value of `remote.pushDefault' after cloning.\n\nIf t, then set without asking. If nil, then don't set. If\n`ask', then ask." (magit . "2.4.0") (choice (const :tag "set" t) (const :tag "ask" ask) (const :tag "don't set" nil)) magit-clone-default-directory #[0 "\300\207" [nil] 1] "Default directory to use when `magit-clone' reads destination.\nIf nil (the default), then use the value of `default-directory'.\nIf a directory, then use that. If a function, then call that\nwith the remote url as only argument and use the returned value." (magit . "2.90.0") (choice (const :tag "value of default-directory") (directory :tag "constant directory") (function :tag "function's value")) magit-clone-always-transient #[0 "\300\207" [nil] 1] "Whether `magit-clone' always acts as a transient prefix command.\nIf nil, then a prefix argument has to be used to show the transient\npopup instead of invoking the default suffix `magit-clone-regular'\ndirectly." (magit . "3.0.0") magit-clone-name-alist #[0 "\300\207" [(("\\`\\(?:github:\\|gh:\\)?\\([^:]+\\)\\'" "github.com" "github.user") ("\\`\\(?:gitlab:\\|gl:\\)\\([^:]+\\)\\'" "gitlab.com" "gitlab.user"))] 1] "Alist mapping repository names to repository urls.\n\nEach element has the form (REGEXP HOSTNAME USER). When the user\nenters a name when a cloning command asks for a name or url, then\nthat is looked up in this list. The first element whose REGEXP\nmatches is used.\n\nThe format specified by option `magit-clone-url-format' is used\nto turn the name into an url, using HOSTNAME and the repository\nname. If the provided name contains a slash, then that is used.\nOtherwise if the name omits the owner of the repository, then the\ndefault user specified in the matched entry is used.\n\nIf USER contains a dot, then it is treated as a Git variable and\nthe value of that is used as the username. Otherwise it is used\nas the username itself." (magit . "3.0.0") (repeat (list regexp (string :tag "hostname") (string :tag "user name or git variable"))) magit-clone-url-format #[0 "\300\207" [#1="git@%h:%n.git"] 1 #1#] "Format used when turning repository names into urls.\n%h is the hostname and %n is the repository name, including\nthe name of the owner. Also see `magit-clone-name-alist'." (magit . "3.0.0") regexp] 10) #@28 (fn &optional TRANSIENT) (defalias 'magit-clone #[256 "\211\203\300\301!\207\302\303!\207" [transient-setup magit-clone call-interactively magit-clone-regular] 3 (#$ . 3054) (byte-code "\206 C\207" [magit-clone-always-transient current-prefix-arg] 1)]) (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-clone interactive-only t function-documentation "Clone a repository." transient--prefix transient-prefix :command :man-page "git-clone" transient--layout ([1 transient-column (:description "Fetch arguments") ((1 transient-switch (:key "-B" :description "Clone a single branch" :argument "--single-branch" :command transient:magit-clone:--single-branch)) (1 transient-switch (:key "-n" :description "Do not clone tags" :argument "--no-tags" :command transient:magit-clone:--no-tags)) (6 transient-switch (:key "-S" :description "Clones submodules" :argument "--recurse-submodules" :command transient:magit-clone:--recurse-submodules)) (7 transient-switch (:key "-l" :description "Do not optimize" :argument "--no-local" :command transient:magit-clone:--no-local)))] [1 transient-column (:description "Setup arguments") ((1 transient-option (:key "-o" :description "Set name of remote" :shortarg "-o" :argument "--origin=" :command transient:magit-clone:--origin=)) (1 transient-option (:key "-b" :description "Set HEAD branch" :shortarg "-b" :argument "--branch=" :command transient:magit-clone:--branch=)) (7 transient-option (:key "-g" :description "Separate git directory" :argument "--separate-git-dir=" :command transient:magit-clone:--separate-git-dir= :reader transient-read-directory)) (6 transient-option (:key "-t" :description "Use template directory" :argument "--template=" :command transient:magit-clone:--template= :reader transient-read-existing-directory)))] [1 transient-column (:description "Local sharing arguments") ((1 transient-switch (:key "-s" :description "Share objects" :shortarg "-s" :argument "--shared" :command transient:magit-clone:--shared)) (1 transient-switch (:key "-h" :description "Do not use hardlinks" :argument "--no-hardlinks" :command transient:magit-clone:--no-hardlinks)))] [1 transient-column (:description "Clone") ((1 transient-suffix (:key "C" :description "regular" :command magit-clone-regular)) (1 transient-suffix (:key "s" :description "shallow" :command magit-clone-shallow)) (7 transient-suffix (:key "d" :description "shallow since date" :command magit-clone-shallow-since)) (7 transient-suffix (:key "e" :description "shallow excluding" :command magit-clone-shallow-exclude)) (1 transient-suffix (:key "b" :description "bare" :command magit-clone-bare)) (1 transient-suffix (:key "m" :description "mirror" :command magit-clone-mirror)))])] 8) #@128 Create a clone of REPOSITORY in DIRECTORY. Then show the status buffer for the new repository. (fn REPOSITORY DIRECTORY ARGS) (defalias 'magit-clone-regular #[771 "\300#\207" [magit-clone-internal] 7 (#$ . 5848) (magit-clone-read-args)]) #@211 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. (fn REPOSITORY DIRECTORY ARGS DEPTH) (defalias 'magit-clone-shallow #[1028 "\300\301\302\"B#\207" [magit-clone-internal format "--depth=%s"] 10 (#$ . 6097) (byte-code "\301\302 \203\303\304\305\"\202\305C\"\207" [current-prefix-arg append magit-clone-read-args read-number "Depth: " 1] 5)]) #@199 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. (fn REPOSITORY DIRECTORY ARGS DATE) (defalias 'magit-clone-shallow-since #[1028 "\300\301\302\"B#\207" [magit-clone-internal format "--shallow-since=%s"] 10 (#$ . 6577) (byte-code "\300\301 \302\303\304\211#C\"\207" [append magit-clone-read-args transient-read-date "Exclude commits before: " nil] 6)]) #@229 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. (fn REPOSITORY DIRECTORY ARGS EXCLUDE) (defalias 'magit-clone-shallow-exclude #[1028 "\300\301\302\"B#\207" [magit-clone-internal format "--shallow-exclude=%s"] 10 (#$ . 7053) (byte-code "\300\301 \302\303!C\"\207" [append magit-clone-read-args read-string "Exclude commits reachable from: "] 4)]) #@133 Create a bare clone of REPOSITORY in DIRECTORY. Then show the status buffer for the new repository. (fn REPOSITORY DIRECTORY ARGS) (defalias 'magit-clone-bare #[771 "\300\301B#\207" [magit-clone-internal "--bare"] 8 (#$ . 7551) (magit-clone-read-args)]) #@129 Create a mirror of REPOSITORY in DIRECTORY. Then show the status buffer for the new repository. (fn REPOSITORY DIRECTORY ARGS) (defalias 'magit-clone-mirror #[771 "\300\301B#\207" [magit-clone-internal "--mirror"] 8 (#$ . 7816) (magit-clone-read-args)]) #@34 (fn REPOSITORY DIRECTORY ARGS) (defalias 'magit-clone-internal #[771 "C@\302>?\303\304\"\206\305\306!\206\307\205)\310=\206)\205)\311\312\313\"!\314\315!\210\316\317\242!!\240\210\320\242!\203|\321\242!\203v\322\242!G\323V\203|\324!\211\203k\316\317\242\"!\240\203k\320\242!\203r\325\326\242\"\210\210\202|\325\327\242\"\210\330\331\332\n\333 \242!%\210\334 \335\310#\210\336 \337\340%\"\207" [magit-clone-set-remote\.pushDefault magit-this-process ("--bare" "--mirror") transient-arg-value "--origin" magit-get "clone.defaultRemote" "origin" t y-or-n-p format "Set `remote.pushDefault' to %S? " run-hooks magit-credential-hook file-name-as-directory expand-file-name file-exists-p file-directory-p directory-files 2 magit-clone--url-to-name user-error "%s already exists" "%s already exists and is not a directory" magit-run-git-async "clone" "--" magit-convert-filename-for-git process-put inhibit-refresh set-process-sentinel make-closure #[514 "\306!\307>\203\310\311\"\210)\306!\312=\205F\313!\314U\205F\301\203:\300\242\303\2030\315\302\316\"\210\2049\317\302!\210)r\320\321\"q\210\322\300\242!)\207" [V0 V1 V2 V3 magit-process-raise-error default-directory process-status (exit signal) t magit-process-sentinel exit process-exit-status 0 magit-set "remote.pushDefault" magit-remote-unset-head process-get command-buf magit-status-setup-buffer magit-clone-set-remote-head] 5 "\n\n(fn PROCESS EVENT)"]] 15 (#$ . 8080)]) (defalias 'magit-clone-read-args #[0 "\301 \211\302\303\304!\203!\202\305\211\306!%\307\310!E\207" [magit-clone-default-directory magit-clone-read-repository read-directory-name "Clone to: " functionp nil magit-clone--url-to-name transient-args magit-clone] 9]) (defalias 'magit-clone-read-repository #[0 "\301\302\303\304\305\306\307E\310#\311Q\312\"\211\313\267\202A\314\315!\316\317\320\321#)\266\203\203+\211\202.\322!\262\202B\323\324!\202B\325\323\326!P\202B\317\262\327\330!\210\207" [inhibit-changing-match-data read-char-choice "Clone from " mapconcat identity "[u]rl or name" "[p]ath" "or [l]ocal url" ", " " " (117 112 108) #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (117 20 112 51 108 57)) magit-read-string-ns "Clone from url or name" "\\(://\\|@\\)" nil t string-match magit-clone--name-to-url read-directory-name "Clone repository: " "file://" "Clone repository: file://" message ""] 9]) #@12 (fn URL) (defalias 'magit-clone--url-to-name #[257 "\300\301\"\205 \302\303\"\207" [string-match "\\([^/:]+?\\)\\(/?\\.git\\)?$" match-string 1] 4 (#$ . 10548)]) #@13 (fn NAME) (defalias 'magit-clone--name-to-url #[257 "\301\302\303\"\"\206\304\305\300\"\207" [magit-clone-name-alist seq-some make-closure #[257 "\211\242\243\211\242\243\211\242\243\301\300\"\205!\302\303\300\"\304#\262\207" [V0 string-match match-string 1 magit-clone--format-url] 15 "\n\n(fn ARG0)"] user-error "Not an url and no matching entry in `%s'"] 5 (#$ . 10721)]) #@23 (fn HOST USER REPO) (defalias 'magit-clone--format-url #[771 "\302\303B\304\305\306\307\310#)\266\203\203\202I\311\306\307\310#)\266\203\203D\312!\211\203;\211\305Q\202?\313\314\"\262\202I\305QBD\"\207" [magit-clone-url-format inhibit-changing-match-data format-spec 104 110 "/" nil t string-match "\\." magit-get user-error "Set %S or specify owner explicitly"] 14 (#$ . 11120)]) (provide 'magit-clone)