From: Neal Kreitzinger <nkreitzinger@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Neal Kreitzinger <neal@rsss.com>, git@vger.kernel.org
Subject: Re: rsync busy non-bare git repo 'source' to quiet
Date: Tue, 08 Mar 2011 17:00:59 -0600 [thread overview]
Message-ID: <4D76B52B.8070307@gmail.com> (raw)
In-Reply-To: <20110308223841.GA6648@sigill.intra.peff.net>
On 3/8/2011 4:38 PM, Jeff King wrote:
> On Tue, Mar 08, 2011 at 04:20:33PM -0600, Neal Kreitzinger wrote:
>
>> Rsync seems like a simpler solution and more accurate solution for
>> creating a copy of an ecosystem of interrelated git repos colocated on
>> the same box.
>
> Sure. It is simpler, but not atomic unless you do a multi-stage rsync.
>
>> A previous post in the newsgroup states:
>>> If you want your rsync backup to be fine, you need to follow some
>>> ordering. You need to copy the refs first (.git/packed-refs and
>>> .git/refs/), then the loose objects (.git/objects/??/*), and then all
>>> the rest. If files are copied in a different order while some write
>>> operations are performed on the source repository then you may end up
>>> with an incoherent repository."
>>
>> Would that work?
>
> If you do it in that order, the end result will be a consistent repo.
> But during the copy, the refs at the destination will point to objects
> you don't have. I don't know if that matters for your case.
>
We won't be trying to used the "destination" repos during the rsync.
The workflow will be:
(1) I need to test a change to the goldbox change control menu system.
(2) I determine that my testbox "copy" of the change control menu system
has repos that are too out-of-date for a good test, so I run rsync to
make a fresh copy of the goldbox.
(3) After the rsync is finished, I pull over just the branch that
contains my untested change menu scripts. (this is the only git pull i
do from goldbox to testbox.)
(4) I test the changes and see they are good.
(5) I merge the changes into the master branch of the change control
menu non-bare repo on the goldbox. The menu runs from the working tree
so now they are live.
Since I won't be trying to access refs in the "destination" repos via
git commandline or gui while the rsync is running, it sounds like it
will be ok. I can keep people from banging on the testbox. I can't
keep them from banging on the goldbox.
In regards to the working tree of a busy "source" repo, it sounds like
it could end up not matching the index. At the end of the script I
could execute a "git reset --hard && git clean -f" on each non-bare repo
as you suggested. That would be pretty straightforward.
Thanks!
v/r,
Neal
prev parent reply other threads:[~2011-03-08 23:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-08 21:25 rsync busy non-bare git repo 'source' to quiet Neal Kreitzinger
2011-03-08 21:39 ` Jeff King
2011-03-08 22:20 ` Neal Kreitzinger
2011-03-08 22:38 ` Jeff King
2011-03-08 23:00 ` Neal Kreitzinger [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=4D76B52B.8070307@gmail.com \
--to=nkreitzinger@gmail.com \
--cc=git@vger.kernel.org \
--cc=neal@rsss.com \
--cc=peff@peff.net \
/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).