git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jon Loeliger <jdl@freescale.com>
To: Erez Zadok <ezk@cs.sunysb.edu>
Cc: Git List <git@vger.kernel.org>
Subject: Re: why git-reset needed after "cp -a" of a git repo?
Date: Wed, 22 Aug 2007 14:04:39 -0500	[thread overview]
Message-ID: <1187809479.15321.15.camel@ld0161-tx32> (raw)
In-Reply-To: <200708221857.l7MIv5tD011053@agora.fsl.cs.sunysb.edu>

On Wed, 2007-08-22 at 13:57, Erez Zadok wrote:

> However, I noticed that after I copy a git repo (using v1.5.2.2), the index
> entries are all out of sync, and I need to run git-reset.  Why?  What's in
> the index file that changes after a cp -a or rsync that git depends on?  Is
> it atime's and if so, aren't they copied by cp -a or rsync?  If it depends
> on atime's, what happens if I mount my filesystem with noatime?  Or does
> git's index depends on inode numbers which change after a cp -a?  (BTW, I
> tried a variety of rsync options and none helped.)  I also briefly looked at
> the source code and wasn't able to find the answer.
> 
> So, is there a way to efficiently copy a git repo on a local or remote host
> w/o having to rerun git-reset afterwards?


Use "git update-index --refresh" to update time stamps in the index.

jdl

  reply	other threads:[~2007-08-22 19:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-22 18:57 why git-reset needed after "cp -a" of a git repo? Erez Zadok
2007-08-22 19:04 ` Jon Loeliger [this message]
2007-08-22 19:11 ` Linus Torvalds
2007-08-22 19:19   ` Erez Zadok
2007-08-22 20:14     ` J. Bruce Fields

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=1187809479.15321.15.camel@ld0161-tx32 \
    --to=jdl@freescale.com \
    --cc=ezk@cs.sunysb.edu \
    --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).