git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Barkalow <barkalow@iabervon.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, joakim.tjernlund@transmode.se
Subject: Re: [PATCH/RFC] Allow "git remote --mirror" to mirror stashes
Date: Fri, 28 Mar 2008 11:45:43 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LNX.1.00.0803281124240.19665@iabervon.org> (raw)
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*

  reply	other threads:[~2008-03-28 15:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-14 13:05 git remote --mirror bug? Joakim Tjernlund
2008-03-15 18:08 ` Joakim Tjernlund
2008-03-16 10:21   ` Re* " Junio C Hamano
2008-03-16 17:21     ` remote/clone bug: Stale tracking branch HEAD Teemu Likonen
2008-03-16 22:24       ` On fetch refspecs and wildcards Junio C Hamano
2008-03-16 22:33         ` Junio C Hamano
2008-03-16 23:03         ` Daniel Barkalow
2008-03-17  0:14           ` Junio C Hamano
2008-03-17  2:14             ` Daniel Barkalow
2008-03-18 14:04     ` Re* git remote --mirror bug? Johannes Schindelin
2008-03-18 19:02       ` Junio C Hamano
2008-03-19  0:35         ` Johannes Schindelin
2008-03-28  6:16   ` [PATCH/RFC] Allow "git remote --mirror" to mirror stashes Junio C Hamano
2008-03-28 15:45     ` Daniel Barkalow [this message]
2008-03-31  0:19       ` Junio C Hamano
2008-03-31  3:03         ` Daniel Barkalow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LNX.1.00.0803281124240.19665@iabervon.org \
    --to=barkalow@iabervon.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=joakim.tjernlund@transmode.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).