git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Brandon Casey <brandon.casey.ctr@nrlssc.navy.mil>
To: Brian Foster <brian.foster@innova-card.com>
Cc: git@vger.kernel.org
Subject: Re: [Q] `git fetch tag NAME' into mirror repo does not update HEAD, what to do?
Date: Thu, 12 Aug 2010 12:02:49 -0500	[thread overview]
Message-ID: <Xp6r8yG_6tK_gooNBRqAKdsGRTcXgRo-b1bJv3J7ckxs2iD_-UXlPw@cipher.nrlssc.navy.mil> (raw)
In-Reply-To: <201008120954.27648.brian.foster@innova-card.com>

Brian Foster wrote:
>  Bare repository ORIG's master looks like this:
> 
>    o--o--o--o--v1--o--v2--o--o--o HEAD
> 
>  where v1 and v2 are (annotated) tagged commits.
> 
>  Repository SLAVE is a mirror clone of ORIG which
>  (very deliberately!) lags behind (i.e., its HEAD
>  is one of the earlier (and usually tagged) commits
>  on ORIG).  SLAVE's master was like this:
> 
>    o--o--o--o--v1 HEAD
> 
>  We wanted to update its HEAD to v2, so did:
> 
>    git fetch ORIG tag v2
> 
>  This gave us:
> 
>    o--o--o--o--v1 HEAD
>                  \ 
>                   o--v2
> 
>  It did not update SLAVE's HEAD to v2, which we wanted.

Are you using --mirror only so that the branch pointer in
the mirror repository will be updated when you fetch?

If you are not really interested in having a "real" mirror,
then maybe you should set your mirror up to track a
specific branch (or branches) in the mirrored repository.

You could have a branch named for example "for_mirror/master",
in the mirrored repository (ORIG) that you would prepare.
You could update the for_mirror/master branch when you were
ready using 'git branch' like this:

   git branch -f for_mirror/master v2

In the mirror repository (SLAVE), you would update the
fetchspec so that the mirror mirrored the branches below
the "for_mirror" namespace in the remote repository
like this:

   fetch = +refs/heads/for_mirror/*:refs/heads/*

Then, a simple 'git fetch' would fetch the updates (including
tags) and update the branch pointer in the mirror like you want
it to do.  Tracking multiple branches this way is possible just
by creating another branch in the ORIG repository with the proper
name.

-Brandon

  parent reply	other threads:[~2010-08-12 17:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-12  7:54 [Q] `git fetch tag NAME' into mirror repo does not update HEAD, what to do? Brian Foster
2010-08-12  8:33 ` Tomas Carnecky
2010-08-12 10:38   ` Brian Foster
2010-08-12 11:05     ` Tomas Carnecky
2010-08-12 12:16       ` [SOLVED] " Brian Foster
2010-08-12 12:32         ` Tomas Carnecky
2010-08-12 13:22           ` Brian Foster
2010-08-12 13:34             ` Tomas Carnecky
2010-08-13  7:03               ` Brian Foster
2010-08-12 17:02 ` Brandon Casey [this message]
2010-08-13  7:22   ` [Q] " Brian Foster

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Xp6r8yG_6tK_gooNBRqAKdsGRTcXgRo-b1bJv3J7ckxs2iD_-UXlPw@cipher.nrlssc.navy.mil \
    --to=brandon.casey.ctr@nrlssc.navy.mil \
    --cc=brian.foster@innova-card.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).