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
41a906d715
PBGitRepository: Don't return a ref if we error out
...
This fixes the -parseReference: method to return nil if
there is an error in the git call. This also simplifies
our commit controller.
2008-10-29 00:24: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
Pieter de Bie
7793e5eed4
GitRepository: Quiet a git error when resolving symbolic ref
...
We already catch this in our code, so this was just
confusing the debug output.
2008-10-04 22:41:21 +02:00
Pieter de Bie
8c9697968b
Better handle the cases when a Git binary can't be found
2008-10-04 22:41:16 +02:00
Pieter de Bie
ffae6a8564
GitRepository: Add an "all branches" option in branches list
...
This is probably the most common non-branch GitX option, so
let's add it by default
2008-10-03 19:25:50 +02:00
Christian Jacobsen
e25aec668b
GitRepository: Skip empty lines when parsing refs
...
This fixes loading repositories.
2008-10-02 20:46:07 +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
b255fb39d8
Fix branch reloading
...
This fixes a regression in 86606ef8 , where the branches array was
created anew every time the branches were reloaded, causing you to
lose current branch selection.
2008-09-28 13:10:57 +02:00
Pieter de Bie
a2217fe099
Reload commits after doing a commit
2008-09-28 13:03:55 +02:00
Pieter de Bie
709547ac85
Add Commit/History options in View menu
2008-09-26 23:30:52 +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
3f923f51a1
CommitView: Add commit capability
2008-09-24 01:08:10 +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
ef6b506dc7
Check if a repository is valid
2008-09-20 12:14:58 +02:00
Pieter de Bie
7f337cda2a
Show current branch in branch menu
...
This kept going broken, so now instead of Interface Builder bindings,
we create the binding ourselves
2008-09-20 11:24:21 +02:00
Pieter de Bie
7bc7302bd4
Don't show tags anymore in branch menu
...
This was accidentally added after the xib splitting
2008-09-19 21:46:54 +02:00
Pieter de Bie
708c08a293
First part of splitting views
2008-09-19 21:36:52 +02:00
Pieter de Bie
53636f40eb
Remove debug output
2008-09-19 19:58:04 +02:00
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