git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David Aguilar" <davvid@gmail.com>
To: "Patrick Altman" <paltman@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Git Library?
Date: Mon, 28 Apr 2008 23:58:48 -0700	[thread overview]
Message-ID: <402731c90804282358i205334b8me56f4390456873b4@mail.gmail.com> (raw)
In-Reply-To: <5FCF765E-F3FF-438C-B4C1-FFB3262831A0@gmail.com>

On Mon, Apr 28, 2008 at 11:55 AM, Patrick Altman <paltman@gmail.com> wrote:
> I want to write a Mac OSX UI for git.
>

git gui works on OSX.
Aside from that, someone's already written one* :-)

    http://repo.or.cz/ugit.git
    http://ugit.sf.net/


>  Is there a documented/undocumented API for interacting with git in process?
> Or would I be better off "shelling out" to the git command line?

Fork/exec.

If you grabbed the ugit modules you could say:

    from ugit import git

    revisions = git.rev_list(all=True).splitlines()

    file = open('msg', 'w')
    file.write("commit message." )
    file.close()

    git.commit(F='msg', s=True)

    etc, etc.

It's pretty much 90%+ of git wrapped in Python.
If a libgit.so did appear one day it would be trivial to swap out the
meta-functions in
git.py and replace them with e.g. swig replacements.  Until then,
forking out works
just fine.

stg also has Python wrapped around git so you could look there too.

-- 
 David


* - okay, I lied. It's PyQt4.  But it does run on OSX and looks just
like any other cocoa app.

  parent reply	other threads:[~2008-04-29  6:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-28 18:55 Git Library? Patrick Altman
2008-04-28 19:10 ` Johannes Schindelin
2008-04-28 21:08 ` Jakub Narebski
2008-04-28 21:17   ` Patrick Altman
2008-04-28 22:01     ` Jakub Narebski
2008-04-28 22:09     ` David Symonds
2008-04-29  6:58 ` David Aguilar [this message]
2008-04-29  7:02   ` David Aguilar

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=402731c90804282358i205334b8me56f4390456873b4@mail.gmail.com \
    --to=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=paltman@gmail.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).