git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Neal Kreitzinger <neal@rsss.com>
Cc: git@vger.kernel.org
Subject: Re: integrity of linux copy of a git repo
Date: Fri, 1 Oct 2010 15:01:02 -0500	[thread overview]
Message-ID: <20101001200102.GA1882@burratino> (raw)
In-Reply-To: <i85dub$fp5$1@dough.gmane.org>

Hi Neal,

Neal Kreitzinger wrote:

> If I make a recursive linux copy, "cp -rfp", of a git repo working tree is 
> the resulting copy interchangeable with the original?

Yes, the git metadata does not hardcode the path to the repo anywhere.
See gitrepository-layout(7) for perhaps more detail than you wanted.

You might want to use "git add --refresh ." (or even just "git diff")
to update the cached stat() information before starting work with the
new worktree, but that only matters if you are going to use very
low-level commands.

> cp -rfp /orig-wk-tree /orig-wk-tree-copy
> (do some stuff that breaks /orig-wk-tree)
> rm -rf /orig-wk-tree
> mv /orig-wk-tree-copy /orig-wk-tree
> 
> Have I truly recovered the full integrity of the original

Sure, that's a good way to do experiments.

Hope that helps,
Jonathan

      reply	other threads:[~2010-10-01 20:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-01 19:47 integrity of linux copy of a git repo Neal Kreitzinger
2010-10-01 20:01 ` Jonathan Nieder [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=20101001200102.GA1882@burratino \
    --to=jrnieder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=neal@rsss.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).