From: Jon Seymour <jon.seymour@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Subject: Re: Core and Not-So Core
Date: Thu, 12 May 2005 07:09:38 +1000 [thread overview]
Message-ID: <2cfc403205051114096117e62f@mail.gmail.com> (raw)
In-Reply-To: <2cfc403205051114087d283279@mail.gmail.com>
On 5/12/05, Daniel Barkalow <barkalow@iabervon.org> wrote:
> On Wed, 11 May 2005, Jon Seymour wrote:
>
> > The repository API would contain functionality equivalent to cat-file,
> > ls-tree, most of fsck-cache, rev-list, rev-tree, diff-tree, most of
> > the transport code - things that don't involve use of the index.
> >
> > The workspace API would contain read-tree, write-tree, commit-tree,
> > etc - things that do involve use of the the index.
>
> Unfortunately for this idea, you can't actually check files into or out of
> the repository using the git tools without the index (in memory at least,
> if not on disk). This is a bit like having a libc with all the system
> calls except read and write. Sure, there are a number of programs that
> would be fine that way, but it makes the API unintuitive, and most serious
> programs need the extension anyway.
>
Daniel,
Checking in/checking out is definitely a workspace API function that
involves an index (almost certainly) an on-disk index, but reading and
writing from and to the repository is purely a repository API
function.
There is no reason why the workspace API can't make use of
"lower-level" functions in the repository API. I guess I would argue
that the repository API really shouldn't need much, if any knowledge,
of the workspace API.
The repository API knows about the on-disk structure of repository
objects - it knows how to write writing compressed, SHA1 signed
objects, it also knows how to pack and unpack the various object types
from their on-disk representation into structures manipulated by the
workspace API.
On the otherhand the workspace API knows about managing index
(workspace) state. It knows how to determine whether the
pre-conditions for a commit have been reached. It knows how to read
the workspace structures and coordinate read and writes from and to
the repository.
I really don't think this makes the API unintuitive, but then I don't
really understand why you think this is the case.
jon.
--
homepage: http://www.zeta.org.au/~jon/
blog: http://orwelliantremors.blogspot.com
next prev parent reply other threads:[~2005-05-11 21:03 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-10 15:00 Core and Not-So Core Jon Seymour
2005-05-10 15:38 ` David Woodhouse
2005-05-10 15:50 ` Eduardo Teixeira Dias
2005-05-10 16:00 ` David Woodhouse
2005-05-10 16:19 ` Eduardo Teixeira Dias
2005-05-10 21:45 ` Diego Calleja
2005-05-10 22:33 ` Eduardo Teixeira Dias
2005-05-10 23:03 ` Diego Calleja
2005-05-10 23:11 ` Horst von Brand
2005-05-10 22:33 ` Eduardo Teixeira Dias
2005-05-10 22:34 ` Eduardo Teixeira Dias
2005-05-10 22:44 ` Petr Baudis
2005-05-10 22:54 ` Andreas Gal
2005-05-10 23:04 ` James Purser
2005-05-11 7:17 ` Christoph Hellwig
2005-05-11 7:42 ` Jon Seymour
2005-05-10 16:22 ` Jon Seymour
2005-05-10 17:03 ` David Woodhouse
[not found] ` <2cfc403205051010151304d88a@mail.gmail.com>
2005-05-10 17:15 ` Jon Seymour
2005-05-10 17:25 ` David Woodhouse
2005-05-10 17:36 ` Jon Seymour
2005-05-10 17:41 ` Christoph Hellwig
[not found] ` <2cfc40320505101051207c9ce4@mail.gmail.com>
2005-05-10 17:51 ` Jon Seymour
2005-05-10 18:01 ` Davide Libenzi
2005-05-11 1:59 ` Rik van Riel
2005-05-11 2:09 ` Jon Seymour
2005-05-11 2:14 ` Petr Baudis
2005-05-10 22:18 ` Daniel Barkalow
[not found] ` <2cfc40320505101605721420@mail.gmail.com>
2005-05-10 23:05 ` Jon Seymour
2005-05-10 23:08 ` Petr Baudis
2005-05-10 23:20 ` Jon Seymour
2005-05-11 16:45 ` Daniel Barkalow
[not found] ` <2cfc403205051114087d283279@mail.gmail.com>
2005-05-11 21:09 ` Jon Seymour [this message]
2005-05-10 22:52 ` Petr Baudis
2005-05-11 0:50 ` Jon Seymour
2005-05-11 1:17 ` Peter Williams
2005-05-11 2:30 ` Nicolas Pitre
2005-05-11 3:02 ` Jon Seymour
2005-05-11 11:21 ` Noel Grandin
2005-05-11 14:40 ` Jon Seymour
2005-05-18 18:35 ` Juliusz Chroboczek
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=2cfc403205051114096117e62f@mail.gmail.com \
--to=jon.seymour@gmail.com \
--cc=git@vger.kernel.org \
--cc=jon@blackcubes.dyndns.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.