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 6f0c9d93 authored by Ryan C. Thompson's avatar Ryan C. Thompson

Add support for ":shallow" property in git method

parent a30a6c50
......@@ -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