git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: integrity of a repository
Date: Sun, 16 Mar 2008 07:32:15 +0100	[thread overview]
Message-ID: <20080316063215.GA6067@ins.uni-bonn.de> (raw)
In-Reply-To: <7v4pb7migk.fsf@gitster.siamese.dyndns.org>

Hello Junio,

* Junio C Hamano wrote on Sun, Mar 16, 2008 at 04:54:51AM CET:
> Ralf Wildenhues <Ralf.Wildenhues@gmx.de> writes:
> 
> > I am aware that git provides integrity of a commit (and thus, a branch
> > head) via its sha, which covers both the tree and its history.
> >
> > But what about the integrity of a git repository as a whole?
[...]
> > Would I need the in file listing all local and remote branches?
> > What about all heads in .git/*HEAD (such as FETCH_HEAD)?
> 
> That's an incoherent question ;-)  First you talk about snapshotting all
> the refs, as if you would want to make sure you can detect anybody moving
> the tips of branches after that happens, but then you talk about something
> completely unrelated.

Well, maybe they are two different parts of the larger question how one
can fully characterize the state of a repository.

> So the answer to the question in your later part of the message is that:
> 
>  - FETCH_HEAD, ORIG_HEAD and MERGE_HEAD do not protect anything from
>    getting pruned;
> 
>  - Objects that are not reachable from the tip of branches will remain in
>    the object store after pruning, if they are reachable from non-branch
>    refs (e.g. tags and the stash), reflogs, or the index.

OK.  Now, is there a way to quickly ensure that a repository is in a
pruned state, short of running 'git gc --prune'?

Thanks,
Ralf

  reply	other threads:[~2008-03-16  6:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-15 13:26 integrity of a repository Ralf Wildenhues
2008-03-16  3:54 ` Junio C Hamano
2008-03-16  6:32   ` Ralf Wildenhues [this message]
2008-03-16  7:01     ` Junio C Hamano
2008-03-16 10:09       ` Ralf Wildenhues

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=20080316063215.GA6067@ins.uni-bonn.de \
    --to=ralf.wildenhues@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).