From: Jeff King <peff@peff.net>
To: Vincent van Ravesteijn <vfr@lyx.org>
Cc: "Motiejus Jakštys" <desired.mta@gmail.com>, git@vger.kernel.org
Subject: Re: start of git2 (based on libgit2)
Date: Sat, 26 Mar 2011 09:29:15 -0400 [thread overview]
Message-ID: <20110326132915.GA2859@sigill.intra.peff.net> (raw)
In-Reply-To: <4D8D2B31.4040908@lyx.org>
On Sat, Mar 26, 2011 at 12:54:25AM +0100, Vincent van Ravesteijn wrote:
> http://librelist.com/browser/libgit2/
> >According to Jeff King[2], I should start with plumbing commands. I
> >agree. However, how deep? I.e. do I have to make sure all git rev-list
> >possible arguments are implemented?
>
> I guess a lot can be copied from Git itself. Actually
> builtin/rev-list.c consists mostly of command line arguments parsing
> methods, and outputting functions. The key is to parse what you want
> to know and ask libgit2 to provide the info. If libgit2 has
> implemented the basic functionality that is needed, the rest would be
> relatively simple.
I wouldn't worry about having _every_ argument. Some arguments are much
less frequently used than others. For example, start with basic stuff,
like including and excluding commits (e.g., "branch1 ^branch2"),
--max-count, --{min,max}-age, --grep, and others. Do common things like
path limiting. And then once all that is done and tested, start worrying
about things like --cherry-pick (or maybe not, and focus on the basics
of other simple commands).
> >Are we aiming for a distributed 100s of executables architecture
> >(current git), or single huge binary? I would go for single executable
> >for to higher portability. Is that ok?
>
> AFAICS, current git is a single binary on Windows already.
Even on Linux, most of the commands are just hardlinks to the git
executable. Most commands are built-in these days. A few are still
external but written in C (sometimes because we want to keep them small
and external, like git-daemon and git-shell). But there are still some
commands written in other languages, like pull, stash, and
add--interactive.
Check out the BUILTIN_OBJS, PROGRAM_OBJS, and SCRIPT_* variables in the
Makefile.
So yeah, for basic commands, one monolithic binary is probably fine.
-Peff
next prev parent reply other threads:[~2011-03-26 13:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-25 23:12 start of git2 (based on libgit2) Motiejus Jakštys
2011-03-25 23:54 ` Vincent van Ravesteijn
2011-03-26 2:13 ` Motiejus Jakštys
2011-03-26 13:29 ` Jeff King [this message]
2011-03-27 8:34 ` Junio C Hamano
2011-03-27 9:56 ` Vincent van Ravesteijn
2011-03-26 6:33 ` Sam Vilain
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=20110326132915.GA2859@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=desired.mta@gmail.com \
--cc=git@vger.kernel.org \
--cc=vfr@lyx.org \
/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).