git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Han-Wen Nienhuys <hanwen@xs4all.nl>
Cc: git@vger.kernel.org
Subject: Re: git-fast-export ?
Date: Mon, 19 Feb 2007 03:25:26 -0500	[thread overview]
Message-ID: <20070219082525.GD30030@spearce.org> (raw)
In-Reply-To: <45D84A6B.3060402@xs4all.nl>

Han-Wen Nienhuys <hanwen@xs4all.nl> wrote:
> Wouldn't it make sense to build a git-fast-export, which 
> can be used to interrogate a git-repository: a GIT tool 
> could run a single git command, 
> 
> this would make interfacing with Git from scripts more ergonomical, 
> less dependent on changes in the UI of porcelains, and in some cases
> more efficient.

Maybe.

But without knowing what the UI program wants, its hard to say what
should be implemented there.  I'm not going to create something on
a hunch that it will be useful someday - that's just not a practical
use of my time.

Worse, most scripting level languages have a hard time working
with a bidirectional pipe to a process.  What you want here is
stdin and stdout pipes, so you can send a command and then receive
the response.  This can be a challenge in something like Tcl,
maybe not fully portable in Perl, etc.

Even worse, some parts of Git are not reentrant.  They are currently
built to run once and have the UNIX process terminate quickly
afterwards.  Keeping it running to answer more queries from the
UI may cause the Git process to leak memory over a longer term,
cause it to crash after a couple of successive repack/prune/gc, etc.

There are a number of interesting operations within Git that a UI
would want to query, but that may not be a good idea to expose from
a within a long running UNIX process, for those reasons.  fast-import
doesn't do these, so its reasonable to keep up for extended periods,
but even fast-import assumes it will terminate at some point as it
hangs onto its object table for the entire lifespan of the process.

-- 
Shawn.

      reply	other threads:[~2007-02-19  8:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-11 23:56 darcs2git.py - convert darcs repository using gfi Han-Wen Nienhuys
2007-02-12  1:14 ` Shawn O. Pearce
2007-02-13 22:42   ` Han-Wen Nienhuys
2007-02-18 12:45   ` git-fast-export ? Han-Wen Nienhuys
2007-02-19  8:25     ` Shawn O. Pearce [this message]

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=20070219082525.GD30030@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=hanwen@xs4all.nl \
    /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).