FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 12-23-2011, 01:34 PM
Michał Górny
 
Default Clean up non-bare checkout before updating.

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 '
' ' '); do
debug-print "${FUNCNAME}: git branch -D ${x}"
git branch -D ${x} > /dev/null
--
1.7.8.352.g876a6f.dirty
 
Old 12-23-2011, 08:09 PM
Ulrich Mueller
 
Default Clean up non-bare checkout before updating.

>>>>> On Fri, 23 Dec 2011, Michał Górny wrote:

> Fixes: https://bugs.gentoo.org/show_bug.cgi?id=395247

> + git clean -d -f -x || die "${FUNCNAME}: failed to clean checkout dir"
> +

Why should there be untracked files, in the first place? (In the
"steps to reproduce" of bug 395247 such files are explicitly generated
by the user, which doesn't look like a valid usage case to me.)

Ulrich
 
Old 12-23-2011, 08:49 PM
Michał Górny
 
Default Clean up non-bare checkout before updating.

On Fri, 23 Dec 2011 22:09:26 +0100
Ulrich Mueller <ulm@gentoo.org> wrote:

> >>>>> On Fri, 23 Dec 2011, Michał Górny wrote:
>
> > Fixes: https://bugs.gentoo.org/show_bug.cgi?id=395247
>
> > + git clean -d -f -x || die "${FUNCNAME}: failed to
> > clean checkout dir" +
>
> Why should there be untracked files, in the first place? (In the
> "steps to reproduce" of bug 395247 such files are explicitly generated
> by the user, which doesn't look like a valid usage case to me.)

Yes, it is invalid. Yet I think it's better to clean up just in case
upstream pulling gone wrong (e.g. when upstream does rebase).

--
Best regards,
Michał Górny
 
Old 01-18-2012, 10:31 AM
Mike Frysinger
 
Default Clean up non-bare checkout before updating.

On Friday 23 December 2011 16:49:46 Michał Górny wrote:
> On Fri, 23 Dec 2011 22:09:26 +0100 Ulrich Mueller wrote:
> > >>>>> On Fri, 23 Dec 2011, Michał Górny wrote:
> > > Fixes: https://bugs.gentoo.org/show_bug.cgi?id=395247
> > >
> > > + git clean -d -f -x || die "${FUNCNAME}: failed to
> > > clean checkout dir" +
> >
> > Why should there be untracked files, in the first place? (In the
> > "steps to reproduce" of bug 395247 such files are explicitly generated
> > by the user, which doesn't look like a valid usage case to me.)
>
> Yes, it is invalid. Yet I think it's better to clean up just in case
> upstream pulling gone wrong (e.g. when upstream does rebase).

obviously i disagree. the point is to not duplicate both the network traffic
and the on-disk storage between the repos i've already checked out and portage
(i buy dedicated disks for my source code and it fills up quickly ... often
times faster than my music collection :P).

imo, the git eclass shouldn't be modifying that repo at all. instead, it
should be treating it merely as an object store and then cloning it with
something like --reference. if you want to create a new variable for these
semantics, that's fine (although kind of pointless i think since this clearly
isn't widely used), but the point of having these per-package repo overrides
in the first place was to easily share already checked out repos with portage.
-mike
 

Thread Tools




All times are GMT. The time now is 01:27 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org