[prev in list] [next in list] [prev in thread] [next in thread]
List: gentoo-dev
Subject: [gentoo-dev] [PATCH git-r3 05/10] Introduce EGIT_CLONE_TYPE for future use.
From: Michał Górny <mgorny () gentoo ! org>
Date: 2014-02-26 11:59:09
Message-ID: 1393415954-19313-5-git-send-email-mgorny () gentoo ! org
[Download RAW message or body]
In this commit, it's just 'mirror' explained :).
---
eclass/git-r3.eclass | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
index 8462fba..9c8508a 100644
--- a/eclass/git-r3.eclass
+++ b/eclass/git-r3.eclass
@@ -32,6 +32,19 @@ if [[ ! ${_INHERITED_BY_GIT_2} ]]; then
DEPEND="dev-vcs/git"
fi
+# @ECLASS-VARIABLE: EGIT_CLONE_TYPE
+# @DESCRIPTION:
+# Type of clone that should be used against the remote repository.
+# This can be either of: 'mirror'.
+#
+# The 'mirror' type clones all remote branches and tags with complete
+# history and all notes. EGIT_COMMIT can specify any commit hash.
+# Upstream-removed branches and tags are purged from the local clone
+# while fetching. This mode is suitable for cloning the local copy
+# for development or hosting a local git mirror. However, clones
+# of repositories with large diverged branches may quickly grow large.
+: ${EGIT_CLONE_TYPE:=mirror}
+
# @ECLASS-VARIABLE: EGIT3_STORE_DIR
# @DESCRIPTION:
# Storage directory for git sources.
@@ -107,6 +120,14 @@ fi
_git-r3_env_setup() {
debug-print-function ${FUNCNAME} "$@"
+ # check the clone type
+ case "${EGIT_CLONE_TYPE}" in
+ mirror)
+ ;;
+ *)
+ die "Invalid EGIT_CLONE_TYPE=${EGIT_CLONE_TYPE}"
+ esac
+
local esc_pn livevar
esc_pn=${PN//[-+]/_}
--
1.8.3.2
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic