git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 2, 2014, 22:20 UTC
Message-ID
<xmqqfvijflnr.fsf@gitster.dls.corp.google.com>
In-Reply-To
<53B47535.3020101@chmrr.net>
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.

Perhaps removing remote.github.fetch would be one sane way forward. Otherwise, even if your "git push" does not pretend to immediately fetch from there (i.e. even if the reported behaviour was a bug, without doing anything to trigger it) somebody running "git fetch" in this repository can destroy what other person pushes into this repository at the same time exactly the same way, I would think.

Previous: Alex VandiverNext: Alex Vandiver
Message 2 of 4 in “Race condition in git push --mirror can cause silent ref rewinding”
  1. Alex VandiverJul 2, 2014
  2. Junio C HamanoJul 2, 2014
  3. Alex VandiverJul 2, 2014
  4. Alex VandiverJul 14, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.