Commit Graph

39 Commits

Author SHA1 Message Date
Pieter de Bie a62e14ffe7 HistoryView: Remove the BranchController
This wasn't used anyway. A good idea would be to create a new
branchcontroller that takes care of all these revs, rather than
letting PBGitRepository take care of that
2008-11-19 01:54:14 +01:00
Pieter de Bie 00e44b35d0 RefController: Allow checking out branches 2008-11-01 23:24:41 +01:00
Pieter de Bie e02ee5231c WebHistoryController: Move ref deletion to RefController
That's why it's there, after all. This also makes the system
more robust and catches some more errors.

The next thing this enables is to also allow right-clicking
on refs in the commit list.
2008-11-01 22:51:10 +01:00
Pieter de Bie 85c942f530 Merge branch 'pu/pb/git_config'
* pu/pb/git_config:
  CommitView/Gistie: Use github.user and github.login
  Add a way to retrieve values from .git/config files
2008-10-14 16:45:45 +02:00
Pieter de Bie 406125eee2 GitRepository: Cache HEAD ref
Since 63523d00e8 (History view:
Make lozenge of currently checked out branch (HEAD) bold, same as gitk.),
-[PBGitRepository headRef] was called every time a cell needed redrawing.

This made GitX slow overall, but especially when resizing the window.

So, it's better to cache the value. We'll still reload it with an
explicit refresh though.
2008-10-14 01:38:17 +02:00
Pieter de Bie afb3d45656 Add a way to retrieve values from .git/config files
This introduces the PBGitConfig class. It is KVC compliant as far
as I can see, in that you can actually bind to it in IB and use
ValueForKeyPath to retrieve values. It currently only handles
strings; it should be possible to add functions to process
booleans and numbers to it.
2008-10-14 01:02:27 +02:00
Christian Jacobsen 63523d00e8 History view: Make lozenge of currently checked out branch (HEAD) bold, same as gitk. 2008-10-10 21:59:22 +02:00
Pieter de Bie 95c4bcbaba Don't store the windowcontroller in an iVar
There's no need to, as we can just retrieve it from
the WindowControllers array.
2008-09-28 13:31:47 +02:00
Pieter de Bie a2217fe099 Reload commits after doing a commit 2008-09-28 13:03:55 +02:00
Pieter de Bie 86606ef815 Add a --commit option to the CLI client
This changes a lot of code, so quick review:

* RepositoryDocumentController now returns the document without selecting a ref
* PBGitWindowController now optionally shows the default view, or selects no view at all
* PBGitRepository keeps a pointer to its WindowController so that it can change views
2008-09-26 23:22:15 +02:00
Pieter de Bie 2676a20291 Fix some compiler warnings 2008-09-24 01:25:30 +02:00
Pieter de Bie 252796ee26 CommitView: Show basic files 2008-09-23 01:02:33 +02:00
Pieter de Bie 4ebe4b4aa9 PBGitRepository: add a handle for in-worktree-commands 2008-09-22 22:49:59 +02:00
Pieter de Bie ea3cd7287c Add support for removing refs
This is somewhat hackish, in that it reloads all commits after deleting
a ref, but at least it works
2008-09-22 21:12:26 +02:00
Pieter de Bie faef971e18 EasyPipe: Add functions to ask for the return value of commands 2008-09-22 21:11:53 +02:00
Pieter de Bie 1f783c91c4 Reload refs on refresh 2008-09-19 19:17:07 +02:00
Pieter de Bie 0617f11619 Select existing ref if it exists 2008-09-12 18:44:06 +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 7b2efe1ac2 Change current document when called with different arguments 2008-09-12 14:47:06 +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 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 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 4547d513d1 Amend the CLI tool to use the distributed objects system to try opening the current path when invoked.
When using the CLI tool (rather than a command using open(1)) it is now possible to open multiple repositores via the command-line.
2008-08-18 18:27:57 +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
Ciarán Walsh 45addc1f47 Setting up the Info.plist for a document-based application. PBGitRepository will be our document class. 2008-08-17 21:05:01 +01:00
Pieter de Bie 2e3a79af4a Fix compilation warnings 2008-06-21 14:06:04 +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 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 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 3dd9e2a41c Guess user's git location 2008-06-14 20:06:07 +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