From: Jeff King <peff@peff.net>
To: Christian Couder <christian.couder@gmail.com>
Cc: Jens Lehmann <Jens.Lehmann@web.de>,
Junio C Hamano <gitster@pobox.com>,
git@vger.kernel.org, git-dev@github.com
Subject: Re: [PATCH] fetch: avoid quadratic loop checking for updated submodules
Date: Tue, 13 Sep 2011 13:15:06 -0400 [thread overview]
Message-ID: <20110913171506.GA32251@sigill.intra.peff.net> (raw)
In-Reply-To: <CAP8UFD3ULs9YLCaaJYGo-_A=KqO4yFy3WHJmO5b_hyRSPzA-Vg@mail.gmail.com>
On Tue, Sep 13, 2011 at 06:40:07PM +0200, Christian Couder wrote:
> > +struct argv_array {
> > + const char **argv;
> > + unsigned int argc;
> > + unsigned int alloc;
> > +};
>
> But there is already such a struct in bisect.c!
Heh. I completely missed that. As I was writing it, I realized it would
be a good thing to factor out, but most of the argv builders I checked
weren't dynamic at all (they knew up front how big argv would need to be
because they were copying).
As it turns out, our implementations are remarkably similar considering
I hadn't read yours. It must mean they're both obviously correct. :)
> So it would be nice if you could refactor this and the argv_array
> functions in bisect.c in the same way you refactored sha1-array.
Will do. Junio, do you want me to re-roll the quadratic fix, or just
build the refactoring on top?
-Peff
next prev parent reply other threads:[~2011-09-13 17:15 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-12 19:56 [PATCH] fetch: avoid quadratic loop checking for updated submodules Jeff King
2011-09-12 20:21 ` Junio C Hamano
2011-09-13 19:34 ` Jens Lehmann
2011-09-14 18:26 ` Jens Lehmann
2011-09-12 21:25 ` Junio C Hamano
2011-09-12 22:49 ` Jeff King
2011-09-12 23:06 ` Junio C Hamano
2011-09-12 23:25 ` Jeff King
2011-09-12 23:33 ` Junio C Hamano
2011-09-13 19:13 ` Jens Lehmann
2011-09-13 22:17 ` Jeff King
2011-09-14 13:20 ` Marc Branchaud
2011-09-14 18:27 ` Jens Lehmann
2011-09-14 18:29 ` Jeff King
2011-09-13 16:40 ` Christian Couder
2011-09-13 17:15 ` Jeff King [this message]
2011-09-13 17:34 ` Junio C Hamano
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=20110913171506.GA32251@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=Jens.Lehmann@web.de \
--cc=christian.couder@gmail.com \
--cc=git-dev@github.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).