diff --git a/Classes/Controllers/PBGitHistoryController.h b/Classes/Controllers/PBGitHistoryController.h index 129e69ed4..eeac2b146 100644 --- a/Classes/Controllers/PBGitHistoryController.h +++ b/Classes/Controllers/PBGitHistoryController.h @@ -20,7 +20,7 @@ @class QLPreviewPanel; @class PBCommitList; @class GLFileView; -@class PBGitSHA; +@class GTOID; @class PBHistorySearchController; @interface PBGitHistoryController : PBViewController { @@ -69,7 +69,7 @@ - (IBAction) setTreeView:(id)sender; - (IBAction) setBranchFilter:(id)sender; -- (void)selectCommit:(PBGitSHA *)commit; +- (void)selectCommit:(GTOID *)commit; - (IBAction) refresh:(id)sender; - (IBAction) toggleQLPreviewPanel:(id)sender; - (IBAction) openSelectedFile:(id)sender; diff --git a/Classes/Controllers/PBGitHistoryController.m b/Classes/Controllers/PBGitHistoryController.m index d86e175e6..ef37d2c23 100644 --- a/Classes/Controllers/PBGitHistoryController.m +++ b/Classes/Controllers/PBGitHistoryController.m @@ -6,7 +6,6 @@ // Copyright 2008 __MyCompanyName__. All rights reserved. // -#import "PBGitSHA.h" #import "PBGitCommit.h" #import "PBGitTree.h" #import "PBGitRef.h" @@ -488,7 +487,7 @@ - (void) scrollSelectionToTopOfViewFrom:(NSInteger)oldIndex commitList.useAdjustScroll = NO; } -- (NSArray *) selectedObjectsForSHA:(PBGitSHA *)commitSHA +- (NSArray *) selectedObjectsForSHA:(GTOID *)commitSHA { NSPredicate *selection = [NSPredicate predicateWithFormat:@"sha == %@", commitSHA]; NSArray *selectedCommits = [[commitController content] filteredArrayUsingPredicate:selection]; @@ -499,7 +498,7 @@ - (NSArray *) selectedObjectsForSHA:(PBGitSHA *)commitSHA return selectedCommits; } -- (void)selectCommit:(PBGitSHA *)commitSHA +- (void)selectCommit:(GTOID *)commitSHA { if (!forceSelectionUpdate && [[[[commitController selectedObjects] lastObject] sha] isEqual:commitSHA]) return; diff --git a/Classes/Controllers/PBHistorySearchController.m b/Classes/Controllers/PBHistorySearchController.m index 8c15e69b8..13e8c4dd5 100644 --- a/Classes/Controllers/PBHistorySearchController.m +++ b/Classes/Controllers/PBHistorySearchController.m @@ -16,7 +16,6 @@ #import "PBEasyPipe.h" #import "PBGitBinary.h" #import "PBGitCommit.h" -#import "PBGitSHA.h" @interface PBHistorySearchController () @@ -448,7 +447,7 @@ - (void)parseBackgroundSearchResults:(NSNotification *)notification for (NSString *resultSHA in resultsArray) { NSUInteger index = 0; for (PBGitCommit *commit in [commitController arrangedObjects]) { - if ([resultSHA isEqualToString:commit.sha.string]) { + if ([resultSHA isEqualToString:commit.sha.SHA]) { [indexes addIndex:index]; break; } diff --git a/Classes/Controllers/PBWebHistoryController.h b/Classes/Controllers/PBWebHistoryController.h index f42a42e9f..9ddaad40c 100644 --- a/Classes/Controllers/PBWebHistoryController.h +++ b/Classes/Controllers/PBWebHistoryController.h @@ -14,14 +14,14 @@ #import "PBRefContextDelegate.h" -@class PBGitSHA; +@class GTOID; @interface PBWebHistoryController : PBWebController { IBOutlet PBGitHistoryController* historyController; IBOutlet id contextMenuDelegate; - PBGitSHA* currentSha; + GTOID* currentSha; NSString* diff; } diff --git a/Classes/Controllers/PBWebHistoryController.m b/Classes/Controllers/PBWebHistoryController.m index e1cceb5eb..ce95b9432 100644 --- a/Classes/Controllers/PBWebHistoryController.m +++ b/Classes/Controllers/PBWebHistoryController.m @@ -8,7 +8,7 @@ #import "PBWebHistoryController.h" #import "PBGitDefaults.h" -#import "PBGitSHA.h" +#import #import "PBGitRef.h" #import "PBGitRevSpecifier.h" @@ -71,7 +71,7 @@ - (void) changeContentTo: (PBGitCommit *) content // but this caused some funny behaviour because NSTask's and NSThread's don't really // like each other. Instead, just do it async. - NSMutableArray *taskArguments = [NSMutableArray arrayWithObjects:@"show", @"--pretty=raw", @"-M", @"--no-color", [currentSha string], nil]; + NSMutableArray *taskArguments = [NSMutableArray arrayWithObjects:@"show", @"--pretty=raw", @"-M", @"--no-color", [currentSha SHA], nil]; if (![PBGitDefaults showWhitespaceDifferences]) [taskArguments insertObject:@"-w" atIndex:1]; @@ -103,7 +103,7 @@ - (void)commitDetailsLoaded:(NSNotification *)notification - (void)selectCommit:(NSString *)sha { - [historyController selectCommit:[PBGitSHA shaWithString:sha]]; + [historyController selectCommit: [GTOID oidWithSHA: sha]]; } - (void) sendKey: (NSString*) key diff --git a/Classes/Views/GLFileView.m b/Classes/Views/GLFileView.m index e3a874d91..ea41e6e4b 100644 --- a/Classes/Views/GLFileView.m +++ b/Classes/Views/GLFileView.m @@ -10,7 +10,6 @@ #import "GLFileView.h" #import "PBGitTree.h" -#import "PBGitSHA.h" #import "PBGitCommit.h" #import "PBGitHistoryController.h" @@ -110,7 +109,7 @@ - (void) showFile - (void) selectCommit:(NSString*)c { - [historyController selectCommit:[PBGitSHA shaWithString:c]]; + [historyController selectCommit: [GTOID oidWithSHA: c]]; } #pragma mark MGScopeBarDelegate methods diff --git a/Classes/Views/PBGitRevisionCell.m b/Classes/Views/PBGitRevisionCell.m index 94c7a7f9d..acf4fc2d8 100644 --- a/Classes/Views/PBGitRevisionCell.m +++ b/Classes/Views/PBGitRevisionCell.m @@ -8,7 +8,6 @@ #import "PBGitRevisionCell.h" #import "PBGitRef.h" -#import "PBGitSHA.h" #import "PBGitCommit.h" #import "PBGitRevSpecifier.h" #import "RoundedRectangle.h" @@ -107,10 +106,10 @@ - (void) drawLineFromColumn: (int) from toColumn: (int) to inRect: (NSRect) r of - (BOOL) isCurrentCommit { - PBGitSHA *thisSha = [self.objectValue sha]; + GTOID *thisSha = [self.objectValue sha]; PBGitRepository* repository = [self.objectValue repository]; - PBGitSHA *currentSha = [repository headSHA]; + GTOID *currentSha = [repository headSHA]; return [currentSha isEqual:thisSha]; } diff --git a/Classes/Views/PBRefMenuItem.m b/Classes/Views/PBRefMenuItem.m index 523dfa122..4eefea30a 100644 --- a/Classes/Views/PBRefMenuItem.m +++ b/Classes/Views/PBRefMenuItem.m @@ -9,7 +9,6 @@ #import "PBRefMenuItem.h" #import "PBGitRepository.h" #import "PBGitRevSpecifier.h" -#import "PBGitSHA.h" @implementation PBRefMenuItem @synthesize refish; diff --git a/Classes/git/GTOID+JavaScript.h b/Classes/git/GTOID+JavaScript.h new file mode 100644 index 000000000..788e76882 --- /dev/null +++ b/Classes/git/GTOID+JavaScript.h @@ -0,0 +1,13 @@ +// +// GTOID+JavaScript.h +// GitX +// +// Created by Sven Weidauer on 18.05.14. +// +// + +#import + +@interface GTOID (JavaScript) + +@end diff --git a/Classes/git/GTOID+JavaScript.m b/Classes/git/GTOID+JavaScript.m new file mode 100644 index 000000000..85498934f --- /dev/null +++ b/Classes/git/GTOID+JavaScript.m @@ -0,0 +1,22 @@ +// +// GTOID+JavaScript.m +// GitX +// +// Created by Sven Weidauer on 18.05.14. +// +// + +#import "GTOID+JavaScript.h" + +@implementation GTOID (JavaScript) + ++ (BOOL)isSelectorExcludedFromWebScript:(SEL)aSelector +{ + return NO; +} + ++ (BOOL)isKeyExcludedFromWebScript:(const char *)name { + return NO; +} + +@end diff --git a/Classes/git/PBGitCommit.h b/Classes/git/PBGitCommit.h index 8e74c4f13..1ae528207 100644 --- a/Classes/git/PBGitCommit.h +++ b/Classes/git/PBGitCommit.h @@ -12,7 +12,6 @@ @class PBGitRepository; @class PBGitTree; @class PBGitRef; -@class PBGitSHA; @class PBGraphCellInfo; extern NSString * const kGitXCommitType; @@ -22,7 +21,7 @@ extern NSString * const kGitXCommitType; @property (nonatomic, weak, readonly) PBGitRepository* repository; -@property (nonatomic, strong, readonly) PBGitSHA *sha; +@property (nonatomic, strong, readonly) GTOID *sha; @property (nonatomic, strong, readonly) NSDate *date; @property (nonatomic, strong, readonly) NSString *subject; @@ -43,8 +42,6 @@ extern NSString * const kGitXCommitType; @property (readonly) NSArray* treeContents; -//+ (PBGitCommit *)commitWithRepository:(PBGitRepository*)repo andSha:(PBGitSHA *)newSha; - - (id)initWithRepository:(PBGitRepository *)repo andCommit:(GTCommit *)gtCommit; - (void) addRef:(PBGitRef *)ref; diff --git a/Classes/git/PBGitCommit.m b/Classes/git/PBGitCommit.m index 0aa6fcab6..4d3ffd4b6 100644 --- a/Classes/git/PBGitCommit.m +++ b/Classes/git/PBGitCommit.m @@ -9,7 +9,6 @@ #import "PBGitRepository.h" #import "PBGitCommit.h" #import "PBGitTree.h" -#import "PBGitSHA.h" #import "PBGitRef.h" #import "PBGitDefaults.h" @@ -22,7 +21,7 @@ @interface PBGitCommit () @property (nonatomic, strong) NSArray *parents; @property (nonatomic, strong) NSString *patch; -@property (nonatomic, strong) PBGitSHA *sha; +@property (nonatomic, strong) GTOID *sha; @end @@ -65,7 +64,7 @@ - (NSArray *)parents NSArray *gtParents = self.gtCommit.parents; NSMutableArray *parents = [NSMutableArray arrayWithCapacity:gtParents.count]; for (GTCommit *parent in gtParents) { - [parents addObject:[PBGitSHA shaWithString:parent.SHA]]; + [parents addObject:parent.OID]; } self.parents = parents; } @@ -114,16 +113,9 @@ - (NSString *)SVNRevision return result; } -- (PBGitSHA *)sha +- (GTOID *)sha { - if (!self->_sha) { - const git_oid *oid = self.gtCommit.OID.git_oid; - if (oid) { - PBGitSHA *newSha = [PBGitSHA shaWithOID:oid]; - self.sha = newSha; - } - } - return self->_sha; + return self.gtCommit.OID; } - (NSString *)realSha diff --git a/Classes/git/PBGitGrapher.mm b/Classes/git/PBGitGrapher.mm index 503a372cd..97a183845 100644 --- a/Classes/git/PBGitGrapher.mm +++ b/Classes/git/PBGitGrapher.mm @@ -12,10 +12,14 @@ #import "PBGraphCellInfo.h" #import "PBGitGrapher.h" #import "PBGitCommit.h" -#import "PBGitSHA.h" #import "PBGitLane.h" #import "PBGitGraphLine.h" +#import +#import +#include +#import + using namespace std; typedef std::vector LaneCollection; @@ -63,7 +67,7 @@ - (void) decorateCommit: (PBGitCommit *) commit PBGitLane *currentLane = NULL; BOOL didFirst = NO; - git_oid commit_oid = [[commit sha] oid]; + const git_oid *commit_oid = [[commit sha] git_oid]; // First, iterate over earlier columns and pass through any that don't want this commit if (self.previous != nil) { @@ -106,8 +110,8 @@ - (void) decorateCommit: (PBGitCommit *) commit // If we already did the first parent, don't do so again if (!didFirst && nParents) { - git_oid parentOID = [(PBGitSHA*)[parents objectAtIndex:0] oid]; - PBGitLane *newLane = new PBGitLane(&parentOID); + const git_oid *parentOID = [(GTOID*)[parents objectAtIndex:0] git_oid]; + PBGitLane *newLane = new PBGitLane(parentOID); currentLanes->push_back(newLane); newPos = currentLanes->size(); add_line(lines, ¤tLine, 0, newPos, newPos, newLane->index()); @@ -121,7 +125,7 @@ - (void) decorateCommit: (PBGitCommit *) commit int parentIndex = 0; for (parentIndex = 1; parentIndex < nParents; ++parentIndex) { - git_oid parentOID = [(PBGitSHA*)[parents objectAtIndex:parentIndex] oid]; + const git_oid *parentOID = [(GTOID*)[parents objectAtIndex:parentIndex] git_oid]; int i = 0; BOOL was_displayed = NO; LaneCollection::iterator it = currentLanes->begin(); @@ -138,7 +142,7 @@ - (void) decorateCommit: (PBGitCommit *) commit // Really add this parent addedParent = YES; - PBGitLane *newLane = new PBGitLane(&parentOID); + PBGitLane *newLane = new PBGitLane(parentOID); currentLanes->push_back(newLane); add_line(lines, ¤tLine, 0, currentLanes->size(), newPos, newLane->index()); } @@ -166,7 +170,7 @@ - (void) decorateCommit: (PBGitCommit *) commit // Update the current lane to point to the new parent if (currentLane) { if (nParents > 0) - currentLane->setSha([(PBGitSHA*)[parents objectAtIndex:0] oid]); + currentLane->setSha( [(GTOID*)[parents objectAtIndex:0] git_oid]); else { // The current lane's commit does not have any parents // AKA, this is a first commit diff --git a/Classes/git/PBGitHistoryGrapher.m b/Classes/git/PBGitHistoryGrapher.m index a5e31c1d3..7fea53cd7 100644 --- a/Classes/git/PBGitHistoryGrapher.m +++ b/Classes/git/PBGitHistoryGrapher.m @@ -8,10 +8,8 @@ #import "PBGitHistoryGrapher.h" #import "PBGitGrapher.h" -#import "PBGitSHA.h" #import "PBGitCommit.h" - @implementation PBGitHistoryGrapher @@ -50,7 +48,7 @@ - (void) graphCommits:(NSArray *)revList for (PBGitCommit *commit in revList) { if ([currentThread isCancelled]) return; - PBGitSHA *commitSHA = [commit sha]; + GTOID *commitSHA = [commit sha]; if (viewAllBranches || [searchSHAs containsObject:commitSHA]) { [grapher decorateCommit:commit]; [commits addObject:commit]; diff --git a/Classes/git/PBGitHistoryList.h b/Classes/git/PBGitHistoryList.h index 4003ff7fd..9166051bf 100644 --- a/Classes/git/PBGitHistoryList.h +++ b/Classes/git/PBGitHistoryList.h @@ -14,7 +14,7 @@ @class PBGitRef; @class PBGitRevList; @class PBGitHistoryGrapher; -@class PBGitSHA; +@class GTOID; @interface PBGitHistoryList : NSObject { __weak PBGitRepository *repository; @@ -22,7 +22,7 @@ PBGitRevList *projectRevList; PBGitRevList *currentRevList; - PBGitSHA *lastSHA; + GTOID *lastSHA; NSSet *lastRefSHAs; NSInteger lastBranchFilter; PBGitRef *lastRemoteRef; diff --git a/Classes/git/PBGitHistoryList.m b/Classes/git/PBGitHistoryList.m index b6ea58204..72387f301 100644 --- a/Classes/git/PBGitHistoryList.m +++ b/Classes/git/PBGitHistoryList.m @@ -11,7 +11,6 @@ #import "PBGitRevList.h" #import "PBGitGrapher.h" #import "PBGitHistoryGrapher.h" -#import "PBGitSHA.h" #import "PBGitRef.h" #import "PBGitRevSpecifier.h" @@ -175,7 +174,7 @@ - (NSSet *) baseCommitsForLocalRefs NSMutableSet *baseCommitSHAs = [NSMutableSet set]; NSDictionary *refs = repository.refs; - for (PBGitSHA *sha in refs) + for (GTOID *sha in refs) for (PBGitRef *ref in [refs objectForKey:sha]) if ([ref isBranch] || [ref isTag]) [baseCommitSHAs addObject:sha]; @@ -194,7 +193,7 @@ - (NSSet *) baseCommitsForRemoteRefs PBGitRef *remoteRef = [[repository.currentBranch ref] remoteRef]; - for (PBGitSHA *sha in refs) + for (GTOID *sha in refs) for (PBGitRef *ref in [refs objectForKey:sha]) if ([remoteRef isEqualToRef:[ref remoteRef]]) [baseCommitSHAs addObject:sha]; @@ -210,7 +209,7 @@ - (NSSet *) baseCommits return [NSMutableSet setWithObject:lastSHA]; else if ([repository.currentBranch isSimpleRef]) { PBGitRef *currentRef = [repository.currentBranch ref]; - PBGitSHA *sha = [repository shaForRef:currentRef]; + GTOID *sha = [repository shaForRef:currentRef]; if (sha) return [NSMutableSet setWithObject:sha]; } @@ -280,7 +279,7 @@ - (BOOL) selectedBranchNeedsNewGraph:(PBGitRevSpecifier *)rev return NO; } - PBGitSHA *revSHA = [repository shaForRef:[rev ref]]; + GTOID *revSHA = [repository shaForRef:[rev ref]]; if ([revSHA isEqual:lastSHA] && (lastBranchFilter == repository.currentBranchFilter)) return NO; diff --git a/Classes/git/PBGitLane.h b/Classes/git/PBGitLane.h index 36c720916..597e75411 100644 --- a/Classes/git/PBGitLane.h +++ b/Classes/git/PBGitLane.h @@ -16,7 +16,7 @@ class PBGitLane { public: - PBGitLane(git_oid *sha) + PBGitLane(const git_oid *sha) { d_index = s_colorIndex++; d_sha = *sha; @@ -33,12 +33,12 @@ class PBGitLane { d_index = s_colorIndex++; } - bool isCommit(git_oid sha) const + bool isCommit(const git_oid *sha) const { - return !git_oid_cmp(&d_sha, &sha); + return !git_oid_cmp(&d_sha, sha); } - void setSha(git_oid sha); + void setSha(const git_oid *sha); git_oid const *sha() const { diff --git a/Classes/git/PBGitLane.mm b/Classes/git/PBGitLane.mm index 2ae767f27..bc64566c3 100644 --- a/Classes/git/PBGitLane.mm +++ b/Classes/git/PBGitLane.mm @@ -29,9 +29,9 @@ return d_index; } -void PBGitLane::setSha(git_oid sha) +void PBGitLane::setSha(const git_oid *sha) { - d_sha = sha; + d_sha = *sha; } void PBGitLane::resetColors() diff --git a/Classes/git/PBGitRepository.h b/Classes/git/PBGitRepository.h index dcbefe1d7..5664984c9 100644 --- a/Classes/git/PBGitRepository.h +++ b/Classes/git/PBGitRepository.h @@ -43,13 +43,13 @@ static NSString * PBStringFromBranchFilterType(PBGitXBranchFilterType type) { @class PBGitWindowController; @class PBGitCommit; -@class PBGitSHA; +@class GTOID; @class PBGitRepositoryWatcher; @interface PBGitRepository : NSDocument { __strong PBGitRepositoryWatcher *watcher; __strong PBGitRevSpecifier *_headRef; // Caching - __strong PBGitSHA* _headSha; + __strong GTOID* _headSha; __strong GTRepository* _gtRepo; } @@ -112,13 +112,13 @@ static NSString * PBStringFromBranchFilterType(PBGitXBranchFilterType type) { - (void) reloadRefs; - (void) lazyReload; - (PBGitRevSpecifier*)headRef; -- (PBGitSHA *)headSHA; +- (GTOID *)headSHA; - (PBGitCommit *)headCommit; -- (PBGitSHA *)shaForRef:(PBGitRef *)ref; +- (GTOID *)shaForRef:(PBGitRef *)ref; - (PBGitCommit *)commitForRef:(PBGitRef *)ref; -- (PBGitCommit *)commitForSHA:(PBGitSHA *)sha; -- (BOOL)isOnSameBranch:(PBGitSHA *)baseSHA asSHA:(PBGitSHA *)testSHA; -- (BOOL)isSHAOnHeadBranch:(PBGitSHA *)testSHA; +- (PBGitCommit *)commitForSHA:(GTOID *)sha; +- (BOOL)isOnSameBranch:(GTOID *)baseSHA asSHA:(GTOID *)testSHA; +- (BOOL)isSHAOnHeadBranch:(GTOID *)testSHA; - (BOOL)isRefOnHeadBranch:(PBGitRef *)testRef; - (BOOL)checkRefFormat:(NSString *)refName; - (BOOL)refExists:(PBGitRef *)ref; diff --git a/Classes/git/PBGitRepository.m b/Classes/git/PBGitRepository.m index df8e3fc4a..2ad0a6418 100644 --- a/Classes/git/PBGitRepository.m +++ b/Classes/git/PBGitRepository.m @@ -23,7 +23,6 @@ #import "PBGitRepositoryWatcher.h" #import "GitRepoFinder.h" #import "PBGitHistoryList.h" -#import "PBGitSHA.h" NSString *PBGitRepositoryDocumentType = @"Git Repository"; @@ -249,7 +248,7 @@ - (void)addRef:(GTReference *)gtRef return; } - PBGitSHA *sha = [PBGitSHA shaWithOID:refTarget.OID.git_oid]; + GTOID *sha = refTarget.OID; if (!sha) { NSLog(@"Couldn't determine sha for ref %@ -> %@", gtRef, refTarget); return; @@ -355,7 +354,7 @@ - (PBGitRevSpecifier *)headRef return _headRef; } -- (PBGitSHA *)headSHA +- (GTOID *)headSHA { if (! _headSha) [self headRef]; @@ -368,12 +367,12 @@ - (PBGitCommit *)headCommit return [self commitForSHA:[self headSHA]]; } -- (PBGitSHA *)shaForRef:(PBGitRef *)ref +- (GTOID *)shaForRef:(PBGitRef *)ref { if (!ref) return nil; - for (PBGitSHA *sha in refs.allKeys) + for (GTOID *sha in refs) { NSMutableSet *refsForSha = [refs objectForKey:sha]; for (PBGitRef *existingRef in refsForSha) @@ -403,7 +402,7 @@ - (PBGitSHA *)shaForRef:(PBGitRef *)ref buffer[40] = '\0'; git_oid_fmt(buffer, refOid); NSString* shaForRef = [NSString stringWithUTF8String:buffer]; - PBGitSHA* result = [PBGitSHA shaWithString:shaForRef]; + GTOID* result = [GTOID oidWithSHA: shaForRef]; return result; } return nil; @@ -417,7 +416,7 @@ - (PBGitCommit *)commitForRef:(PBGitRef *)ref return [self commitForSHA:[self shaForRef:ref]]; } -- (PBGitCommit *)commitForSHA:(PBGitSHA *)sha +- (PBGitCommit *)commitForSHA:(GTOID *)sha { if (!sha) return nil; @@ -434,7 +433,7 @@ - (PBGitCommit *)commitForSHA:(PBGitSHA *)sha return nil; } -- (BOOL)isOnSameBranch:(PBGitSHA *)branchSHA asSHA:(PBGitSHA *)testSHA +- (BOOL)isOnSameBranch:(GTOID *)branchSHA asSHA:(GTOID *)testSHA { if (!branchSHA || !testSHA) return NO; @@ -447,7 +446,7 @@ - (BOOL)isOnSameBranch:(PBGitSHA *)branchSHA asSHA:(PBGitSHA *)testSHA NSMutableSet *searchSHAs = [NSMutableSet setWithObject:branchSHA]; for (PBGitCommit *commit in revList) { - PBGitSHA *commitSHA = [commit sha]; + GTOID *commitSHA = [commit sha]; if ([searchSHAs containsObject:commitSHA]) { if ([testSHA isEqual:commitSHA]) return YES; @@ -461,12 +460,12 @@ - (BOOL)isOnSameBranch:(PBGitSHA *)branchSHA asSHA:(PBGitSHA *)testSHA return NO; } -- (BOOL)isSHAOnHeadBranch:(PBGitSHA *)testSHA +- (BOOL)isSHAOnHeadBranch:(GTOID *)testSHA { if (!testSHA) return NO; - PBGitSHA *headSHA = [self headSHA]; + GTOID *headSHA = [self headSHA]; if ([testSHA isEqual:headSHA]) return YES; diff --git a/Classes/git/PBGitRevList.mm b/Classes/git/PBGitRevList.mm index 30cdc8c23..86a514c09 100644 --- a/Classes/git/PBGitRevList.mm +++ b/Classes/git/PBGitRevList.mm @@ -20,6 +20,7 @@ #import #import #import +#import using namespace std; diff --git a/Classes/git/PBGitSHA.h b/Classes/git/PBGitSHA.h deleted file mode 100644 index f4423b2a2..000000000 --- a/Classes/git/PBGitSHA.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// PBGitSHA.h -// GitX -// -// Created by BrotherBard on 3/28/10. -// Copyright 2010 BrotherBard. All rights reserved. -// - -#import - -@interface PBGitSHA : NSObject - -+ (PBGitSHA *)shaWithOID:(git_oid const *)oid; -+ (PBGitSHA *)shaWithString:(NSString *)shaString; -+ (PBGitSHA *)shaWithCString:(const char *)shaCString; - -- (BOOL)isEqualToOID:(git_oid const *)other_oid; - -@property (nonatomic, assign, readonly) git_oid oid; -@property (nonatomic, strong, readonly) NSString *string; - -@end diff --git a/Classes/git/PBGitSHA.m b/Classes/git/PBGitSHA.m deleted file mode 100644 index 057e4e4b2..000000000 --- a/Classes/git/PBGitSHA.m +++ /dev/null @@ -1,145 +0,0 @@ -// -// PBGitSHA.m -// GitX -// -// Created by BrotherBard on 3/28/10. -// Copyright 2010 BrotherBard. All rights reserved. -// - -#import "PBGitSHA.h" - -@interface PBGitSHA () - -@property (nonatomic, assign) git_oid oid; -@property (nonatomic, strong) NSString *string; - -@end - - -@implementation PBGitSHA - - -+ (PBGitSHA *)shaWithOID:(git_oid const *)oid -{ - return [[PBGitSHA alloc] initWithOID:oid]; -} - - -+ (PBGitSHA *)shaWithString:(NSString *)shaString -{ - git_oid oid; - int err = git_oid_fromstr(&oid, [shaString UTF8String]); - if (err != GIT_OK) { - return nil; - } - - return [self shaWithOID:&oid]; -} - - -+ (PBGitSHA *)shaWithCString:(const char *)shaCString -{ - git_oid oid; - int err = git_oid_fromstr(&oid, shaCString); - if (err != GIT_OK) - return nil; - - return [self shaWithOID:&oid]; -} - - -+ (BOOL)isSelectorExcludedFromWebScript:(SEL)aSelector -{ - return NO; -} - - -+ (BOOL)isKeyExcludedFromWebScript:(const char *)name -{ - return NO; -} - - - -#pragma mark - -#pragma mark PBGitSHA - -- (id)initWithOID:(git_oid const *)g_oid -{ - if (!g_oid) { - return nil; - } - - self = [super init]; - if (!self) { - return nil; - } - - _oid = *g_oid; - - return self; -} - - -- (NSString *)string -{ - if (_string) { - return _string; - } - - const size_t buffer_size = GIT_OID_HEXSZ + 1; - char hex[buffer_size] = {0}; - - const char* result = git_oid_tostr(hex, buffer_size, &_oid); - _string = [NSString stringWithUTF8String:result]; - return _string; -} - - -- (BOOL)isEqual:(id)otherSHA -{ - if (self == otherSHA) - return YES; - - if (!otherSHA) - return NO; - - return git_oid_cmp(&_oid, &((PBGitSHA *)otherSHA)->_oid) == 0; -} - - -- (BOOL)isEqualToOID:(git_oid const *)other_oid -{ - if (!other_oid) { - return nil; - } - return git_oid_cmp(&_oid, other_oid) == 0; -} - - -- (NSUInteger)hash -{ - NSUInteger hash; - memcpy(&hash, &(_oid.id), sizeof(NSUInteger)); - - return hash; -} - - -- (NSString *)description -{ - return [self string]; -} - - - -#pragma mark - -- (id)copyWithZone:(NSZone *)zone -{ - PBGitSHA *copy = [[[self class] allocWithZone:zone] initWithOID:&(self->_oid)]; - - return copy; -} - -@end diff --git a/GitX.xcodeproj/project.pbxproj b/GitX.xcodeproj/project.pbxproj index b370779e0..52a84faba 100644 --- a/GitX.xcodeproj/project.pbxproj +++ b/GitX.xcodeproj/project.pbxproj @@ -8,6 +8,7 @@ /* Begin PBXBuildFile section */ 0A6858C711F7EA8A00AC2BE4 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0A6858C611F7EA8A00AC2BE4 /* CoreServices.framework */; }; + 2682AABB1929140E00271A4D /* GTOID+JavaScript.m in Sources */ = {isa = PBXBuildFile; fileRef = 2682AABA1929140E00271A4D /* GTOID+JavaScript.m */; }; 4A0B5BD315FE2DA600ACCB61 /* libssl.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 4A0B5BD215FE2DA600ACCB61 /* libssl.dylib */; }; 4A0B5BD515FE2DC900ACCB61 /* libcrypto.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 4A0B5BD415FE2DC900ACCB61 /* libcrypto.dylib */; }; 4A1F4E6917AFE969004D51E9 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 29B97325FDCFA39411CA2CEA /* Foundation.framework */; }; @@ -110,7 +111,6 @@ 4A5D770114A9A9CC00DF6C68 /* PBGitRepositoryWatcherEventPath.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A5D766A14A9A9CC00DF6C68 /* PBGitRepositoryWatcherEventPath.m */; }; 4A5D770214A9A9CC00DF6C68 /* PBGitRevList.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4A5D766C14A9A9CC00DF6C68 /* PBGitRevList.mm */; }; 4A5D770314A9A9CC00DF6C68 /* PBGitRevSpecifier.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A5D766E14A9A9CC00DF6C68 /* PBGitRevSpecifier.m */; }; - 4A5D770414A9A9CC00DF6C68 /* PBGitSHA.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A5D767014A9A9CC00DF6C68 /* PBGitSHA.m */; }; 4A5D770514A9A9CC00DF6C68 /* PBGitSVBranchItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A5D767214A9A9CC00DF6C68 /* PBGitSVBranchItem.m */; }; 4A5D770614A9A9CC00DF6C68 /* PBGitSVFolderItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A5D767414A9A9CC00DF6C68 /* PBGitSVFolderItem.m */; }; 4A5D770714A9A9CC00DF6C68 /* PBGitSVOtherRevItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A5D767614A9A9CC00DF6C68 /* PBGitSVOtherRevItem.m */; }; @@ -362,6 +362,8 @@ /* Begin PBXFileReference section */ 0A6858C611F7EA8A00AC2BE4 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = System/Library/Frameworks/CoreServices.framework; sourceTree = SDKROOT; }; 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 2682AAB91929140E00271A4D /* GTOID+JavaScript.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "GTOID+JavaScript.h"; sourceTree = ""; }; + 2682AABA1929140E00271A4D /* GTOID+JavaScript.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "GTOID+JavaScript.m"; sourceTree = ""; }; 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; 4A0B5BD215FE2DA600ACCB61 /* libssl.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libssl.dylib; path = usr/lib/libssl.dylib; sourceTree = SDKROOT; }; @@ -452,8 +454,8 @@ 4A5D762D14A9A9CC00DF6C68 /* PBDiffWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBDiffWindowController.m; sourceTree = ""; }; 4A5D762E14A9A9CC00DF6C68 /* PBGitCommitController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitCommitController.h; sourceTree = ""; }; 4A5D762F14A9A9CC00DF6C68 /* PBGitCommitController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitCommitController.m; sourceTree = ""; }; - 4A5D763014A9A9CC00DF6C68 /* PBGitHistoryController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitHistoryController.h; sourceTree = ""; }; - 4A5D763114A9A9CC00DF6C68 /* PBGitHistoryController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitHistoryController.m; sourceTree = ""; }; + 4A5D763014A9A9CC00DF6C68 /* PBGitHistoryController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = PBGitHistoryController.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 4A5D763114A9A9CC00DF6C68 /* PBGitHistoryController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = PBGitHistoryController.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 4A5D763214A9A9CC00DF6C68 /* PBGitIndexController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitIndexController.h; sourceTree = ""; }; 4A5D763314A9A9CC00DF6C68 /* PBGitIndexController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitIndexController.m; sourceTree = ""; }; 4A5D763414A9A9CC00DF6C68 /* PBGitSidebarController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitSidebarController.h; sourceTree = ""; }; @@ -478,23 +480,23 @@ 4A5D764714A9A9CC00DF6C68 /* PBWebController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBWebController.m; sourceTree = ""; }; 4A5D764814A9A9CC00DF6C68 /* PBWebDiffController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBWebDiffController.h; sourceTree = ""; }; 4A5D764914A9A9CC00DF6C68 /* PBWebDiffController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBWebDiffController.m; sourceTree = ""; }; - 4A5D764A14A9A9CC00DF6C68 /* PBWebHistoryController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBWebHistoryController.h; sourceTree = ""; }; - 4A5D764B14A9A9CC00DF6C68 /* PBWebHistoryController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBWebHistoryController.m; sourceTree = ""; }; + 4A5D764A14A9A9CC00DF6C68 /* PBWebHistoryController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = PBWebHistoryController.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 4A5D764B14A9A9CC00DF6C68 /* PBWebHistoryController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = PBWebHistoryController.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 4A5D764C14A9A9CC00DF6C68 /* CWQuickLook.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CWQuickLook.h; sourceTree = ""; }; 4A5D764E14A9A9CC00DF6C68 /* PBGitBinary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitBinary.h; sourceTree = ""; }; 4A5D764F14A9A9CC00DF6C68 /* PBGitBinary.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitBinary.m; sourceTree = ""; }; - 4A5D765014A9A9CC00DF6C68 /* PBGitCommit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitCommit.h; sourceTree = ""; }; - 4A5D765114A9A9CC00DF6C68 /* PBGitCommit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitCommit.m; sourceTree = ""; }; + 4A5D765014A9A9CC00DF6C68 /* PBGitCommit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = PBGitCommit.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 4A5D765114A9A9CC00DF6C68 /* PBGitCommit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = PBGitCommit.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 4A5D765414A9A9CC00DF6C68 /* PBGitDefaults.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitDefaults.h; sourceTree = ""; }; 4A5D765514A9A9CC00DF6C68 /* PBGitDefaults.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitDefaults.m; sourceTree = ""; }; 4A5D765614A9A9CC00DF6C68 /* PBGitGrapher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitGrapher.h; sourceTree = ""; }; - 4A5D765714A9A9CC00DF6C68 /* PBGitGrapher.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PBGitGrapher.mm; sourceTree = ""; }; + 4A5D765714A9A9CC00DF6C68 /* PBGitGrapher.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = PBGitGrapher.mm; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 4A5D765814A9A9CC00DF6C68 /* PBGitGraphLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitGraphLine.h; sourceTree = ""; }; 4A5D765914A9A9CC00DF6C68 /* PBGitGraphLine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitGraphLine.m; sourceTree = ""; }; 4A5D765A14A9A9CC00DF6C68 /* PBGitHistoryGrapher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitHistoryGrapher.h; sourceTree = ""; }; - 4A5D765B14A9A9CC00DF6C68 /* PBGitHistoryGrapher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitHistoryGrapher.m; sourceTree = ""; }; - 4A5D765C14A9A9CC00DF6C68 /* PBGitHistoryList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitHistoryList.h; sourceTree = ""; }; - 4A5D765D14A9A9CC00DF6C68 /* PBGitHistoryList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitHistoryList.m; sourceTree = ""; }; + 4A5D765B14A9A9CC00DF6C68 /* PBGitHistoryGrapher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = PBGitHistoryGrapher.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 4A5D765C14A9A9CC00DF6C68 /* PBGitHistoryList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = PBGitHistoryList.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 4A5D765D14A9A9CC00DF6C68 /* PBGitHistoryList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = PBGitHistoryList.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 4A5D765E14A9A9CC00DF6C68 /* PBGitIndex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitIndex.h; sourceTree = ""; }; 4A5D765F14A9A9CC00DF6C68 /* PBGitIndex.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitIndex.m; sourceTree = ""; }; 4A5D766014A9A9CC00DF6C68 /* PBGitLane.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitLane.h; sourceTree = ""; }; @@ -502,18 +504,16 @@ 4A5D766214A9A9CC00DF6C68 /* PBGitRef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitRef.h; sourceTree = ""; }; 4A5D766314A9A9CC00DF6C68 /* PBGitRef.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitRef.m; sourceTree = ""; }; 4A5D766414A9A9CC00DF6C68 /* PBGitRefish.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitRefish.h; sourceTree = ""; }; - 4A5D766514A9A9CC00DF6C68 /* PBGitRepository.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitRepository.h; sourceTree = ""; }; - 4A5D766614A9A9CC00DF6C68 /* PBGitRepository.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitRepository.m; sourceTree = ""; }; + 4A5D766514A9A9CC00DF6C68 /* PBGitRepository.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = PBGitRepository.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 4A5D766614A9A9CC00DF6C68 /* PBGitRepository.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = PBGitRepository.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 4A5D766714A9A9CC00DF6C68 /* PBGitRepositoryWatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitRepositoryWatcher.h; sourceTree = ""; }; 4A5D766814A9A9CC00DF6C68 /* PBGitRepositoryWatcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitRepositoryWatcher.m; sourceTree = ""; }; 4A5D766914A9A9CC00DF6C68 /* PBGitRepositoryWatcherEventPath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitRepositoryWatcherEventPath.h; sourceTree = ""; }; 4A5D766A14A9A9CC00DF6C68 /* PBGitRepositoryWatcherEventPath.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitRepositoryWatcherEventPath.m; sourceTree = ""; }; 4A5D766B14A9A9CC00DF6C68 /* PBGitRevList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitRevList.h; sourceTree = ""; }; - 4A5D766C14A9A9CC00DF6C68 /* PBGitRevList.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PBGitRevList.mm; sourceTree = ""; }; + 4A5D766C14A9A9CC00DF6C68 /* PBGitRevList.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = PBGitRevList.mm; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 4A5D766D14A9A9CC00DF6C68 /* PBGitRevSpecifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitRevSpecifier.h; sourceTree = ""; }; 4A5D766E14A9A9CC00DF6C68 /* PBGitRevSpecifier.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitRevSpecifier.m; sourceTree = ""; }; - 4A5D766F14A9A9CC00DF6C68 /* PBGitSHA.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitSHA.h; sourceTree = ""; }; - 4A5D767014A9A9CC00DF6C68 /* PBGitSHA.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitSHA.m; sourceTree = ""; }; 4A5D767114A9A9CC00DF6C68 /* PBGitSVBranchItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitSVBranchItem.h; sourceTree = ""; }; 4A5D767214A9A9CC00DF6C68 /* PBGitSVBranchItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitSVBranchItem.m; sourceTree = ""; }; 4A5D767314A9A9CC00DF6C68 /* PBGitSVFolderItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitSVFolderItem.h; sourceTree = ""; }; @@ -574,7 +574,7 @@ 4A5D76B414A9A9CC00DF6C68 /* GitXTextFieldCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitXTextFieldCell.h; sourceTree = ""; }; 4A5D76B514A9A9CC00DF6C68 /* GitXTextFieldCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GitXTextFieldCell.m; sourceTree = ""; }; 4A5D76B614A9A9CC00DF6C68 /* GLFileView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GLFileView.h; sourceTree = ""; }; - 4A5D76B714A9A9CC00DF6C68 /* GLFileView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GLFileView.m; sourceTree = ""; }; + 4A5D76B714A9A9CC00DF6C68 /* GLFileView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = GLFileView.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 4A5D76B814A9A9CC00DF6C68 /* PBAddRemoteSheet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBAddRemoteSheet.h; sourceTree = ""; }; 4A5D76B914A9A9CC00DF6C68 /* PBAddRemoteSheet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBAddRemoteSheet.m; sourceTree = ""; }; 4A5D76BA14A9A9CC00DF6C68 /* PBCloneRepositoryPanel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBCloneRepositoryPanel.h; sourceTree = ""; }; @@ -594,7 +594,7 @@ 4A5D76CA14A9A9CC00DF6C68 /* PBGitGradientBarView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitGradientBarView.h; sourceTree = ""; }; 4A5D76CB14A9A9CC00DF6C68 /* PBGitGradientBarView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitGradientBarView.m; sourceTree = ""; }; 4A5D76CC14A9A9CC00DF6C68 /* PBGitRevisionCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitRevisionCell.h; sourceTree = ""; }; - 4A5D76CD14A9A9CC00DF6C68 /* PBGitRevisionCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitRevisionCell.m; sourceTree = ""; }; + 4A5D76CD14A9A9CC00DF6C68 /* PBGitRevisionCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = PBGitRevisionCell.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 4A5D76CE14A9A9CC00DF6C68 /* PBGitXMessageSheet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitXMessageSheet.h; sourceTree = ""; }; 4A5D76CF14A9A9CC00DF6C68 /* PBGitXMessageSheet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitXMessageSheet.m; sourceTree = ""; }; 4A5D76D014A9A9CC00DF6C68 /* PBIconAndTextCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBIconAndTextCell.h; sourceTree = ""; }; @@ -1064,8 +1064,6 @@ 4A5D766C14A9A9CC00DF6C68 /* PBGitRevList.mm */, 4A5D766D14A9A9CC00DF6C68 /* PBGitRevSpecifier.h */, 4A5D766E14A9A9CC00DF6C68 /* PBGitRevSpecifier.m */, - 4A5D766F14A9A9CC00DF6C68 /* PBGitSHA.h */, - 4A5D767014A9A9CC00DF6C68 /* PBGitSHA.m */, 4A5D767114A9A9CC00DF6C68 /* PBGitSVBranchItem.h */, 4A5D767214A9A9CC00DF6C68 /* PBGitSVBranchItem.m */, 4A5D767314A9A9CC00DF6C68 /* PBGitSVFolderItem.h */, @@ -1090,6 +1088,8 @@ 643952761603EF9B00BB7AFF /* PBGitSVSubmoduleItem.m */, 4AB057E11652652000DE751D /* GitRepoFinder.h */, 4AB057E21652652000DE751D /* GitRepoFinder.m */, + 2682AAB91929140E00271A4D /* GTOID+JavaScript.h */, + 2682AABA1929140E00271A4D /* GTOID+JavaScript.m */, ); path = git; sourceTree = ""; @@ -1579,7 +1579,6 @@ 4A5D770114A9A9CC00DF6C68 /* PBGitRepositoryWatcherEventPath.m in Sources */, 4A5D770214A9A9CC00DF6C68 /* PBGitRevList.mm in Sources */, 4A5D770314A9A9CC00DF6C68 /* PBGitRevSpecifier.m in Sources */, - 4A5D770414A9A9CC00DF6C68 /* PBGitSHA.m in Sources */, 4A5D770514A9A9CC00DF6C68 /* PBGitSVBranchItem.m in Sources */, 4A5D770614A9A9CC00DF6C68 /* PBGitSVFolderItem.m in Sources */, 4A5D770714A9A9CC00DF6C68 /* PBGitSVOtherRevItem.m in Sources */, @@ -1592,6 +1591,7 @@ 4A5D770E14A9A9CC00DF6C68 /* PBGitXProtocol.m in Sources */, 4A5D771114A9A9CC00DF6C68 /* GitXRelativeDateFormatter.m in Sources */, 4A5D771214A9A9CC00DF6C68 /* main.m in Sources */, + 2682AABB1929140E00271A4D /* GTOID+JavaScript.m in Sources */, 4A5D771314A9A9CC00DF6C68 /* PBChangedFile.m in Sources */, 4A5D771414A9A9CC00DF6C68 /* PBCLIProxy.m in Sources */, 4A5D771514A9A9CC00DF6C68 /* PBCommitList.m in Sources */, diff --git a/html/views/history/history.js b/html/views/history/history.js index cde11bef9..a8a888c75 100644 --- a/html/views/history/history.js +++ b/html/views/history/history.js @@ -198,7 +198,7 @@ var loadCommit = function(commitObject, currentRef) { var newRow = $("commit_header").insertRow(-1); newRow.innerHTML = "Parent:" + "" + - commit.parents[i].string() + ""; + commit.parents[i].SHA() + ""; } commit.notificationID = setTimeout(function() {