git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Danielsson <jan.m.danielsson@gmail.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: Keeping a non-1:1 mirror in sync and keeping private branches
Date: Sun, 16 Jul 2017 15:42:09 +0200	[thread overview]
Message-ID: <eb5e02da-662e-5561-7548-e50efba13dca@gmail.com> (raw)
In-Reply-To: <20170716101045.aslfct7g5vqfqnhi@sigill.intra.peff.net>

On 07/16/17 12:10, Jeff King wrote:
>>    This seems to accomplish everything I want except that the the "git
>> push" deletes any branches I have created on my self-hosted
>> repository.
> 
> A mirrored push is basically:
> 
>   - push all refs, i.e., a "+refs/*:refs/*" refspec
> 
>   - enable --prune, to delete any branches that don't exist on the local
>     side
> 
> But you can do those two things separately if you like.  So your options
> are either:
> 
>   1. Drop the pruning (in which case deleted branches from the sync may
>      accumulate, but depending on the patterns that may or may not be a
>      problem).

   I don't think that's a problem.  Or rather, I'd be willing to try it
and see if it becomes a problem.

   That said; does "drop the pruning" mean simply removing "--prune"
from the remove update?  I did that, but it still deletes my test-branch
on push.  Is there an implicit pruning happening due to some
configuration option or the specific commands I'm using?

>   2. Use two different namespaces for the synced branches and the
>      private ones (e.g., refs/mirror/* in addition to your branches in
>      refs/heads/*). The obvious downside is that anybody cloning your
>      downstream mirror doesn't pick up refs/mirror unless they configure
>      that refspec explicitly.
   This sounds very useful.  How would one go about setting up this
configuration?

-- 
Kind regards,
Jan Danielsson


  reply	other threads:[~2017-07-16 13:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-16  0:59 Keeping a non-1:1 mirror in sync and keeping private branches Jan Danielsson
2017-07-16 10:10 ` Jeff King
2017-07-16 13:42   ` Jan Danielsson [this message]
2017-07-16 14:16     ` Jeff King

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=eb5e02da-662e-5561-7548-e50efba13dca@gmail.com \
    --to=jan.m.danielsson@gmail.com \
    --cc=git@vger.kernel.org \
    --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).