git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Vandiver <alex@chmrr.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: Race condition in git push --mirror can cause silent ref rewinding
Date: Wed, 02 Jul 2014 19:10:43 -0400	[thread overview]
Message-ID: <53B49173.4020001@chmrr.net> (raw)
In-Reply-To: <xmqqfvijflnr.fsf@gitster.dls.corp.google.com>

On 07/02/2014 06:20 PM, Junio C Hamano wrote:
> Alex Vandiver <alex@chmrr.net> writes:
> 
>>     [remote "github"]
>>         url = git@github.com:bestpractical/rt.git
>>         fetch = +refs/*:refs/*
>>         mirror = yes
> 
> "git push github master^:master" must stay a usable way to update
> the published repository to an arbitrary commit, so "if set to
> mirror, do not pretend that a fetch in reverse has happened during
> 'git push'" will not be a solution to this issue.

Hm?  I'm confused, as mirror isn't compatible with refspecs:

$ git push github master^:master
error: --mirror can't be combined with refspecs

> Perhaps removing remote.github.fetch would be one sane way forward.

Ahh -- I see.  The repository predates a9f5a355, which split `git remote
add --mirror` into `--mirror=push` and `--mirror=fetch`, because of more
or less this exact problem.  Of course, there is nothing much that can
be done for existing repositories in this situation as it's a legitimate
combination.
 - Alex

  reply	other threads:[~2014-07-02 23:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-02 21:10 Race condition in git push --mirror can cause silent ref rewinding Alex Vandiver
2014-07-02 22:20 ` Junio C Hamano
2014-07-02 23:10   ` Alex Vandiver [this message]
2014-07-14  4:09     ` Alex Vandiver

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=53B49173.4020001@chmrr.net \
    --to=alex@chmrr.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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).