From: "Kristian Høgsberg" <krh@redhat.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Daniel Barkalow <barkalow@iabervon.org>, git@vger.kernel.org
Subject: Re: [PATCH] builtin-clone: Implement git clone as a builtin command.
Date: Wed, 12 Dec 2007 10:24:23 -0500 [thread overview]
Message-ID: <1197473063.9269.20.camel@hinata.boston.redhat.com> (raw)
In-Reply-To: <7vejdsbo7d.fsf@gitster.siamese.dyndns.org>
On Tue, 2007-12-11 at 19:12 -0800, Junio C Hamano wrote:
> Kristian Høgsberg <krh@redhat.com> writes:
>
> > On Tue, 2007-12-11 at 15:59 -0500, Daniel Barkalow wrote:
> >> On Tue, 11 Dec 2007, Kristian Høgsberg wrote:
> >>
> >> > Ok, don't flame me, I know this isn't appropriate at the moment with
> >> > stabilization for 1.5.4 going on, but I just wanted to post a heads up
> >> > on this work to avoid duplicate effort. It's one big patch at this point
> >> > and I haven't even run the test suite yet, but that will change.
> >>
> >> Is that why you misspelled Junio's email address? :)
> >
> > Hehe, yeah, do not mess with maintainers in release mode :)
>
> Actually this is a bit unfortunate, regardless of everybody being in
> release and bugfix only mode.
Well, let's just pick up the discussion in January, I have a lot of
other stuff I'm trying to do anyway :)
> I was hoping that the evolution path for clone would be to first make it
> a very thin wrapper around:
>
> git init
> git remote add -f
> git checkout
>
> sequence.
However, let me just say that the patch I sent is almost just that.
Part of the patch refactors init-db to be useful from clone, part of the
code is option parsing and figuring out the git dir, work tree. Also,
the part of the patch that does 'git checkout' is approximately 20 lines
that end up calling unpack_tre() and then write_cache(). The bulk of
the work here is really just builtin boilerplate code, option parsing
and the builtin-clone tasks you describe below (HEAD discovery, --shared
and --reference optimizations and the local hardlink optimization - all
these are in the 500 line builtin-clone.c I sent).
And maybe it makes sense to use builtin-remote for the remote add -f
part, but the fetch part of the patch is 10 lines to set up for
fetch_pack(). So while I do agree that it makes sense to keep remotes
handling in one place, doing the fetch_pack() in builtin-clone.c doesn't
seem like a big duplication of code. And either way, I agree with
Dscho, once we have either builtin-clone or builtin-fetch it's easier to
share code and refactor, and there is not a strong reason to do one or
the other first.
cheers,
Kristian
next prev parent reply other threads:[~2007-12-12 15:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-11 19:57 [PATCH] builtin-clone: Implement git clone as a builtin command Kristian Høgsberg
2007-12-11 20:59 ` Daniel Barkalow
2007-12-11 23:38 ` Kristian Høgsberg
2007-12-12 3:12 ` Junio C Hamano
2007-12-12 3:20 ` Junio C Hamano
2007-12-12 11:12 ` Johannes Schindelin
2007-12-12 15:04 ` Kristian Høgsberg
2007-12-12 18:24 ` Johannes Schindelin
2007-12-12 15:24 ` Kristian Høgsberg [this message]
2007-12-12 18:00 ` Daniel Barkalow
2007-12-12 18:25 ` Kristian Høgsberg
2007-12-12 18:40 ` Daniel Barkalow
2007-12-24 1:52 ` J. Bruce Fields
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=1197473063.9269.20.camel@hinata.boston.redhat.com \
--to=krh@redhat.com \
--cc=barkalow@iabervon.org \
--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).