Browse files

Clone git repositories with '--depth 1'

We are only interested in the most recent version.
  • Loading branch information...
1 parent 79a63f8 commit 0fbc1903f8d516e03af319419ae90ea1811dbe55 @larsclausen larsclausen committed Jul 27, 2011
Showing with 3 additions and 3 deletions.
  1. +1 −1 include/download.mk
  2. +2 −2 include/kernel-defaults.mk
View
2 include/download.mk
@@ -87,7 +87,7 @@ define DownloadMethod/git
cd $(TMP_DIR)/dl && \
rm -rf $(SUBDIR) && \
[ \! -d $(SUBDIR) ] && \
- git clone $(URL) $(SUBDIR) && \
+ git clone --depth 1 $(URL) $(SUBDIR) && \
(cd $(SUBDIR) && git checkout $(VERSION)) && \
echo "Packing checkout..." && \
rm -rf $(SUBDIR)/.git && \
View
4 include/kernel-defaults.mk
@@ -36,11 +36,11 @@ ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
else
ifeq ($(strip $(CONFIG_KERNEL_GIT_LOCAL_REPOSITORY)),"")
define Kernel/Prepare/Default
- git clone $(CONFIG_KERNEL_GIT_CLONE_URI) $(LINUX_DIR)
+ git clone --depth 1 $(CONFIG_KERNEL_GIT_CLONE_URI) $(LINUX_DIR)
endef
else
define Kernel/Prepare/Default
- git clone --reference $(CONFIG_KERNEL_GIT_LOCAL_REPOSITORY) $(CONFIG_KERNEL_GIT_CLONE_URI) $(LINUX_DIR)
+ git clone --depth 1 --reference $(CONFIG_KERNEL_GIT_LOCAL_REPOSITORY) $(CONFIG_KERNEL_GIT_CLONE_URI) $(LINUX_DIR)
endef
endif
endif

0 comments on commit 0fbc190

Please sign in to comment.