Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-dev@g.o
From: Michał Górny <mgorny@g.o>
Subject: [PATCH git-2.eclass 1/2] Clean up non-bare checkout before updating.
Date: Fri, 23 Dec 2011 15:34:55 +0100
Fixes: https://bugs.gentoo.org/show_bug.cgi?id=395247
---
 eclass/git-2.eclass |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/eclass/git-2.eclass b/eclass/git-2.eclass
index f1ed79f..4f0b65b 100644
--- a/eclass/git-2.eclass
+++ b/eclass/git-2.eclass
@@ -344,6 +344,8 @@ git-2_update_repo() {
 	if [[ ${EGIT_LOCAL_NONBARE} ]]; then
 		# checkout master branch and drop all other local branches
 		git checkout ${EGIT_MASTER} || die "${FUNCNAME}: can't checkout master branch ${EGIT_MASTER}"
+		git clean -d -f -x || die "${FUNCNAME}: failed to clean checkout dir"
+
 		for x in $(git branch | grep -v "* ${EGIT_MASTER}" | tr '\n' ' '); do
 			debug-print "${FUNCNAME}: git branch -D ${x}"
 			git branch -D ${x} > /dev/null
-- 
1.7.8.352.g876a6f.dirty



Replies:
Re: [PATCH git-2.eclass 1/2] Clean up non-bare checkout before updating.
-- Ulrich Mueller
[PATCH git-2.eclass 2/2] When constructing storedir, strip trailing '/.git' directory.
-- Michał Górny
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Lastrite: media-radio/fldigi (unless patched for fltk-1.3)
Next by thread:
[PATCH git-2.eclass 2/2] When constructing storedir, strip trailing '/.git' directory.
Previous by date:
[PATCH git-2.eclass 2/2] When constructing storedir, strip trailing '/.git' directory.
Next by date:
Re: New global USE flag "neon" for ARM NEON optimization(s)


Updated Jun 29, 2012

Summary: Archive of the gentoo-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.