Ce serveur Gitlab sera éteint le 30 juin 2020, pensez à migrer vos projets vers les serveurs gitlab-research.centralesupelec.fr et gitlab-student.centralesupelec.fr !

Commit b0c8ec3a authored by Ryan Thompson's avatar Ryan Thompson

Merge pull request #551 from DarwinAwardWinner/shallow-git

Shallow git
parents f7d75165 771d5cdd
......@@ -300,6 +300,14 @@ definition provided by `el-get' recipes locally.
Currently this property only has meaning for `git' type
recipes. Other VCS-based methods may implement support in the
If set to t in a git recipe, git-clone will be run with
`--depth 1', which will create a so-called shallow clone by
not downloading all the history of the repository. The
default is controlled by the variable
`el-get-git-shallow-clone', which is nil by default.
:group 'el-get
......@@ -399,7 +407,9 @@ this is the name to fetch in that system"
(const :format "" :before) (function :format "%v"))
(group :inline t
:format "`After' Function (`Post-Init' recommended instead): %v"
(const :format "" :after) (function :format "%v")))
(const :format "" :after) (function :format "%v"))
;; TODO: `:checksum', `:checkout', `:shallow'
:inline t :tag "System-Specific Build Recipes"
(group :inline t
......@@ -48,6 +48,7 @@
;; - implement :checksum property for http kinds of files
;; - Add new command el-get-reinstall
;; - implement :checkout property for git packages
;; - implement :shallow property for git packages
;; 3.1 - 2011-09-15 - Get a fix
......@@ -19,6 +19,11 @@
:group 'el-get
:type 'hook)
(defcustom el-get-git-shallow-clone nil
"If t, then run git-clone with `--depth 1'."
:group 'el-get
:type 'boolean)
(defun el-get-git-executable ()
"Return git executable to use, or signal an error when not
......@@ -42,7 +47,11 @@ found."
(branch (plist-get source :branch))
(checkout (or (plist-get source :checkout)
(plist-get source :checksum)))
(shallow (if (plist-member source :shallow)
(plist-get source :shallow)
(clone-args (append '("--no-pager" "clone")
(when shallow '("--depth" "1"))
;; With :checkout, the "git checkout"
;; command is a separate step, so don't
;; https://github.com/dimitri/el-get/issues/176
;; Git clone should be done with the depth flag
(let ((debug-on-error t)
;; (el-get-byte-compile nil)
(el-get-verbose t)
(el-get-git-shallow-clone t))
(require 'el-get)
(el-get 'sync 'yasnippet))
;; After running the test, check the git log for yasnippet to see if
;; it only has a few log entries, rather than hundreds.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment