From: "Carlos Martín Nieto" <cmn@elego.de>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: 6d4bb3833c3d2114d (fetch: verify we have everything we need before updating our ref) breaks fetch
Date: Sat, 01 Oct 2011 01:48:10 +0200 [thread overview]
Message-ID: <1317426491.4331.23.camel@centaur.lab.cmartin.tk> (raw)
In-Reply-To: <20110928185327.GB1482@sigill.intra.peff.net>
[-- Attachment #1: Type: text/plain, Size: 2155 bytes --]
On Wed, 2011-09-28 at 14:53 -0400, Jeff King wrote:
> On Wed, Sep 28, 2011 at 06:04:27PM +0200, Carlos Martín Nieto wrote:
>
> > Whilst trying to do some work related to fetch, I came across a
> > regression in the 'next' branch. Bisecting gave me this commit as
> > breaking point (and I tried with the parent and there it worked). When
> > doing 'git fetch', rev-list will complain about usage, and fetch will
> > say that we didn't receive enough, even though earlier versions of git
> > have no problems. This fails both on github and on git.or.cz and for git
> > and http transports:
> >
> > $ ./git-fetch git://repo.or.cz/git
> > usage: git rev-list [OPTION] <commit-id>... [ -- paths... ]
>
> Hmm. I notice you're running a not-installed version of fetch. Might
> this be a problem with a new git fetch running an older, installed
> version of rev-list?
Yes, this seems indeed to be the case.
>
> The commit you mention calls rev-list with --verify-objects, but that
> feature is only added in the parent commit. So I can reproduce your
> issue with:
>
> $ git checkout 6d4bb38~2 ;# or anything before --verify-objects
> $ make install
> $ git checkout 6d4bb38
> $ make
> $ ./git-fetch git://repo.or.cz/git
>
> but this works (because it sets the exec path properly):
>
> $ ./bin-wrappers/git fetch git://repo.or.cz/git
>
> as does this:
>
> $ make install
> $ ./git-fetch git://repo.or.cz/git
>
> So I don't think there's a bug. It's just that running compiled programs
> straight out of the build directory isn't supported. It works _most_ of
> the time, but as you can see, you may end up calling older, installed
> versions of git. The bin-wrappers scripts set up the exec path properly
> to let you test.
Indeed, as both you and Junio pointed out (within three minutes of each
other :) I was running git from the build directory and expected it to
work, as I was testing a few changed I had made to the fetch code.
Mea culpa, I tend to forget that git tends to behave like a bunch of
shell scripts that happen to be written in C. Thanks to both.
cmn
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
next prev parent reply other threads:[~2011-09-30 23:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-28 16:04 6d4bb3833c3d2114d (fetch: verify we have everything we need before updating our ref) breaks fetch Carlos Martín Nieto
2011-09-28 18:50 ` Junio C Hamano
2011-09-28 18:53 ` Jeff King
2011-09-30 23:48 ` Carlos Martín Nieto [this message]
2011-09-28 19:12 ` Jakub Narebski
2011-09-30 23:54 ` Carlos Martín Nieto
2011-10-01 6:03 ` Jeff King
2011-10-01 10:38 ` Philip Oakley
2011-10-01 10:54 ` Jeff King
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=1317426491.4331.23.camel@centaur.lab.cmartin.tk \
--to=cmn@elego.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/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).