From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Andreas Ericsson <ae@op5.se>
Cc: Bill Lear <rael@zopyra.com>, git@vger.kernel.org
Subject: Re: When to repack?
Date: Wed, 31 Jan 2007 16:19:49 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.63.0701311617360.22628@wbgn013.biozentrum.uni-wuerzburg.de> (raw)
In-Reply-To: <45C09335.6010601@op5.se>
Hi,
On Wed, 31 Jan 2007, Andreas Ericsson wrote:
> Bill Lear wrote:
> > We have a company repo used by many people throughout the day. When/how
> > can I repack this? I have come to adopt this approach:
> >
> > % mv project project.pack
> > % cd project.pack
> > % GIT_DIR=. git repack -a -d
> > % cd ..
> > % mv project.pack project
> >
>
> Renaming the directory isn't necessary. The packs won't be used until they
> have a .idx file. That .idx-file is written after the packfile, so any
> operations on the repo will simply use the old, loose, objects before the
> packing is completed.
>
> The worst thing that can happen is that an object about to be fetched is
> deleted in its loose version before the upload-pack program can open it,
> but that's no worse than having the entire directory being moved out from
> under it.
AFAIR this case is handled gracefully by git. If the object it is still
accessing moves to a(nother) pack, git will still find it.
> On a side-note, this is a grade A example of something that should
> typically be done sunday night at 4am.
Actually, I'd recommend git-gc. It does not even call git-prune anymore,
so there is no excuse.
I even do it interactively very often, and I just love the fact that "gc"
is so much shorter than "repack -a -d", _plus_ it also does other cleanup
tasks.
Ciao,
Dscho
next prev parent reply other threads:[~2007-01-31 15:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-31 12:50 When to repack? Bill Lear
2007-01-31 12:58 ` Jakub Narebski
2007-01-31 13:01 ` Andreas Ericsson
2007-01-31 15:19 ` Johannes Schindelin [this message]
2007-01-31 15:36 ` Shawn O. Pearce
-- strict thread matches above, loose matches on Subject: below --
2008-02-29 10:55 Paul Gardiner
2008-02-29 11:47 ` Karl Hasselström
2008-02-29 13:22 ` Jakub Narebski
2008-03-01 1:00 ` Xavier Maillard
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.63.0701311617360.22628@wbgn013.biozentrum.uni-wuerzburg.de \
--to=johannes.schindelin@gmx.de \
--cc=ae@op5.se \
--cc=git@vger.kernel.org \
--cc=rael@zopyra.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).