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

Re: [PATCH/RFC] Allow "git remote --mirror" to mirror stashes

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Mar 28, 2008, 15:45 UTC
Message-ID
<alpine.LNX.1.00.0803281124240.19665@iabervon.org>
In-Reply-To
<7vbq4z4bl1.fsf@gitster.siamese.dyndns.org>
On Thu, 27 Mar 2008, Junio C Hamano wrote:
> When you have "remote.$there.fetch = refs/*:refs/*" and the remote has a
> ref directly under refs/ (e.g. "stash"), "git fetch" still errored out
> even with fixes in -rc1.

In particular, it would fail to request "refs/stash", and then be surprised that it didn't get the object that points to. (This would be a helpful thing to mention in the commit message)

> This should hopefully fix it.

Maybe it shouldn't do any filtering here, and instead do it in cmd_fetch_pack? If the transport code gets to this point and anything gets filtered out by this function, the transport code or builtin-fetch will have to be terribly confused and fail with a mysterious error message, AFAICT.

>  * Rather than failing, it would be better to allow "git fetch" to succeed
>    by doing this, but on the other hand, stash is purely a local matter,
>    so it might make more sense to avoid exposing it from the uploader.

This is also true, although I'm not too sure that we won't want to do things like having "refs/default" in a public repository be the repository's suggestion for the default branch (to replace "HEAD", because, in a world where people use lots of branches, the "current branch" idea and the "default branch" idea aren't really the same idea, although there's no technical conflict since only one of these ideas is really important in any given repository). So we probably want a whitelist or blacklist for refs to serve when we avoid exposing things in the uploader, rather than using the level, in which case it's definitely important to have fetch-pack just ignore stuff.

	-Daniel
*This .sig left intentionally blank*
Previous: Junio C HamanoNext: Junio C Hamano
Message 14 of 16 in “git remote --mirror bug?”
  1. Joakim TjernlundMar 14, 2008
  2. Joakim TjernlundMar 15, 2008
  3. Re* git remote --mirror bug?Junio C Hamano, Mar 16, 2008
  4. remote/clone bug: Stale tracking branch HEADTeemu Likonen, Mar 16, 2008
  5. On fetch refspecs and wildcardsJunio C Hamano, Mar 16, 2008
  6. Junio C HamanoMar 16, 2008
  7. Daniel BarkalowMar 16, 2008
  8. Junio C HamanoMar 17, 2008
  9. Daniel BarkalowMar 17, 2008
  10. Johannes SchindelinMar 18, 2008
  11. Junio C HamanoMar 18, 2008
  12. Johannes SchindelinMar 19, 2008
  13. Allow "git remote --mirror" to mirror stashesJunio C Hamano, Mar 28, 2008
  14. Daniel BarkalowMar 28, 2008
  15. Junio C HamanoMar 31, 2008
  16. Daniel BarkalowMar 31, 2008

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.