Commit Graph

46 Commits

Author SHA1 Message Date
Pieter de Bie 1f783c91c4 Reload refs on refresh 2008-09-19 19:17:07 +02:00
Pieter de Bie db39aeebeb Also look for git in /usr/local/bin/git 2008-09-18 02:22:35 +02:00
Pieter de Bie 8c94e1b514 Optimize revision walker bindings
This simplifies the procedure used to walk revisions
by only loading in commits if the branch selection
was changed.
2008-09-14 15:09:20 +02:00
Pieter de Bie 69c340e4a8 Fix an out-of-bounds bug 2008-09-13 00:24:08 +02:00
Pieter de Bie f0fb0c87cd Also display HEAD if on a detached HEAD 2008-09-12 22:57:22 +02:00
Pieter de Bie 3d42a4e942 Select the current HEAD if running gitx without arguments 2008-09-12 18:44:10 +02:00
Pieter de Bie 0617f11619 Select existing ref if it exists 2008-09-12 18:44:06 +02:00
Pieter de Bie 12e2044c34 Simplify PBGitRevList
We don't need the old initialisation anymore
2008-09-12 18:03:55 +02:00
Pieter de Bie 3c7a22ef56 Let the gitx CLI use our RevSpecification 2008-09-12 17:56:42 +02:00
Pieter de Bie dea6a77d02 Add branch control to the PBGitRepository
This allows you to add and select specific branches
2008-09-12 17:55:45 +02:00
Pieter de Bie e3af731305 Use a PBGitRevSpecifier to specify possible branches 2008-09-12 17:28:08 +02:00
Pieter de Bie 42e8196e1f Pass on arguments from the command line to the revwalk mechanism 2008-09-12 13:18:05 +02:00
Pieter de Bie bcba52e3d9 Fix detection of bare repositories 2008-09-12 12:37:23 +02:00
Pieter de Bie db68f38232 Also display remote heads in branch list 2008-09-12 11:45:05 +02:00
Pieter de Bie 06f737df9a Use PBGitRef for other refs 2008-09-06 23:00:41 +02:00
Pieter de Bie 96917943b6 Fix a crashing bug in PBGitRepository
A ref might be less than 11 characters. In those cases, the substringToIndex
would produce a fatal out-of-bounds.
2008-09-06 22:29:18 +02:00
Pieter de Bie b4d7816be7 Grapher: draw ref names
This simply draws the ref names in the cell, without any markup or correct
rect.
2008-08-28 18:07:34 +02:00
Pieter de Bie ae7d15a247 Grapher: dereference annotated tags
The for-each-ref construct used to return the tag sha for annotated tags.
We're not really interested in that, so also display its referenced object.
2008-08-28 17:46:54 +02:00
Pieter de Bie 9bfccb5ea5 Grapher: add first part of displaying refs
This adds the "hasRef" boolean member in PBGitCellInfo which is set to true
if the specific commit has symbolic refs.

This is the first part in supporting labels just like gitk has. For now,
commits with refs are just displayed with a red circle.

Things that need to be done to support all refs:

	* Make the NSDictionary in PBGitRepository contain arrays of refs,
	  not a single string
	* Make PBGitGrapher store all refs of a commit in the PBGitCellInfo
	* Figure out a nice way to display the labels in PBGitRevisionCell
2008-08-28 17:29:34 +02:00
Ciarán Walsh 12faa4a8f0 Avoid showing .git dirs in the recent documents menu.
Instead (for non-bare repos) add the directory above the .git dir.
2008-08-19 00:16:15 +02:00
Pieter de Bie d320a4bc43 Fix a bug in reading the current branch 2008-08-18 23:59:45 +02:00
Pieter de Bie ec9861e543 Allow switching of branches 2008-08-18 23:54:48 +02:00
Pieter de Bie 3e8fbf6d15 Refactor command output to new functions 2008-08-18 23:26:15 +02:00
Pieter de Bie 9135163f24 Read the current branch from the repository 2008-08-18 23:06:37 +02:00
Pieter de Bie eeca836454 Also readBranches when opening as a NSDocument. 2008-08-18 22:26:34 +02:00
Pieter de Bie f786fe2b0b Read branches in a repository
This adds a -readBranches function which allows you to read in all
branches in our repository. It is used in the branch display popup box.
2008-08-18 22:03:41 +02:00
Ciarán Walsh e5b2f0d2b9 Separating out the logic for finding the .git dir for a given path in a repository, so it can be used in other places. 2008-08-18 17:21:43 +01:00
Ciarán Walsh 3998ffece2 Since we are using NSDocument now it’s best to use the document fileURL to store the .git path. 2008-08-18 08:58:47 +01:00
Ciarán Walsh b85a205698 Completing the document-based app setup.
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.
2008-08-18 08:58:39 +01:00
Pieter de Bie 2e3a79af4a Fix compilation warnings 2008-06-21 14:06:04 +02:00
Pieter de Bie 17df4e808a PBGitRepository: search for git binary on more paths 2008-06-21 14:05:55 +02:00
Pieter de Bie ede8892dc9 PBGitRepository: Abstract revision walking to new class PBGitRevList
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.
2008-06-17 19:32:38 +02:00
Pieter de Bie 447a8dc48c PBGitRepository: Also request parents when doing our revwalk
This is necessary for cool graph displaying, to be made.
2008-06-17 19:18:40 +02:00
Pieter de Bie 60db4c4e33 Make the revlist parsing more robust
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.
2008-06-17 15:56:54 +02:00
Pieter de Bie 39797876fe Optimize rev-list parsing
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!
2008-06-17 15:04:49 +02:00
Pieter de Bie e2b507313b Delete temporary files when they are deallocated
This will remove a lot of the stray files in the
temporary dir. However, they won't be deleted on exit
of the program. What to do about this?
2008-06-17 05:56:00 +02:00
Pieter de Bie 08757ad610 Add easy pipe handling library. Use it to find real git repository path
This adds a new class, PBEasyPipe, which can do most of the pipe handling
in an easy way.

We use this to call `git rev-parse --git-dir` to find our current git
repository. This means that we can now call GitX within a subdirectory :)
2008-06-16 01:52:12 +02:00
Pieter de Bie 9be3c50a75 Add a Tree displayer
This displays the tree of a specific commit in an NSBrowser.
2008-06-15 20:35:07 +02:00
Pieter de Bie 9a40fd9748 Remove some debug output 2008-06-15 16:46:31 +02:00
Pieter de Bie 2e4ea6edab Load commit list in a separate thread
This makes the initial startup much faster. Commits get loaded in a separate
thread, and are displayed every 1000 commits.

There is a bug in here that makes fails a click while it is loading the commit
list. Not sure how to fix this, perhaps send the arrayController?
2008-06-15 16:46:25 +02:00
Pieter de Bie ce61cdf46f Make git log --pretty < v1.5.6 compatible
removes the %x01 syntax which is only available in 1.5.6 and later
2008-06-14 20:06:58 +02:00
Pieter de Bie 3dd9e2a41c Guess user's git location 2008-06-14 20:06:07 +02:00
Pieter de Bie 4ba028dcde Test 2008-06-14 18:48:44 +02:00
Pieter de Bie d444c9d5d1 Add an author field 2008-06-14 02:31:29 +02:00
Pieter de Bie b752f5bc02 Add a search field and subject 2008-06-14 02:24:55 +02:00
Pieter de Bie 0fda285125 Use a separate Git class 2008-06-13 17:09:42 +02:00