;ELC ;;; Compiled by mwolson@grepfind.mwolson.org on Thu Jan 24 00:15:32 2008 ;;; from file /stuff/proj/emacs/dvc/mwolson/lisp/xgit-core.el ;;; in Emacs version 23.0.50.2 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. (if (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.29"))) (error "`xgit-core.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\302\303\304\305\306\307%\207" [require dvc-core custom-declare-group dvc-xgit nil "Git support in dvc" :group dvc] 6) #@53 The executable used for the git commandline client. (custom-declare-variable 'xgit-executable '"git" '(#$ . 740) :type 'string :group 'dvc-xgit) #@84 A mapping from the root of a directory tree to the desired git metadata directory. (custom-declare-variable 'xgit-git-dir-mapping 'nil '(#$ . 891) :type '(repeat (list :tag "Rule" (regexp :tag "Root dir") (directory :tag "Git dir"))) :group 'dvc-xgit) #@129 The filename, used to store the log message before commiting. Usually that file is placed in the tree-root of the working tree. (defvar xgit-log-edit-file-name "++xgit-log-edit" (#$ . 1150)) #@305 Check to see whether the user has specified a custom git metadata directory in `xgit-git-dir-mapping'. If root is non-nil, return the tree root, which is guaranteed to end with a trailing slash. Otherwise, return the git metadata directory. If no rule from `xgit-git-dir-mapping' matches, return nil. (defalias 'xgit-lookup-external-git-dir #[(&optional location root) "\303\206 !\304 \305\216\306\307\215*\207" [location default-directory save-match-data-internal file-name-as-directory match-data ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) found (byte-code "\306\211\2034\n@\307\310\311 @!\312Q \"\203-\313\314\f\203%\315\316 \"\202+ \211A@)\"\210\nA\211\204*\306\207" [xgit-git-dir-mapping rule #1=#:--cl-dolist-temp-- location root x nil string-match "^" directory-file-name "/" throw found match-string 0] 6)] 2 (#$ . 1348)]) #@301 Return the tree root for LOCATION, nil if not in a local tree. Computation is done from withing Emacs, by looking at an .git/ directory in a parent buffer of LOCATION. This is therefore very fast. If NO-ERROR is non-nil, don't raise an error if LOCATION is not a git managed tree (but return nil). (defalias 'xgit-tree-root #[(&optional location no-error interactive) "\303\304\"\206\305\306 \206t\307\n%\207" [location interactive no-error xgit-lookup-external-git-dir t dvc-tree-root-helper ".git/" "%S is not in a git tree!"] 6 (#$ . 2249)]) #@99 Return t, if the git repository has a valid HEAD entry. It will be nil before the initial commit. (defalias 'xgit-tree-has-head #[nil "\300\301 \302P!\207" [file-readable-p xgit-tree-root ".git/HEAD"] 3 (#$ . 2808)]) #@58 Utility function to add --git-dir option to git command. (defalias 'xgit-git-dir #[(&optional location) "\303!\304\305 \206 \306!\307\206\n!\" \203\310\202\311Q)\207" [location git-dir default-directory xgit-lookup-external-git-dir "--git-dir=" file-relative-name xgit-tree-root file-name-as-directory "" ".git"] 5 (#$ . 3031)]) (byte-code "\301B\302\303!\207" [current-load-list xgit-hash-regexp (lambda (#1=#:defconst-tmp-var) (defconst xgit-hash-regexp #1#)) "[0-9a-f]\\{40\\}"] 2) #@37 Prepare the environment to run git. (defalias 'xgit-prepare-environment #[(env) "\302 \211\205 \303PC\304C\244 \244)\207" [git-dir env xgit-lookup-external-git-dir "GIT_DIR=" "GIT_PAGER=cat"] 3 (#$ . 3535)]) (provide 'xgit-core)