Subject: Re: If you would write git from scratch now, what would you change?

From: "Shawn O. Pearce" <[email-masked]>
Date: Mon, 26 Nov 2007 20:20:13 -0500

Marco Costalba <[email-masked]> wrote:
> On Nov 26, 2007 5:46 PM, Andy Parkins <[email-masked]> wrote:
> > Jakub Narebski wrote:
> >
> > > If you would write git from scratch now, from the beginning, without
> > > concerns for backwards compatibility, what would you change, or what
> > > would you want to have changed?
> >
> >  - "git-gui" would be written in Qt (ducks)
> 
> But...wait...Qt would require...(I'm scared to say!)... that awful,
> painful, hopeless thing called C++. Probably you didn't mean what you
> said ;-)

Heh.

I'll never port git-gui to Qt.  Because of that awful, painful
thing called C++ that it uses.  I despise C++.  No, please don't
start a C++ language war again on the list.  :-)

I recently considered porting git-gui to XUL, as nobody has ever
said "Firefox isn't native enough on my OS!".  It also (maybe) has
the benefit of having a large developer base (everyone and their
dog has coded in HTML and Javascript before, except maybe Linus).

But XUL doesn't support launching a process and connecting pipes
to its stdin and stdout.  I started to try and create an XPCOM
extension to provide that functionality from NSPR and started to
run into major problems compiling the XPCOM plugin, getting the
necessary interfaces implemented, etc.

In the end I was able to recreate the bulk of the main git-gui UI in
XUL in just an hour or so, but spent days trying to just do a basic
thing like "git diff-index --cached -z HEAD" and consume the result.
I never even got that to work so I just gave up on the idea.

So git-gui is in Tcl/Tk for the long-term.  However I'm going
to try and port git-gui over to the Tcl/Tk 8.5 "tiles" extension
(if it is available on your system) so we can get better looking
native widgets.  I'll still fall back to the old style widgets for
Tcl/Tk 8.4 so existing users aren't forced to upgrade to 8.5 just
to use the latest git-gui.  (But really, 8.5 isn't that hard to
build and install...)

-- 
Shawn.