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

Re: [BUG?] push to mirrior interferes with parallel operations

From
Jeff King <peff@peff.net>
Date
Nov 19, 2010, 21:51 UTC
Message-ID
<20101119215143.GA19644@sigill.intra.peff.net>
In-Reply-To
<m24obd0zpp.fsf@igel.home>
On Fri, Nov 19, 2010 at 10:29:22PM +0100, Andreas Schwab wrote:
Show 26 quoted lines
> Jeff King <peff@peff.net> writes:
> 
> > On Fri, Nov 19, 2010 at 10:18:58PM +0100, Andreas Schwab wrote:
> >
> >> Jeff King <peff@peff.net> writes:
> >> 
> >> > On Fri, Nov 19, 2010 at 08:40:18PM +0100, Andreas Schwab wrote:
> >> >
> >> >> Jeff King <peff@peff.net> writes:
> >> >> 
> >> >> > it really only makes sense to push from a non-bare repo,
> >> >> 
> >> >> Why?  The repo could itself be a mirror.
> >> >
> >> > Why do you have a working directory if you are going to have a refspec
> >> > that overwrites HEAD behind your back (which, IIRC, git will simply barf
> >> > on, so all of your fetches will fail)?
> >> 
> >> I don't understand that question.  There is no working directory in a
> >> bare repo.
> >
> > Now I'm confused. I thought we were talking about non-bare repos. Can
> > you clarify your question?
> 
> You claim that pushing from a bare repo does not make sense, and I
> question that (I do that all the time).

It's hard to tell because you trimmed all of the context from my statement, but:

  1. We are talking specifically about pushing to remotes configured
     using remote.*.mirror, and created via "git remote add --mirror".
  2. I think you are reading what I quoted as the converse of what I
     meant. You are saying "if bare, pushing does not make sense". But
     what I meant there was "if non-bare, only pushing makes sense".
     Which is why my initial response to you was so confused.
     That being said, the immediately following statement you didn't
     quote was "[only makes sense...] to fetch into a bare repo". Which
     is what you are saying, and I do think is oversimplistic. But...
  3. Much of the rest of my email goes on to explain a case where that
     simple rule is not true, and discusses the implications.

So yes. You can push from a bare repo, I agree. I think we need "git remote add --mirror={fetch,push}" in order to handle all cases. But what should "git remote --mirror" do? Be disallowed? Be a synonym for --mirror=fetch (as it is now)? Guess based on bare/non-bare status?

-Peff
Previous: Andreas SchwabNext: Jonathan Nieder
Message 13 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.