Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: markus.heidelberg@web.de
Cc: Bryan Drewery <bryan@shatow.net>, git@vger.kernel.org
Subject: Re: [PATCH] Fix git-push --mirror also mirroring refs/remotes/
Date: Sun, 10 May 2009 14:56:21 -0700	[thread overview]
Message-ID: <7vskjctyey.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <200905102313.13544.markus.heidelberg@web.de> (Markus Heidelberg's message of "Sun\, 10 May 2009 23\:13\:13 +0200")

Markus Heidelberg <markus.heidelberg@web.de> writes:

> Bryan Drewery, 10.05.2009:
>> This behavior makes no sense to me. Can we at least add a config option
>> to make it not push remotes? I push my development repository
>> to a remote private repository only as a backup, and push my master/next
>> to a public repository. I see no reason to push my 8 remotes and
>> all their branches to my backup repository.
>
> Why are you disturbed by the remotes, if it's only a backup repository
> where you don't look into in the normal case?

I suspect you got a wrong "backup".

"push --mirror" is about backing up the local repository so that other
people (most likely "you working on some other machine") who usually
interact with the current repository can instead get history from the
repository that you are pushing into, when the current repository is not
reachable for whatever reason.

In other words, "push --mirror" is not a backup in the "archive to tape
for disaster recovery" sense, but is a backup in the "you can go there in
case this is not reachable" sense.  The refspec "remote add --mirror"
creates is set up to support a backup repository in the same sense in the
opposite direction [*1*].

Now, these other people may not have any business looking into remotes
hierarchy of this repository, and we could argue that there is not much
point pushing remotes hierarchy over there (nor stash or topgit for that
matter) in a normal workflow.

But these other people can say "git fetch $here remotes/origin/master"
explicitly when fetching from this repository.  By mirroring everything
under refs/ to its --mirror backup repository, these other people can
substitute $here with its --mirror backup repository and expect it to
still work.  It would be a regression if you stop pushing the refs/remotes
hierarchy, and such a proposal must be backed by an argument that says the
benefit such a change brings in far outweighs the regression it causes.


[Footnote]

*1* If you want a "disaster recovery backup", there is always "tar".  My
recent favourite is to append into an existing squashfs image, though ;-)

  parent reply	other threads:[~2009-05-10 21:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-10 19:35 [PATCH] Fix git-push --mirror also mirroring refs/remotes/ Bryan Drewery
2009-05-10 20:25 ` Markus Heidelberg
2009-05-10 20:50   ` Bryan Drewery
2009-05-10 21:13     ` Markus Heidelberg
2009-05-10 21:31       ` Bryan Drewery
2009-05-10 21:56       ` Junio C Hamano [this message]
2009-05-10 22:15         ` Markus Heidelberg

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=7vskjctyey.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=bryan@shatow.net \
    --cc=git@vger.kernel.org \
    --cc=markus.heidelberg@web.de \
    /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