Re: Race condition in git push --mirror can cause silent ref rewinding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/02/2014 06:20 PM, Junio C Hamano wrote:
> Alex Vandiver <alex@xxxxxxxxx> writes:
> 
>>     [remote "github"]
>>         url = git@xxxxxxxxxx: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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]