* commit 'ciaran/cli':
Adding a menu item to install the CLI tool.
The repository is owned by the window controller now, and PBWebGitController shouldn't need to use the ApplicationController
The ApplicationController does not own a repository any more
Amend the CLI tool to use the distributed objects system to try opening the current path when invoked.
Overriding -documentForURL: to use +gitDirForURL: to convert incoming URLs to the .git dir before checking for an open document, so that open a repository from subdirectories won’t open duplicate windows.
Separating out the logic for finding the .git dir for a given path in a repository, so it can be used in other places.
Adding a basic command-line tool to interface with the application through distributed objects.
Multiple repositories can now be opened by using the File → Open… menu option.
Each document is a PBGitRepository with a PBDetailController controlling the window. PBRepositoryDocumentController is the document controller.
When launched, the application will attempt to open a repository with the current directory as its path. If this fails it will display an open panel to allow the user to select one.
PBDetailController is the window controller, and now takes ownership of the repository so we can bind to it through File’s Owner in the nib file. Currently the ApplicationController creates a new PBDetailController at startup with the opened repository.
Added Rakefile that does install and uninstall.
Also providded are sub-tasks that do things like build GitX, copy it to
~/Applications/ or /Applications/, cleaning the build and removing GitX.app
Signed-off-by: Pieter de Bie <pdebie@ai.rug.nl>
The revision walking code made the PBGitRepository unclean. Especially if
we want to keep multiple PBGitRepository objects around (e.g. persistent
data store), it needs to be more simple. This neatly extracts the revision
walking code from the repository code.
This uses an NSMutableArray to increase the currentLine if the buffer is
full. This prevents very long messages from breaking the parsing.
If we cannot parse the log line, simple ignore it.
This is not complete and perhaps should not have been committed. However,
.xib files being what they are, rewriting history or merging is getting
very difficult so I'll just disable it for now.
If anyone wants to take a look at this: we should probably do some rev-parsing
to create a graph representation in ApplicationController. That class already
is a delegate for our table and can tell individual cells what to display.
There we should tell how many lines to draw, what color, if there are merges
or splitoffs etc.
This uses the C fgets() over the weird readLine implementation I found.
It speeds up the rev-parsing significantly: we went from ~4.5 seconds
on the git.git repo to ~0.95 seconds. And that's with the secret new date
parsing!
If a commit had invalid UTF-8 characters in them -- like one in git.git for
example -- then the revparsing would stop halfway through. This patch first
tries UTF-8 enconding, and if that fails, falls back to ASCII encoding.
Subclasses NSOutlineView to PBQLOutlineView that takes a controller which
should respond to toggleQuickLook:. This is used for our tree walker to
actually show QuickLook when space is pressed.
This adds a QuickLook button that will allow you to directly view any file in
the tree view in QuickLook. This is really nice for PDF's and images. You can
select multiple files and even play a slideshow if you want.
Currently it does not remove temporary files it created. This means that they
will probably stay around until you reboot.