From: Sergio <sergio.callegari@gmail.com>
To: git@vger.kernel.org
Subject: Re: Potentially dangerous behavior of git gc
Date: Tue, 20 Oct 2009 11:40:32 +0000 (UTC) [thread overview]
Message-ID: <loom.20091020T132839-911@post.gmane.org> (raw)
In-Reply-To: 20091019112153.GX6115@genesis.frugalware.org
Miklos Vajna <vmiklos <at> frugalware.org> writes:
>
> On Mon, Oct 19, 2009 at 08:04:58AM +0000, Sergio Callegari
<sergio.callegari <at> gmail.com> wrote:
> > With this when the alternate info of A is finally updated, A is broken,
missing
> > many references and not having a head anymore.
> >
> > Would it be better to have git gc not to take dangerous actions on
potentially
> > problematic repos?
>
> Such repos are usually created using git clone -s. See the NOTE of the
> manpage under the -s option, probably you want to use git repack -a
> after git clone.
>
Thanks, unfortunately, that was not really my point. But I now see that I
cannot create a test case to reproduce my issue. Briefly what happened to
me is the following
1) Create repo A
2) Clone with -s A into B
3) Do some work in B, being happy of maintaining the alternate
4) At some point, move A elsewhere
5) Do a couple of things in B, including a git gc, before realizing that
moving A had created problems to B
6) Rush to make A reachable by B again by updating the info/alternates
file in B
7) Realize that in spite of 6) B is gone... no more ref/heads/master, git
thinks that this is a new empty repo.
And certainly the fault was of some of the "two things" done in 5). At the
beginning I thought that the blame was of git gc, but I see that I cannot
reproduce the situation at all with test cases.
So I will give up for now... I'll get back to it if I ever have a similar
problem. Once more, sorry for the noise.
Sergio
prev parent reply other threads:[~2009-10-20 11:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-19 8:04 Potentially dangerous behavior of git gc Sergio Callegari
2009-10-19 11:21 ` Miklos Vajna
2009-10-20 11:40 ` Sergio [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=loom.20091020T132839-911@post.gmane.org \
--to=sergio.callegari@gmail.com \
--cc=git@vger.kernel.org \
/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).