pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

git-package.mk: Try to fix fetching from branches



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Fri Dec 11 00:33:38 2015 +0100
Changeset:	b502d2c5ddbaae7f5dc0eb0431026c66d7286ebf

Modified Files:
	mk/git-package.mk

Log Message:
git-package.mk: Try to fix fetching from branches

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=b502d2c5ddbaae7f5dc0eb0431026c66d7286ebf

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 mk/git-package.mk | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diffs:
diff --git a/mk/git-package.mk b/mk/git-package.mk
index 8a2a005..48c5da9 100644
--- a/mk/git-package.mk
+++ b/mk/git-package.mk
@@ -109,15 +109,17 @@ _GIT_CREATE_CACHE.${repo}=	\
 
 #   fetch git repo or update cached one
 _GIT_FETCH_REPO.${repo}=	\
-	if [ -d ${GIT_MODULE.${repo}:Q} ]; then					\
-	  ${STEP_MSG} "Updating GIT archive "${GIT_MODULE.${repo}:Q}".";	\
-	  ${SETENV} ${_GIT_ENV} ${_GIT_CMD} -C ${GIT_MODULE.${repo}:Q} fetch	\
-	    ${_GIT_FETCH_FLAGS};						\
-	else									\
+	if [ ! -d ${GIT_MODULE.${repo}:Q} ]; then				\
 	  ${STEP_MSG} "Cloning GIT archive "${GIT_MODULE.${repo}:Q}".";		\
 	  ${SETENV} ${_GIT_ENV} ${_GIT_CMD} clone ${_GIT_CLONE_FLAGS} 		\
 	    ${GIT_REPO.${repo}:Q} ${GIT_MODULE.${repo}:Q};			\
 	fi;									\
+	${STEP_MSG} "Fetching remote branches of "${_GIT_FLAG.${repo}:Q}".";	\
+	${SETENV} ${_GIT_ENV} ${_GIT_CMD} -C ${GIT_MODULE.${repo}:Q}		\
+	  remote set-branches origin '*';					\
+	${STEP_MSG} "Updating GIT archive "${GIT_MODULE.${repo}:Q}".";		\
+	${SETENV} ${_GIT_ENV} ${_GIT_CMD} -C ${GIT_MODULE.${repo}:Q}		\
+	  fetch ${_GIT_FETCH_FLAGS};						\
 	${STEP_MSG} "Checking out GIT "${_GIT_FLAG.${repo}:Q}".";		\
 	${SETENV} ${_GIT_ENV} ${_GIT_CMD} -C ${GIT_MODULE.${repo}:Q}		\
 	  checkout ${_GIT_CHECKOUT_FLAGS} ${_GIT_FLAG.${repo}:Q}


Home | Main Index | Thread Index | Old Index