Permalink
Browse files

Merge branch 'stable'

* stable:
  When selecting a folder in tree-view, display the
  PBGitRepository: Correctly indicate bare/non-bare repos
  Get rid of some unnecessary casts
  CommitController: Don't rewrap commit message when amending
  Release notes for 0.6.3
  PBGitCommit: Call git show with --no-color to be safe
  Info.plist: Fix handling of directories
  PBGitIndexController: fix uninitialized value

Conflicts:
	PBGitCommitController.m
  • Loading branch information...
2 parents 40ba750 + 2d0bbec commit 785e7eda424100e80380364f3a0e9c88cdf90ea1 @pieter committed May 27, 2009
@@ -0,0 +1,8 @@
+v0.6.3
+===
+
+This is a maintenance release. The following bugs have been fixed:
+
+* Fixed a problem where GitX could not open some directories, for example those that include a . [Johannes Gilger]
+* Fixed a performance issue when staging or unstaging a lot of files
+* Various buildfixes (Benjamin Kramer, Arjen Laarhoven)
View
@@ -53,11 +53,11 @@ - (BOOL)openRepository:(NSURL*)repositoryPath arguments: (NSArray*) args error:(
if ([arguments count] > 0 && ([[arguments objectAtIndex:0] isEqualToString:@"--commit"] ||
[[arguments objectAtIndex:0] isEqualToString:@"-c"]))
- [((PBGitWindowController *)document.windowController) showCommitView:self];
+ [document.windowController showCommitView:self];
else {
PBGitRevSpecifier* rev = [[PBGitRevSpecifier alloc] initWithParameters:arguments];
document.currentBranch = [document addBranch: rev];
- [(PBGitWindowController *)document.windowController showHistoryView:self];
+ [document.windowController showHistoryView:self];
}
[NSApp activateIgnoringOtherApps:YES];
View
@@ -10,9 +10,11 @@
#import <WebKit/WebView.h>
#import "PBGitHistoryController.h"
+@class PBWebHistoryController;
+
@interface PBCommitList : NSTableView {
IBOutlet WebView* webView;
- IBOutlet id webController;
+ IBOutlet PBWebHistoryController *webController;
IBOutlet PBGitHistoryController *controller;
NSPoint mouseDownPoint;
View
@@ -30,7 +30,7 @@ - (void) keyDown: (id) event
[webView scrollPageDown: self];
}
else if ([character rangeOfCharacterFromSet:[NSCharacterSet characterSetWithCharactersInString:@"jkcv"]].location == 0)
- [((PBWebHistoryController *)webController) sendKey: character];
+ [webController sendKey: character];
else
[super keyDown: event];
}
View
@@ -15,7 +15,7 @@ @implementation PBFileChangesTableView
- (NSMenu *)menuForEvent:(NSEvent *)theEvent
{
if ([self delegate])
- return [(PBGitIndexController *)[self delegate] menuForTable: self];
+ return [[self delegate] menuForTable: self];
return nil;
}
View
@@ -9,7 +9,9 @@
#import <Cocoa/Cocoa.h>
#import "PBViewController.h"
+@class PBGitIndexController;
@class PBIconAndTextCell;
+@class PBWebChangesController;
@interface PBGitCommitController : PBViewController {
NSMutableArray *files;
@@ -18,8 +20,8 @@
IBOutlet NSArrayController *unstagedFilesController;
IBOutlet NSArrayController *cachedFilesController;
- IBOutlet id indexController;
- IBOutlet id webController;
+ IBOutlet PBGitIndexController *indexController;
+ IBOutlet PBWebChangesController *webController;
NSString *status;
View
@@ -34,7 +34,7 @@ - (void)awakeFromNib
}
- (void) removeView
{
- [(PBWebChangesController *)webController closeView];
+ [webController closeView];
[super finalize];
}
@@ -44,8 +44,17 @@ - (void) setAmend:(BOOL)newAmend
return;
amend = newAmend;
- if (amend && [[commitMessageView string] length] <= 3)
- commitMessageView.string = [repository outputForCommand:@"log -1 --pretty=format:%s%n%n%b HEAD"];
+ // Replace commit message with the old one if it's less than 3 characters long.
+ // This is just a random number.
+ if (amend && [[commitMessageView string] length] <= 3) {
+ NSString *message = [repository outputForCommand:@"cat-file commit HEAD"];
+ NSRange r = [message rangeOfString:@"\n\n"];
+ if (r.location != NSNotFound)
+ message = [message substringFromIndex:r.location + 2];
+
+ commitMessageView.string = message;
+ }
+
[self refresh:self];
}
@@ -329,9 +338,9 @@ - (IBAction) commit:(id) sender
return [self commitFailedBecause:@"Could not update HEAD"];
if (![repository executeHook:@"post-commit" output:nil])
- [(PBWebChangesController *)webController setStateMessage:[NSString stringWithFormat:@"Post-commit hook failed, however, successfully created commit %@", commit]];
+ [webController setStateMessage:[NSString stringWithFormat:@"Post-commit hook failed, however, successfully created commit %@", commit]];
else
- [(PBWebChangesController *)webController setStateMessage:[NSString stringWithFormat:@"Successfully created commit %@", commit]];
+ [webController setStateMessage:[NSString stringWithFormat:@"Successfully created commit %@", commit]];
repository.hasChanged = YES;
self.busy--;
View
@@ -104,7 +104,7 @@ - (void) ignoreFiles:(NSArray *)files
// Write to the file
NSString *gitIgnoreName = [commitController.repository gitIgnoreFilename];
- NSStringEncoding enc;
+ NSStringEncoding enc = NSUTF8StringEncoding;
NSError *error = nil;
NSMutableString *ignoreFile;
View
@@ -13,6 +13,8 @@
extern NSString* PBGitRepositoryErrorDomain;
+@class PBGitWindowController;
+
@interface PBGitRepository : NSDocument {
PBGitRevList* revisionList;
PBGitConfig *config;
@@ -60,7 +62,7 @@ extern NSString* PBGitRepositoryErrorDomain;
- (void) setup;
@property (assign) BOOL hasChanged;
-@property (readonly) NSWindowController *windowController;
+@property (readonly) PBGitWindowController *windowController;
@property (readonly) PBGitConfig *config;
@property (retain) PBGitRevList* revisionList;
@property (assign) NSMutableArray* branches;
View
@@ -171,7 +171,11 @@ - (NSString*)gitIgnoreFilename
- (BOOL)isBareRepository
{
- return [PBGitRepository isBareRepository:[self fileURL].path];
+ if([self workingDirectory]) {
+ return [PBGitRepository isBareRepository:[self workingDirectory]];
+ } else {
+ return true;
+ }
}
// Overridden to create our custom window controller
@@ -182,7 +186,7 @@ - (void)makeWindowControllers
#endif
}
-- (NSWindowController *)windowController
+- (PBGitWindowController *)windowController
{
if ([[self windowControllers] count] == 0)
return NULL;
View
@@ -66,7 +66,7 @@ - (BOOL) isLocallyCached
- (NSString*) contents
{
if (!leaf)
- return [NSString stringWithFormat:@"This is a tree with path %@", self];
+ return [NSString stringWithFormat:@"This is a tree with path %@", [self fullPath]];
NSData* data = nil;

0 comments on commit 785e7ed

Please sign in to comment.