All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Jeff King <peff@peff.net>
Cc: "David Aguilar" <davvid@gmail.com>,
	"Junio C Hamano" <gitster@pobox.com>,
	"Daniel Barkalow" <barkalow@iabervon.org>,
	"Nguy?? n Thái Ngọc Duy" <pclouds@gmail.com>,
	"GIT Mailing-list" <git@vger.kernel.org>
Subject: Re: Overriding ~/.gitconfig using GIT_CONFIG
Date: Mon, 05 Sep 2011 20:29:50 +0100	[thread overview]
Message-ID: <1315250990.1243.14.camel@ted> (raw)
In-Reply-To: <20110830184951.GA19204@sigill.intra.peff.net>

On Tue, 2011-08-30 at 14:49 -0400, Jeff King wrote:
> On Tue, Aug 30, 2011 at 07:39:05PM +0100, Richard Purdie wrote:
> 
> > On Tue, 2011-08-30 at 11:56 -0400, Jeff King wrote:
> > > On Tue, Aug 30, 2011 at 01:13:01PM +0100, Richard Purdie wrote:
> > > 
> > > > We've gone through several iterations of this but as things stand now,
> > > > to initially clone things we're doing:
> > > > 
> > > > git clone --bare --mirror <url> <dir>
> > > > 
> > > > but if we already have some existing clone we'd update with:
> > > > 
> > > > git remote prune origin
> > > > git remote rm origin
> > > > git remote add --mirror origin <url>
> > > > git fetch --all -t
> > > >
> > > > [...]
> > > >
> > > > So if a user has an origin remote in their .gitconfig, can we ignore it?
> > > 
> > > Wouldn't:
> > > 
> > >   git fetch --prune <url> refs/heads/*:refs/remotes/origin/*
> > > 
> > > do what you want, and not look at config at all?
> > 
> > Since this is a bare/mirror clone, wouldn't that need to be:
> > 
> >  git fetch --prune <url> refs/heads/*:refs/heads/*
> 
> Sorry, yes, I forgot about the mirroring bit.
> 
> > That also wouldn't fetch tags?
> 
> It would only do autofollowing. You could use "-t", but if you really
> want a straight mirror, you could do:
> 
>   git fetch --prune refs/*:refs/*
> 
> to get everything.

Thanks. Just to updated, I've changed the code to do this so we'll see
how it goes...

Cheers,

Richard

      reply	other threads:[~2011-09-05 19:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-12 15:38 Overriding ~/.gitconfig using GIT_CONFIG Richard Purdie
2011-08-12 19:16 ` Junio C Hamano
2011-08-12 19:39   ` Junio C Hamano
2011-08-12 20:44     ` Richard Purdie
2011-08-28 13:05       ` David Aguilar
2011-08-29 12:16         ` Richard Purdie
2011-08-30  3:10           ` David Aguilar
2011-08-30 12:13             ` Richard Purdie
2011-08-30 15:56               ` Jeff King
2011-08-30 18:39                 ` Richard Purdie
2011-08-30 18:49                   ` Jeff King
2011-09-05 19:29                     ` Richard Purdie [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1315250990.1243.14.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=barkalow@iabervon.org \
    --cc=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@gmail.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.