Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 306545 | Differences between
and this patch

Collapse All | Expand All

(-)git.eclass.orig (-11 / +11 lines)
Lines 247-258 git_fetch() { Link Here
247
	debug-print "${FUNCNAME}: EGIT_OPTIONS = \"${EGIT_OPTIONS}\""
247
	debug-print "${FUNCNAME}: EGIT_OPTIONS = \"${EGIT_OPTIONS}\""
248
248
249
	GIT_DIR="${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}"
249
	GIT_DIR="${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}"
250
	# we also have to remove all shallow copied repositories
251
	# and fetch them again
252
	if [[ -e "${GIT_DIR}/shallow" ]]; then
253
		rm -rf "${GIT_DIR}"
254
		einfo "The ${EGIT_CLONE_DIR} was shallow copy. Refetching."
255
	fi
256
	# repack from bare copy to normal one
250
	# repack from bare copy to normal one
257
	if ${EGIT_HAS_SUBMODULES} && [[ -d ${GIT_DIR} && ! -d "${GIT_DIR}/.git/" ]]; then
251
	if ${EGIT_HAS_SUBMODULES} && [[ -d ${GIT_DIR} && ! -d "${GIT_DIR}/.git/" ]]; then
258
		rm -rf "${GIT_DIR}"
252
		rm -rf "${GIT_DIR}"
Lines 358-375 git_fetch() { Link Here
358
	${elogcmd} "   branch: 			${EGIT_BRANCH}"
352
	${elogcmd} "   branch: 			${EGIT_BRANCH}"
359
	${elogcmd} "   storage directory: 	\"${GIT_DIR}\""
353
	${elogcmd} "   storage directory: 	\"${GIT_DIR}\""
360
354
355
	pushd "${GIT_DIR}" &> /dev/null
361
	if ${EGIT_HAS_SUBMODULES}; then
356
	if ${EGIT_HAS_SUBMODULES}; then
362
		pushd "${GIT_DIR}" &> /dev/null
363
		debug-print "rsync -rlpgo . \"${S}\""
357
		debug-print "rsync -rlpgo . \"${S}\""
364
		time rsync -rlpgo . "${S}"
358
		time rsync -rlpgo . "${S}"
365
		popd &> /dev/null
366
	else
359
	else
367
		unset GIT_DIR
360
		mkdir "${S}"
368
		debug-print "git clone -l -s -n \"${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}\" \"${S}\""
361
		debug-print "rsync -rlpgo . \"${S}/.git\""
369
		git clone -l -s -n "${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}" "${S}"
362
		time rsync -rlpgo . "${S}/.git"
370
	fi
363
	fi
364
	unset GIT_DIR
365
	popd &> /dev/null
371
366
372
	pushd "${S}" &> /dev/null
367
	pushd "${S}" &> /dev/null
368
	if ! ${EGIT_HAS_SUBMODULES}; then
369
		# need to reinit the repo and check it out
370
		git init || die
371
		git checkout || die
372
	fi
373
	git_branch
373
	git_branch
374
	# submodules always reqire net (thanks to branches changing)
374
	# submodules always reqire net (thanks to branches changing)
375
	[[ -n ${EGIT_OFFLINE} ]] || git_submodules
375
	[[ -n ${EGIT_OFFLINE} ]] || git_submodules

Return to bug 306545