* Git Library?
@ 2008-04-28 18:55 Patrick Altman
2008-04-28 19:10 ` Johannes Schindelin
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Patrick Altman @ 2008-04-28 18:55 UTC (permalink / raw)
To: git
I want to write a Mac OSX UI for git.
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?
Thanks,
Patrick Altman
---
Patrick Altman
(615) 300-2930
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Git Library?
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-29 6:58 ` David Aguilar
2 siblings, 0 replies; 8+ messages in thread
From: Johannes Schindelin @ 2008-04-28 19:10 UTC (permalink / raw)
To: Patrick Altman; +Cc: git
Hi,
On Mon, 28 Apr 2008, Patrick Altman wrote:
> I want to write a Mac OSX UI for git.
>
> 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?
There was a mail thread yesterday on exactly the same subject. Bottom
line: the recommended way is to fork()&&exec(), because I am sure you do
not want to put in the work to make libgit.a reentrant.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Git Library?
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-29 6:58 ` David Aguilar
2 siblings, 1 reply; 8+ messages in thread
From: Jakub Narebski @ 2008-04-28 21:08 UTC (permalink / raw)
To: Patrick Altman; +Cc: git
Patrick Altman <paltman@gmail.com> writes:
> I want to write a Mac OSX UI for git.
Something like GitNub?
> 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?
Take a look how other GUIs does it.
--
Jakub Narebski
Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Git Library?
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
0 siblings, 2 replies; 8+ messages in thread
From: Patrick Altman @ 2008-04-28 21:17 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
On Apr 28, 2008, at 4:08 PM, Jakub Narebski wrote:
> Patrick Altman <paltman@gmail.com> writes:
>
>> I want to write a Mac OSX UI for git.
>
> Something like GitNub?
Not really. GitNub is really an interface for GitHub. I am thinking
something more like ZigVersion, http://zigzig.com/, for Git instead of
Subversion.
>> 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?
>
> Take a look how other GUIs does it.
git-gui is written in TCL I believe, which I do not want to use.
GitNub is the only other GUI of sorts that i am aware of but like I
mentioned above, that really is more of a GitHub interface and less of
a git interface.
I think that this point I am just going to use NTask and the like in
Cocoa/Objective-C to wrap the command line utilities.
Thanks,
Patrick
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Git Library?
2008-04-28 21:17 ` Patrick Altman
@ 2008-04-28 22:01 ` Jakub Narebski
2008-04-28 22:09 ` David Symonds
1 sibling, 0 replies; 8+ messages in thread
From: Jakub Narebski @ 2008-04-28 22:01 UTC (permalink / raw)
To: Patrick Altman; +Cc: git
On Mon, 28 Apr 2008, Patrick Altman wrote:
> On Apr 28, 2008, at 4:08 PM, Jakub Narebski wrote:
>> Patrick Altman <paltman@gmail.com> writes:
>>
>>> I want to write a Mac OSX UI for git.
>>
>> Something like GitNub?
>
> Not really. GitNub is really an interface for GitHub. I am thinking
> something more like ZigVersion, http://zigzig.com/, for Git instead of
> Subversion.
Well, I thought that GitNub is something similar to gitk, i.e. it is
history browser, but in Ruby/Cocoa instead of Tcl/Tk.
>>> 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?
>>
>> Take a look how other GUIs does it.
>
> git-gui is written in Tcl I believe, which I do not want to use.
> GitNub is the only other GUI of sorts that i am aware of but like I
> mentioned above, that really is more of a GitHub interface and less of
> a git interface.
Take a look at http://git.or.cz/gitwiki/InterfacesFrontendsAndTools
page: there is a list of GUIs there. There is gitk and git-gui,
there is QGit and varipus PyQt GUIs, there is Giggle, there is tig.
> I think that this point I am just going to use NTask and the like in
> Cocoa/Objective-C to wrap the command line utilities.
I think best would be to see how QGit does it...
--
Jakub Narebski
Poland
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Git Library?
2008-04-28 21:17 ` Patrick Altman
2008-04-28 22:01 ` Jakub Narebski
@ 2008-04-28 22:09 ` David Symonds
1 sibling, 0 replies; 8+ messages in thread
From: David Symonds @ 2008-04-28 22:09 UTC (permalink / raw)
To: Patrick Altman; +Cc: Jakub Narebski, git
On Tue, Apr 29, 2008 at 7:17 AM, Patrick Altman <paltman@gmail.com> wrote:
> I think that this point I am just going to use NTask and the like in
> Cocoa/Objective-C to wrap the command line utilities.
That's the way I approached it when I started doing a half-hearted
attempt at exactly what you're proposing. Clone my (small) rough code
from http://git.symonds.id.au/macgit.git
Dave.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Git Library?
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-29 6:58 ` David Aguilar
2008-04-29 7:02 ` David Aguilar
2 siblings, 1 reply; 8+ messages in thread
From: David Aguilar @ 2008-04-29 6:58 UTC (permalink / raw)
To: Patrick Altman; +Cc: git
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Git Library?
2008-04-29 6:58 ` David Aguilar
@ 2008-04-29 7:02 ` David Aguilar
0 siblings, 0 replies; 8+ messages in thread
From: David Aguilar @ 2008-04-29 7:02 UTC (permalink / raw)
To: Patrick Altman; +Cc: git
> http://repo.or.cz/ugit.git
Sorry, wrong url.
http://repo.or.cz/w/ugit.git
--
David
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-04-29 7:02 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2008-04-29 7:02 ` David Aguilar
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).