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

[BUG?] push to mirrior interferes with parallel operations

From
JHJan Hudec <bulb@ucw.cz>
Date
Nov 18, 2010, 07:39 UTC
Message-ID
<e355bb33c6192a6a29de56c7be93278e.squirrel@artax.karlin.mff.cuni.cz>
Hello all,

I have a repository populated with git-svn. For backup I have a mirror remote set up. Today I ran 'git push backup' on one terminal and before it finished (it's just on a network filesystem, so it's kind of slow), I ran 'git svn fetch' on another. And than I didn't see any results of that fetch.

What happened is that the push took the values of all the refs -- including those in refs/remotes/svn as it's a mirror for pushing them to the backup. Meanwhile the fetch udpated them. But when the push finished with the remote repo, it updated the local refs back to the values it pushed, undoing the effects of that fetch.

The repository was created with simple:
    git remote add --mirror backup /mnt/server/path/to/repo.git
which created configuration:
    [remote "backup"]
	url = /mnt/server/path/to/repo.git
	fetch = +refs/*:refs/*
	mirror = true

So, should the push be more careful when updating the refs, not simulate the pull back when doing a --mirror, or the git remote add not add the 'fetch = +refs/*:refs/*' line?

Thanks, Jan

-- 
                                        - Jan Hudec <bulb@ucw.cz>
Next: Jeff King
Message 1 of 15 in “[BUG?] push to mirrior interferes with parallel operations”
  1. Jan HudecNov 18, 2010
  2. Jeff KingNov 18, 2010
  3. Jeff KingNov 18, 2010
  4. Does it make sense to pull from mirror? (Re: [BUG?] push to mirrior interferes with parallel operations)Jan Hudec, Nov 18, 2010
  5. Jeff KingNov 18, 2010
  6. Jan HudecNov 18, 2010
  7. Jeff KingNov 18, 2010
  8. Andreas SchwabNov 19, 2010
  9. Jeff KingNov 19, 2010
  10. Andreas SchwabNov 19, 2010
  11. Jeff KingNov 19, 2010
  12. Andreas SchwabNov 19, 2010
  13. Jeff KingNov 19, 2010
  14. Jonathan NiederNov 19, 2010
  15. Jeff KingNov 19, 2010

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.