git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Matt Burke <spraints@gmail.com>, git@vger.kernel.org
Subject: Re: Bug report: stash in upstream caused remote fetch to fail
Date: Mon, 06 Jan 2014 12:17:21 -0800	[thread overview]
Message-ID: <xmqq61pwj25q.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20140106193625.GA27062@sigill.intra.peff.net> (Jeff King's message of "Mon, 6 Jan 2014 14:36:26 -0500")

Jeff King <peff@peff.net> writes:

> On Mon, Jan 06, 2014 at 08:16:31AM -0800, Junio C Hamano wrote:
>
>> > I was going to ask you to send your repository, but I can easily
>> > reproduce here. I guess people don't run into it because it's uncommon
>> > to fetch the whole refs/ namespace from a non-bare repo (and bare repos
>> > do not tend to have stashes). Here's a minimal reproduction recipe:
>> >
>> >   git init repo &&
>> >   cd repo &&
>> >   echo content >foo &&
>> >   git add . &&
>> >   git commit -m foo &&
>> >   echo more >>foo &&
>> >   git stash &&
>> >   git init --bare sub &&
>> >   cd sub &&
>> >   git fetch .. 'refs/*:refs/*'
>> >
>> > It looks like we are not feeding refs/stash properly to pack-objects.
>> > I'll try to take a closer look later today.
>> 
>> I looked at this in the past and I vaguely recall that we reject it
>> in the for-each-ref loop with check-ref-format saying "eh, that is a
>> single-level name".
>> 
>> At that point I stopped digging, thinking it was a feature ;-)
>> based on your exact observation about stash vs bare/non-bare.
>
> I am fine with rejecting it with a warning, but we should not then
> complain that the other side did not send us the object, since we should
> not be asking for it at all. I also do not see us complaining about the
> funny ref anywhere.  So there is definitely _a_ bug here. :)

Oh, no question about that.  I was just pointing somebody who
already has volunteered to take a look in a direction I recall was
where the issue was ;-)

Thanks.

>
> I think somebody else mentioned recently that we do not handle malformed
> refs consistently. I think it was:
>
>   http://article.gmane.org/gmane.comp.version-control.git/239381
>
> which might or might not be related.
>
> -Peff

  reply	other threads:[~2014-01-06 20:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-03 21:12 Bug report: stash in upstream caused remote fetch to fail Matt Burke
2014-01-06 15:27 ` Jeff King
2014-01-06 16:16   ` Junio C Hamano
2014-01-06 19:36     ` Jeff King
2014-01-06 20:17       ` Junio C Hamano [this message]
2014-01-06 23:03         ` Jeff King
2014-01-06 23:22           ` Junio C Hamano
2014-01-07  3:19             ` Junio C Hamano
2014-01-15 10:46               ` Jeff King
2014-01-15 10:48                 ` Jeff King
  -- strict thread matches above, loose matches on Subject: below --
2012-02-01 16:59 Andrew Walrond
     [not found] ` <874nvap9hj.fsf@thomas.inf.ethz.ch>
2012-02-01 22:37   ` Andrew Walrond

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=xmqq61pwj25q.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=spraints@gmail.com \
    /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).