Pieter de Bie 8fde62f1b0 PBEasyPipe: Wait until exit if we're not in the main thread
There have been numerous bug reports about zombie processes in GitX,
because if an NSThread dies before an NSTask is finished it won't
kill the child process properly.

We tried to fix this by adding an [NSTask waitUntilExit] to wait for the
process to die, fixing the problem with the zombies. However, this caused
another problem: rendering glitches in the history view.

The problem is that [NSTask waitUntilExit] does NOT wait until the task has
finished (yeah, took me some time to figure that one out). Instead, it runs
the main loop and periodically queries if the task has finished yet.

What happens then is that during the drawing of one of the cells a call
is made to [repository headRef] to determine whether we should show the
cell in bold or not.

[repository headRef] then invokes an NSTask to figure out what the HEAD ref
really is. This in turn runs the [NSTask waitUntilExit].

Now, rather than really wait, the NSTask continues the main loop, and Cocoa
tries to display the next cell. This cell again calls an NSTask, etc...

So, what we basically have then is that halfway through the NSCell's drawing
code, the NSCell will be asked to draw another cell. It then changes the
data members and calls the [drawInRect] stuff again. the cell finishes
drawing, and control is returned to the previous draw. This path happily
continues, but now its data members are changed because of the second
draw, so it continues drawing something different than what it started
with.

As you might imagine, it took me some time to figure that one out :) The
next part is to fix it, of course, which might be somewhat tougher.
There's the easy fix to only [waitUntilExit] if the current thread is
not the main thread. This fixes our problem because nothing is drawn
in other threads, and nothing is zombie'd if it's called from the
main thread.

Another way is to fix the drawing code not to use data members. That
way the drawing can continue happily as if nothing ever happend

A third way is to fix the drawing part to never execute a git call.

I think the first and third way are OK to do. The second option doesn't
look very entertaining or practical.

Of course, the first option is only working around the problem, and
only solves this particular case. I guess this is one of those cases
of "I'll work around it this time.. if it bugs me later, I'll fix
it properly".
2009-01-25 02:14:13 +00:00
2009-01-19 16:38:02 +00:00
2009-01-25 02:14:09 +00:00
2009-01-19 16:38:02 +00:00
2008-12-04 20:56:15 +01:00
2008-06-21 13:41:55 +02:00
2008-09-17 12:58:39 +02:00
2008-11-17 13:54:37 +01:00
2008-06-21 13:30:57 +02:00
2008-11-17 15:31:56 +01:00
2008-06-16 00:25:34 +02:00
2008-09-20 22:23:51 +02:00
2008-10-21 15:43:26 +02:00
2008-11-17 14:08:25 +01:00
2008-06-13 15:41:30 +02:00
2008-10-21 15:43:26 +02:00
2008-10-21 15:43:26 +02:00
2008-10-21 15:43:26 +02:00
2008-10-21 15:43:26 +02:00
2009-01-25 02:14:09 +00:00
2009-01-25 02:14:09 +00:00
2009-01-25 02:14:09 +00:00
2009-01-25 02:14:09 +00:00
2008-11-24 22:54:04 +01:00
2008-11-24 22:54:04 +01:00
2008-09-19 13:56:46 +02:00
2008-09-19 19:22:40 +02:00
2009-01-25 02:14:09 +00:00
2008-11-24 22:54:04 +01:00
2008-12-22 20:47:36 +01:00
2008-12-22 20:47:36 +01:00
2008-11-26 17:44:24 +01:00
2008-10-21 15:43:26 +02:00
2008-09-12 19:35:11 +02:00
2008-09-24 17:19:58 +02:00
2008-09-24 17:19:58 +02:00
2008-11-24 22:32:46 +01:00
2008-11-24 22:32:46 +01:00
2008-06-13 15:41:30 +02:00

GitX
---------------

# What is GitX?

GitX is a gitk like clone written specifically for OS X Leopard and higher.
This means that it has a native interface and tries to integrate with the
operating system as good as possible. Examples of this are drag and drop
support and QuickLook support.


# Features

The project is currently still in its starting phases. As time goes on,
hopefully more features will be added. Currently GitX supports the following:

  * History browsing of your repository
  * See a nicely formatted diff of any revision
  * Search based on author or revision subject
  * Look at the complete tree of any revision
    * Preview any file in the tree in a text view or with QuickLook
    * Drag and drop files out of the tree view to copy them to your system
   * Support for all parameters git rev-list has
# License

GitX is licensed under the GPL version 2. For more information, see the attached COPYING file.

# Downloading

GitX is currently hosted at GitHub. It's project page can be found at
http://github.com/pieter/gitx. Recent binary releases can be found at
http://github.com/pieter/gitx/wikis.

If you wish to follow GitX development, you can download the source code
through git:

  git clone git://github.com/pieter/gitx

# Installation

The easiest way to get GitX running is to download the binary release from the
wiki. If you wish to compile it yourself, you will need XCode 3.0 or later. As
GitX makes use of features available only on Leopard (such as garbage
collection), you will not be able to compile it on previous versions of OS X.

To compile GitX, open the GitX.xcodeproj file and hit "Build".

# Usage

GitX itself is fairly simple. Most of its power is in the 'gitx' binary, which
you should install through the menu. the 'gitx' binary supports most of git
rev-list's arguments. For example, you can run `gitx --all' to display all
branches in the repository, or `gitx -- Documentation' to only show commits
relating to the 'Documentation' subdirectory. With `gitx -Shaha', gitx will
only show commits that contain the word 'haha'. Similarly, with 'gitx
v0.2.1..', you will get a list of all commits since version 0.2.1.

# Helping out

Any help on GitX is welcome. GitX is programmed in Objective-C, but even if
you are not a programmer you can do useful things. A short selection:

  * Create a nice icon;
  * Help with the Javascript/HTML views, such as the diff view;
  * File bug reports and feature requests.

A TODO list can be found on the wiki: http://github.com/pieter/gitx/wikis/todo

S
Description
No description provided
Readme 9.8 MiB
Languages
Objective-C 71.2%
CSS 11.8%
JavaScript 6.8%
HTML 5.5%
SCSS 1.5%
Other 3.2%