;ELC ;;; Compiled ;;; in Emacs version 26.3 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\207" [require ert gited] 2) (defvar gited-user-name "John Doe") (defvar gited-user-email "john.doe@example.com") (defvar gited-initial-commit-msg "Initialize repository.") (defvar gited-initial-filename "foo") (defvar gited-initial-file-content "Test file") (defvar gited-remote-repo "https://github.com/calancha/foo") (defvar gited-remote-repo-branch "fail-say-foo-test") (defvar gited-remote-repo-file "do_not_delete.el") #@71 Create a new repository at DIR and return its gited buffer. (fn DIR) (defalias 'gited-create-new-repo #[257 "\306\307 \310\311\n\"#\210\312!\210\313\314!\210\313\315\316 E!\210\313\315\317\fE!\210\313\320\nD!\210\313\321\322 E!\210\323\324!\210)\207" [inhibit-message gited-initial-file-content gited-initial-filename gited-user-email gited-user-name gited-initial-commit-msg t write-region nil expand-file-name dired gited-git-command ("init") "config" "user.email" "user.name" "add" "commit" "-m" gited-list-branches "local" gited-buffer] 7 (#$ . 867)]) #@225 Create a new Git repository at DIR and evaluate BODY. The repository consists of just one file with content `gited-initial-file-content'. The forms in BODY are evaluated with DIR as `default-directory'. (fn DIR &rest BODY) (defalias 'with-gited-repo '(macro . #[385 "\300\301\302\303\304DBB\305\306BBEE\207" [let* ((gited-expert t) (inhibit-message t)) unwind-protect progn gited-create-new-repo delete-directory ('recursive)] 9 (#$ . 1436)])) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put with-gited-repo lisp-indent-function 1 put edebug-form-spec (form body)] 5) #@171 Fix branch completions to BRANCH and evaluate BODY. This macro uses `cl-letf' to temporary fix the completions. Return the last evaled BODY form. (fn BRANCH &rest BODY) (defalias 'with-specified-completion-branch '(macro . #[385 "\300\301\302\303EDCBB\207" [cl-letf (symbol-function 'completing-read) lambda (&rest _)] 7 (#$ . 2035)])) (byte-code "\300\301\302\303#\304\301\305\306#\210\307\310\311\312\310\313\314\313\315\313&\"\210\307\316\311\312\316\313\317\313\315\313&\"\210\307\320\311\312\320\321\322\313\315\313&\"\210\307\323\311\312\323\324\325\313\315\313&\"\210\307\326\311\312\326\327\330\313\315\313&\"\210\307\331\311\312\331\332\333\313\315\313&\"\210\334\335!\207" [function-put with-specified-completion-branch lisp-indent-function 1 put edebug-form-spec (form body) ert-set-test gited-test1 record ert-test nil #[0 "\306C\3071\310 )C0\202\311\240\210\211@AD\262\312C\313C\3141A\315\316\317\320\321$\322\"\323$\216\324\242\"\240)0\202C\210\313\204K\325\242!\210\266\326\327\330\"\331\211\315\316\332\320\321!\333\"\334$\216\335!\210\336C\3371p\3130\202{\311\240\210\211@AD\262\340C\313C\315\316\317\320\321$\341\"\323$\216\324\242\"\240)\204\242\342\242!\210\266\343C\3441\257\3130\202\272\311\240\210\211@AD\262\345C\313C\315\316\317\320\321$\346\"\323$\216\324\242\"\240)\204\341\342\242!\210\266\347C\3501\364\310\f\351 )D0\202\377\311\240\210\211@AD\262\352C\313C\315\316\317\320\321$\353\"\323$\216\324\242\"\240)\204&\342\242!\210\266\347C\35419\310\355\356 )D0\202D\311\240\210\211@AD\262\357C\313C\315\316\317\320\321$\360\"\323$\216\324\242\"\240)\204k\342\242!\210\266\361C\3621|\310 )C0\202\207\311\240\210\211@AD\262\363C\313C\315\316\317\320\321$\364\"\323$\216\324\242\"\240)\203\256\342\242!\210\266\365\355 \"\210\361C\3661\304\310 )C0\202\317\311\240\210\211@AD\262\367C\313C\315\316\317\320\321$\370\"\323$\216\324\242\"\240)\204\366\342\242!\210\266\371 \210\372C\3731\f\310\374\375 )D0\202\311\240\210\211@AD\262\376C\313C\315\316\317\320\321$\377\"\323$\216\324\242\"\240)\204>\342\242!\210\266\201A \210\372C\201B1X\310\316\375 )D0\202c\311\240\210\211@AD\262\201CC\313C\315\316\317\320\321$\201D\"\323$\216\324\242\"\240)\204\216\342\242!\210\266.\201E \203\241\201F\201G!\210\315\316\201H\320\321!\201I\"\334$\216\201J\313 \"\210 .\201K\201L\313 #\210\201M\201N D!\210\201M\201O!\210\201P\201Q!r\211q\210\315\316\201R\320\321!\201S\"\374$\216\201M\201Tp\"\210\201UdS{*\262\201V!\210\372C\201W1\310\201U\375 )D0\202*\311\240\210\211@AD\262\201XC\313C\315\316\317\320\321$\201Y\"\323$\216\324\242\"\240)\204U\342\242!\210\266\201A \210\201Z !\210\372C\201[1w\310\201U\375 )D0\202\202\311\240\210\211@AD\262\201\\C\313C\315\316\317\320\321$\201]\"\323$\216\324\242\"\240)\204\255\342\242!\210\266\201A \210\201^\201_!\210\372C\201`1\321\310\201U\375 )D0\202\334\311\240\210\211@AD\262\201aC\313C\315\316\317\320\321$\201b\"\323$\216\324\242\"\240)\204\342\242!\210\266\201A \210\201c\201d\201e\201f \"!\210\372C\201g15\310\201h G\375 )D0\202@\311\240\210\211@AD\262\201iC\313C\315\316\317\320\321$\201j\"\323$\216\324\242\"\240)\204k\342\242!\210\266\201A \210\201c\201d\201e\201k\201f \201l\201m!\"\"!\210\372C\201n1\240\310\316\375 )D0\202\253\311\240\210\211@AD\262\201oC\313C\315\316\317\320\321$\201p\"\323$\216\324\242\"\240)\204\326\342\242!\210\266\201A \210)\210\365 \201q\"\210\201r \201s\"\210\201t \210\361C\201u1\310 )C0\202\311\240\210\211@AD\262\201vC\313C\315\316\317\320\321$\201w\"\323$\216\324\242\"\240)\203;\342\242!\210\266\201x\201q \"\210@\203V\201y\201z!\210\202F\361C\201{1g\310 )C0\202r\311\240\210\211@AD\262\201|C\313C\315\316\317\320\321$\201}\"\323$\216\324\242\"\240)\204\235\342\242!\210\210\211\242\262\266\202+\207" [signal-hook-function vc-git-program gited-expert inhibit-message gited-initial-commit-msg gited-initial-filename executable-find (error) ert--should-signal-hook signal #1=#:ert-form-evaluation-aborted-2759 nil (error) make-byte-code 0 "\303\304C\305\300\242\301BD\244\306\302\242\307\"?\205\310\302\242D\244\311\312N\211\205%\313\314\301\"D\262\244\240\210\315\303\242!\207" vconcat vector [(skip-unless (executable-find vc-git-program)) :form eql #1# :value executable-find ert-explainer :explanation apply ert--signal-should-execution] 7 apply ert-skip make-temp-file "gited" dir t "\301\300\302\"\207" [delete-directory recursive] 3 gited-create-new-repo gited-dir-under-Git-control-p (error) #2=#:ert-form-evaluation-aborted-2764 [(should (gited-dir-under-Git-control-p)) :form eql #2# :value gited-dir-under-Git-control-p ert-explainer :explanation apply ert--signal-should-execution] ert-fail gited-buffer-p (error) #3=#:ert-form-evaluation-aborted-2769 [(should (gited-buffer-p)) :form eql #3# :value gited-buffer-p ert-explainer :explanation apply ert--signal-should-execution] equal (error) gited--last-commit-title #4=#:ert-form-evaluation-aborted-2774 [(should (equal gited-initial-commit-msg (gited--last-commit-title))) :form eql #4# :value equal ert-explainer :explanation apply ert--signal-should-execution] (error) #5="master" gited-current-branch #6=#:ert-form-evaluation-aborted-2779 [(should (equal #5# (gited-current-branch))) :form eql #6# :value equal ert-explainer :explanation apply ert--signal-should-execution] gited-branch-exists-p (error) #7=#:ert-form-evaluation-aborted-2784 [(should-not (gited-branch-exists-p gited-initial-filename)) :form eql #7# :value gited-branch-exists-p ert-explainer :explanation apply ert--signal-should-execution] gited-copy-branch (error) #8=#:ert-form-evaluation-aborted-2789 [(should (gited-branch-exists-p gited-initial-filename)) :form eql #8# :value gited-branch-exists-p ert-explainer :explanation apply ert--signal-should-execution] gited-toggle-marks = (error) 2 gited-number-marked #9=#:ert-form-evaluation-aborted-2794 [(should (= 2 (gited-number-marked))) :form eql #9# :value = ert-explainer :explanation apply ert--signal-should-execution] gited-branch-after-op gited-unmark-all-marks (error) #10=#:ert-form-evaluation-aborted-2799 [(should (zerop (gited-number-marked))) :form eql #10# :value = ert-explainer :explanation apply ert--signal-should-execution] gited-modified-files-p user-error "Cannot checkout a new branch: there are modified files" "\302\303\300\"\210\300\211\207" [gited-current-branch gited-git-checkout nil] gited-git-checkout write-region "Changed this file" gited-git-command "add" ("commit" "-m" "Update file") generate-new-buffer " *temp*" "\301\300!\205 \302\300!\207" [buffer-name kill-buffer] ("rev-parse" "HEAD") 1 gited-mark-branches-containing-commit (error) #11=#:ert-form-evaluation-aborted-2804 [(should (= 1 (gited-number-marked))) :form eql #11# :value = ert-explainer :explanation apply ert--signal-should-execution] gited-mark-branches-regexp (error) #12=#:ert-form-evaluation-aborted-2809 [(should (= 1 (gited-number-marked))) :form eql #12# :value = ert-explainer :explanation apply ert--signal-should-execution] gited-mark-branches-containing-regexp "Update" (error) #13=#:ert-form-evaluation-aborted-2814 [(should (= 1 (gited-number-marked))) :form eql #13# :value = ert-explainer :explanation apply ert--signal-should-execution] gited-mark-branches-by-date format-time-string "%F" current-time (error) gited-listed-branches #14=#:ert-form-evaluation-aborted-2819 [(should (= (length (gited-listed-branches)) (gited-number-marked))) :form eql #14# :value = ert-explainer :explanation apply ert--signal-should-execution] time-add seconds-to-time 604800 (error) #15=#:ert-form-evaluation-aborted-2824 [(should (zerop (gited-number-marked))) :form eql #15# :value = ert-explainer :explanation apply ert--signal-should-execution] "bar" gited-delete-branch force gited-update (error) #16=#:ert-form-evaluation-aborted-2829 [(should-not (gited-branch-exists-p gited-initial-filename)) :form eql #16# :value gited-branch-exists-p ert-explainer :explanation apply ert--signal-should-execution] gited-rename-branch sit-for 0.05 (error) #17=#:ert-form-evaluation-aborted-2834 [(should (gited-branch-exists-p gited-initial-filename)) :form eql #17# :value gited-branch-exists-p ert-explainer :explanation apply ert--signal-should-execution]] 17] :passed gited-test2 #[0 "\306C\3071\310 )C0\202\311\240\210\211@AD\262\312C\313C\3141A\315\316\317\320\321$\322\"\323$\216\324\242\"\240)0\202C\210\313\204K\325\242!\210\266\326\327\330\"\331\211\313C\332!\210\315\316\333\320\321\"\334\"\335$\216\336\337\fD!\210\211\340\341\342!!\240\210\343\344!\210\345C\3461\214\310\347 )D0\202\227\311\240\210\211@AD\262\350C\313C\315\316\317\320\321$\351\"\323$\216\324\242\"\240)\204\276\352\242!\210\266\353C\3541\313\3130\202\326\311\240\210\211@AD\262\355C\313C\313\315\316\356\320\321!\357\"\360$\3611\f\315\316\317\320\321\n\n\n\n$\362\"\323$\216\324\242\"\240)0\202\331\262\363\364\313$\210\240\262\210\204*\352\365 \366\367D\"!\210\266\343\370!\210\371\372@P@\"\210\343\344!\210\373\374!\210\375\376K\315\316\377\320\321!\201B\"\201C$\216\376M\210\201D\374!\210)\266\201EA!\210\201FC\201G1\201\310\201H\201I )D0\202\214\311\240\210\211@AD\262\201JC\313C\315\316\317\320\321$\201K\"\323$\216\324\242\"\240)\203\267\352\242!\210\210\211\242\262\266\202+\207" [signal-hook-function vc-git-program gited-expert inhibit-message gited-remote-repo gited-current-remote-rep executable-find (error) ert--should-signal-hook signal #18=#:ert-form-evaluation-aborted-2839 nil (error) make-byte-code 0 "\303\304C\305\300\242\301BD\244\306\302\242\307\"?\205\310\302\242D\244\311\312N\211\205%\313\314\301\"D\262\244\240\210\315\303\242!\207" vconcat vector [(skip-unless (executable-find vc-git-program)) :form eql #18# :value executable-find ert-explainer :explanation apply ert--signal-should-execution] 7 apply ert-skip make-temp-file "gited" dir t cd "\302\300\303\"\210\304\301\242!\207" [delete-directory recursive kill-buffer] 3 gited-git-command "clone" dired expand-file-name "foo" gited-list-branches "local" equal (error) #19="origin" #20=#:ert-form-evaluation-aborted-2844 [(should (equal #19# gited-current-remote-rep)) :form eql #20# :value equal ert-explainer :explanation apply ert--signal-should-execution] ert-fail gited-change-current-remote-rep (error) #21=#:ert-form-evaluation-aborted-2849 "\300\242\207" [] 1 (error) [(should-error (gited-change-current-remote-rep)) :form eql #21# :value gited-change-current-remote-rep ert-explainer :explanation apply ert--signal-should-execution] ert--should-error-handle-error error append :fail-reason "did not signal an error" "remote" gited-copy-branch "origin/" gited-goto-branch "master" #[128 "\207" [gited-remote-repo-branch] 2 "\n\n(fn &rest _)"] completing-read "\301\300M\207" gited-remote-repo-branch gited-remote-repo-file [completing-read] 2 gited-merge-branch load-file eq (error) foo say-foo #22=#:ert-form-evaluation-aborted-2856 [(should-not (eq 'foo (say-foo))) :form eql #22# :value eq ert-explainer :explanation apply ert--signal-should-execution]] 18] gited-ci-load "Tests to see whether gited-ci has been loaded." #[0 "\300C\3011\f\302C0\202\303\240\210\211@AD\262\304C\305C\306\307\310\311\312$\313\"\314$\216\315\242\"\240)\204>\316\242!\210\210\211\242\262\207" [fboundp (error) gited-parse-ci-status signal #23=#:ert-form-evaluation-aborted-2861 nil make-byte-code 0 "\303\304C\305\300\242\301BD\244\306\302\242\307\"?\205\310\302\242D\244\311\312N\211\205%\313\314\301\"D\262\244\240\210\315\303\242!\207" vconcat vector [(should (fboundp 'gited-parse-ci-status)) :form eql #23# :value fboundp ert-explainer :explanation apply ert--signal-should-execution] 7 apply ert-fail] 13] gited-test-add-patch-bug "Tests for bug in `gited-add-patched-files'." #[0 "\304C\3051\306 )C0\202\307\240\210\211@AD\262\310C\311C\3121A\313\314\315\316\317$\320\"\321$\216\322\242\"\240)0\202C\210\311\204K\323\242!\210\266\324\325\326\"\324\327\326\"\330!\330!\331\313\314\332\316\317\"\333\"\334$\216\335!\210\336\337\311 #\210\335!\210\340\341\342\"!\210\336\343\311\344 P#\210\345C\3461\231\306\347 )C0\202\244\307\240\210\211@AD\262\350C\311C\313\314\315\316\317$\351\"\321$\216\322\242\"\240)\204\313\352\242!\210\266\335!\210\345C\3531\341\306\354 )C0\202\354\307\240\210\211@AD\262\355C\311C\313\314\315\316\317$\356\"\321$\216\322\242\"\240)\204\352\242!\210\210\211\242\262\266\202*\207" [signal-hook-function vc-git-program inhibit-message gited-initial-filename executable-find (error) ert--should-signal-hook signal #24=#:ert-form-evaluation-aborted-2866 nil (error) make-byte-code 0 "\303\304C\305\300\242\301BD\244\306\302\242\307\"?\205\310\302\242D\244\311\312N\211\205%\313\314\301\"D\262\244\240\210\315\303\242!\207" vconcat vector [(skip-unless (executable-find vc-git-program)) :form eql #24# :value executable-find ert-explainer :explanation apply ert--signal-should-execution] 7 apply ert-skip make-temp-file "gited-1" dir "gited-2" gited-create-new-repo t "\302\300\303\"\210\302\301\303\"\207" [delete-directory recursive] 3 pop-to-buffer write-region "Changed this file" mkdir expand-file-name "subdir" "New nested file" "subdir/" gited-add-patched-files (error) gited-untracked-files #25=#:ert-form-evaluation-aborted-2871 [(should (gited-add-patched-files (gited-untracked-files))) :form eql #25# :value gited-add-patched-files ert-explainer :explanation apply ert--signal-should-execution] ert-fail (error) gited-modified-files #26=#:ert-form-evaluation-aborted-2876 [(should (gited-add-patched-files (gited-modified-files))) :form eql #26# :value gited-add-patched-files ert-explainer :explanation apply ert--signal-should-execution]] 17] gited-diff-test "Test for `gited-diff'.\nCreate a repository with 2 identical branches, `master' and `foo'.\nEach branch contains just one file `foo'. Since this file has same name as one\nof the branches, then we must add '--' after the versions.\nFor example, the Git command to get the diff between the 2 branches is as follows:\ngit diff master foo --." #[0 "\305C\3061\307 )C0\202\310\240\210\211@AD\262\311C\312C\3131A\314\315\316\317\320$\321\"\322$\216\323\242\"\240)0\202C\210\312\204K\324\242!\210\266\325\326\327\"\330\211\330\314\315\331\317\320!\332\"\333$\216\334!\210\335\336\f\"\210\337\340K\314\315\341\317\320!\342\"\343$\216\340M\210\344C\3451\213\336C0\202\226\310\240\210\211@AD\262\346C\312C\314\315\316\317\320$\347\"\322$\216\323\242\"\240)\203\275\350\242!\210\210\211\242\262\266\202)\266\202,\207" [signal-hook-function vc-git-program inhibit-message gited-expert gited-initial-filename executable-find (error) ert--should-signal-hook signal #27=#:ert-form-evaluation-aborted-2881 nil (error) make-byte-code 0 "\303\304C\305\300\242\301BD\244\306\302\242\307\"?\205\310\302\242D\244\311\312N\211\205%\313\314\301\"D\262\244\240\210\315\303\242!\207" vconcat vector [(skip-unless (executable-find vc-git-program)) :form eql #27# :value executable-find ert-explainer :explanation apply ert--signal-should-execution] 7 apply ert-skip make-temp-file "gited" dir t "\301\300\302\"\207" [delete-directory recursive] 3 gited-create-new-repo gited-copy-branch "master" #[128 "\207" [gited-initial-filename] 2 "\n\n(fn &rest _)"] completing-read "\301\300M\207" [completing-read] 2 gited-diff (error) #28=#:ert-form-evaluation-aborted-2886 [(should-not (gited-diff "master")) :form eql #28# :value gited-diff ert-explainer :explanation apply ert--signal-should-execution] ert-fail] 17] gited-output-buffer-default-directory-test "Test that `gited-output-buffer' `default-directory' equals `gited-top-level-dir'." #[0 "\306C\3071\310 )C0\202\311\240\210\211@AD\262\312C\313C\3141A\315\316\317\320\321$\322\"\323$\216\324\242\"\240)0\202C\210\313\204K\325\242!\210\266\326\327\330\"\331\332\"\331\333\"\334\313\334\211\315\316\335\320\321!\336\"\337$\216\340!\210\f\262\341!\210\342\343\313#\210\344\345D!\210\344\346!\210\347!\210r\350 q\210\351C\3521\241\310 )D0\202\254\311\240\210\211@AD\262\353C\313C\315\316\317\320\321$\354\"\323$\216\324\242\"\240)\204\323\355\242!\210\210\211\242\262\266\202-\207" [signal-hook-function vc-git-program inhibit-message gited-expert gited-toplevel-dir default-directory executable-find (error) ert--should-signal-hook signal #29=#:ert-form-evaluation-aborted-2891 nil (error) make-byte-code 0 "\303\304C\305\300\242\301BD\244\306\302\242\307\"?\205\310\302\242D\244\311\312N\211\205%\313\314\301\"D\262\244\240\210\315\303\242!\207" vconcat vector [(skip-unless (executable-find vc-git-program)) :form eql #29# :value executable-find ert-explainer :explanation apply ert--signal-should-execution] 7 apply ert-skip make-temp-file "gited" dir expand-file-name "subdir" "new-file" t "\301\300\302\"\207" [delete-directory recursive] 3 gited-create-new-repo make-directory write-region "hello" gited-git-command "add" ("commit" "-m" "Add new-file inside a subdir") cd gited--output-buffer equal (error) #30=#:ert-form-evaluation-aborted-2896 [(should (equal default-directory toplevel-dir)) :form eql #30# :value equal ert-explainer :explanation apply ert--signal-should-execution] ert-fail] 18] provide gited-tests] 11)