From: Linus Torvalds <torvalds@osdl.org>
To: Jakub Narebski <jnareb@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: irc usage..
Date: Mon, 22 May 2006 11:03:05 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0605221055270.3697@g5.osdl.org> (raw)
In-Reply-To: <e4stna$o1g$1@sea.gmane.org>
On Mon, 22 May 2006, Jakub Narebski wrote:
>
> Linus Torvalds wrote:
>
> > git repack -a
> > #
> > # Stupid sleep to make sure that nobody is still
> > # using any unpacked objects after the pack got
> > # generated
> > #
> > sleep 10
> > git prune-packed
>
> Is it really necessary (on Linux at least)? Git boast it's atomicity...
I don't think it's necessary in practice.
But people _should_ realize that removing objects is very very special.
Whether it's done by "git prune-packed" or "git prune", that's a very
dangerous operations. "git prune" a lot more so than "git prune-packed",
of course (in fact, you should _never_ run "git prune" on a repository
that is active - you _will_ corrupt it)-
Doing "git prune-packed" _should_ be mostly safe on UNIX, since the
objects all exist in packs, and anybody who already opened an object will
keep the fd open, and not even notice that the name is gone. However,
there is at least one race:
object lookup "git repack -a -d"
============= ==================
- a process does its object
database setup. No new pack-file
yet.
- mv tmp-packfile active-packfile
- git prune-packed
- the process looks up the object,
and doesn't look in the pack-file
because it didn't see the pack-file.
So it tries to look up an object,
fails, and errors out.
It's not a fatal error (just re-try)
but it could break something like a
cvsimport
Now, in PRACTICE, I doubt you'd ever hit this. But the fact is, pruning
your repository (whether prune-packed or a full prune) is _the_ special
operation. It's something that removes a filesystem representation of an
object that is otherwise immutable.
Linus
next prev parent reply other threads:[~2006-05-22 18:03 UTC|newest]
Thread overview: 82+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-20 17:26 irc usage Linus Torvalds
2006-05-20 17:50 ` Junio C Hamano
2006-05-20 18:52 ` Jakub Narebski
2006-05-20 20:39 ` Yann Dirson
2006-05-20 22:18 ` Donnie Berkholz
2006-05-20 22:45 ` Linus Torvalds
2006-05-20 23:12 ` Donnie Berkholz
2006-05-21 19:24 ` Linus Torvalds
2006-05-22 3:59 ` Linus Torvalds
2006-05-22 4:19 ` Donnie Berkholz
2006-05-22 4:50 ` Linus Torvalds
2006-05-22 5:04 ` Martin Langhoff
2006-05-22 5:21 ` Donnie Berkholz
2006-05-22 7:42 ` Martin Langhoff
2006-05-22 9:13 ` Linus Torvalds
2006-05-22 12:54 ` Martin Langhoff
2006-05-22 17:27 ` Linus Torvalds
2006-05-22 17:51 ` Jakub Narebski
2006-05-22 18:03 ` Linus Torvalds [this message]
2006-05-22 19:03 ` Matthias Lederhofer
2006-05-22 19:09 ` Junio C Hamano
2006-05-23 20:19 ` Jakub Narebski
2006-05-22 19:46 ` Martin Langhoff
2006-05-22 19:09 ` Donnie Berkholz
2006-05-22 19:38 ` Linus Torvalds
2006-05-22 19:49 ` Donnie Berkholz
2006-05-22 20:20 ` Linus Torvalds
2006-05-22 21:48 ` Donnie Berkholz
2006-05-29 21:54 ` Donnie Berkholz
2006-05-29 22:21 ` Martin Langhoff
2006-05-29 22:32 ` Donnie Berkholz
2006-05-30 0:19 ` Martin Langhoff
2006-05-30 5:31 ` Donnie Berkholz
2006-05-30 6:01 ` Martin Langhoff
2006-05-30 0:43 ` Linus Torvalds
2006-05-30 22:31 ` Martin Langhoff
2006-05-30 23:07 ` Linus Torvalds
2006-05-31 1:04 ` Martin Langhoff
2006-05-31 2:49 ` Donnie Berkholz
2006-05-31 6:05 ` Martin Langhoff
2006-05-31 13:54 ` Alec Warner
2006-05-31 22:03 ` Martin Langhoff
2006-06-01 1:42 ` Alec Warner
2006-06-01 7:47 ` Martin Langhoff
2006-06-05 0:33 ` Alec Warner
2006-06-05 2:06 ` Martin Langhoff
2006-06-05 2:36 ` Alec Warner
2006-06-05 3:49 ` Martin Langhoff
[not found] ` <20060605120743.566fb85f.seanlkml@sympatico.ca>
2006-06-05 16:07 ` Sean
2006-05-22 19:41 ` Martin Langhoff
2006-05-22 20:11 ` Linus Torvalds
2006-05-22 20:33 ` Linus Torvalds
2006-05-22 21:41 ` Matthias Urlichs
2006-05-22 22:18 ` Linus Torvalds
2006-05-22 23:23 ` Martin Langhoff
2006-05-22 23:29 ` Martin Langhoff
2006-05-22 23:33 ` Linus Torvalds
2006-05-22 22:39 ` Junio C Hamano
2006-05-22 23:15 ` Martin Langhoff
2006-05-23 6:52 ` Jeff King
2006-05-23 6:58 ` Jeff King
2006-05-23 7:01 ` [PATCH 1/2] cvsimport: use git-update-index --index-info Jeff King
2006-05-23 7:00 ` [PATCH 2/2] cvsimport: cleanup commit function Jeff King
[not found] ` <7v4pzh6wtr.fsf@assigned-by-dhcp.cox.net>
2006-05-23 7:13 ` Jeff King
2006-05-23 7:27 ` [PATCH 1/2] cvsimport: use git-update-index --index-info Jeff King
2006-05-23 8:13 ` [PATCH 2/2] cvsimport: cleanup commit function Martin Langhoff
2006-05-23 8:24 ` Junio C Hamano
2006-05-23 20:32 ` Martin Langhoff
2006-05-23 16:50 ` Linus Torvalds
2006-05-23 19:36 ` Linus Torvalds
2006-05-23 20:25 ` Junio C Hamano
2006-05-23 20:29 ` Martin Langhoff
2006-05-23 21:10 ` Jeff King
2006-05-23 21:13 ` Martin Langhoff
2006-05-23 17:47 ` Morten Welinder
2006-05-23 20:59 ` Jeff King
2006-05-23 23:41 ` Junio C Hamano
2006-05-24 9:52 ` Jeff King
2006-05-22 20:16 ` irc usage Donnie Berkholz
2006-05-21 9:46 ` Thomas Glanzmann
2006-05-21 1:14 ` Donnie Berkholz
2006-05-22 1:45 ` Linus Torvalds
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=Pine.LNX.4.64.0605221055270.3697@g5.osdl.org \
--to=torvalds@osdl.org \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.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.
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 NNTP newsgroup(s).