git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Martin Langhoff" <martin.langhoff@gmail.com>
To: "Git Mailing List" <git@vger.kernel.org>
Subject: Re: Fetch from remote A, push to remote B
Date: Thu, 31 May 2007 19:28:39 +1200	[thread overview]
Message-ID: <46a038f90705310028y6f180214s9018f8af5e71d0ed@mail.gmail.com> (raw)
In-Reply-To: <46a038f90705302253s68b70311h3feac7404fa23933@mail.gmail.com>

On 5/31/07, Martin Langhoff <martin.langhoff@gmail.com> wrote:
> Is there an easy way to get a "passthrough" repo setup so I can say on a cronjob
>
>   git-fetch remoteA
>   git-push ssh+git://host/path/to/repoB.git remotes/remoteA/<all>

After mucking about with stuff like...

find .git/refs/remotes/origin -type f -printf '%P\0' | xargs -0
-IHEADNAME git-push
git+ssh://git.catalyst.net.nz/var/git/moodle-r2-testing.git
origin/HEADNAME:HEADNAME

I figured out that a bare repo did the trick

  # set things up
  git-clone --bare git+ssh://host-a/bla.git bla-transfer.git

  # on cron do
  GIT_DIR=bla-transfer.git git-fetch git+ssh://host-a/bla.git
  GIT_DIR=bla-transfer.git git-push --all git+ssh://host-b/bla.git

cheers!


martin

  reply	other threads:[~2007-05-31  7:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-31  5:53 Fetch from remote A, push to remote B Martin Langhoff
2007-05-31  7:28 ` Martin Langhoff [this message]
2007-06-01  0:37   ` Martin Langhoff
2007-06-01  1:52     ` Martin Langhoff
2007-06-01  3:51       ` Martin Langhoff

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=46a038f90705310028y6f180214s9018f8af5e71d0ed@mail.gmail.com \
    --to=martin.langhoff@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).