Skip to content

Commit 07d4bef

Browse files
committed
Merge branch 'refs/heads/no_libgit2'
2 parents e00f734 + ac1019d commit 07d4bef

24 files changed

+69
-399
lines changed

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

GLFileView.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ - (void) showFile
155155

156156
- (void) selectCommit:(NSString*)c
157157
{
158-
[historyController selectCommit:[PBGitSHA shaWithString:c]];
158+
[historyController selectCommit:c];
159159
}
160160

161161
// TODO: need to be refactoring

GitX.xcodeproj/project.pbxproj

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@
129129
D8F01C4B12182F19007F729F /* GitX.sdef in Resources */ = {isa = PBXBuildFile; fileRef = D8F01C4A12182F19007F729F /* GitX.sdef */; };
130130
D8F01D531218A164007F729F /* NSApplication+GitXScripting.m in Sources */ = {isa = PBXBuildFile; fileRef = D8F01D521218A164007F729F /* NSApplication+GitXScripting.m */; };
131131
D8F4AB7912298CE200D6D53C /* rewindImage.pdf in Resources */ = {isa = PBXBuildFile; fileRef = D8F4AB7812298CE200D6D53C /* rewindImage.pdf */; };
132-
D8FBCF19115FA20C0098676A /* PBGitSHA.m in Sources */ = {isa = PBXBuildFile; fileRef = D8FBCF18115FA20C0098676A /* PBGitSHA.m */; };
133132
D8FDD9F711432A12005647F6 /* PBCloneRepositoryPanel.xib in Resources */ = {isa = PBXBuildFile; fileRef = D8FDD9F511432A12005647F6 /* PBCloneRepositoryPanel.xib */; };
134133
D8FDDA6A114335E8005647F6 /* PBGitSVBranchItem.m in Sources */ = {isa = PBXBuildFile; fileRef = D8FDDA5D114335E8005647F6 /* PBGitSVBranchItem.m */; };
135134
D8FDDA6B114335E8005647F6 /* PBGitSVFolderItem.m in Sources */ = {isa = PBXBuildFile; fileRef = D8FDDA5F114335E8005647F6 /* PBGitSVFolderItem.m */; };
@@ -178,7 +177,6 @@
178177
F5AD56790E79B78100EDAAFE /* PBCommitList.m in Sources */ = {isa = PBXBuildFile; fileRef = F5AD56780E79B78100EDAAFE /* PBCommitList.m */; };
179178
F5B721C40E05CF7E00AF29DC /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = F5B721C20E05CF7E00AF29DC /* MainMenu.xib */; };
180179
F5C007750E731B48007B84B2 /* PBGitRef.m in Sources */ = {isa = PBXBuildFile; fileRef = F5C007740E731B48007B84B2 /* PBGitRef.m */; };
181-
F5C580E50EDA250900995434 /* libgit2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F5C580E40EDA250900995434 /* libgit2.a */; };
182180
F5C6F68D0E65FF9300478D97 /* PBGitLane.mm in Sources */ = {isa = PBXBuildFile; fileRef = F5C6F68C0E65FF9300478D97 /* PBGitLane.mm */; };
183181
F5DFFA6C0E075D8800617813 /* PBEasyFS.m in Sources */ = {isa = PBXBuildFile; fileRef = F5DFFA6B0E075D8800617813 /* PBEasyFS.m */; };
184182
F5E424110EA3E4D60046E362 /* PBDiffWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = F5E424100EA3E4D60046E362 /* PBDiffWindow.xib */; };
@@ -214,13 +212,6 @@
214212
remoteGlobalIDString = 913D5E480E55644600CECEA2;
215213
remoteInfo = "cli tool";
216214
};
217-
D8022C1911DFE8ED003C21F6 /* PBXContainerItemProxy */ = {
218-
isa = PBXContainerItemProxy;
219-
containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
220-
proxyType = 1;
221-
remoteGlobalIDString = D8022B1411DFCE7F003C21F6;
222-
remoteInfo = libgit2;
223-
};
224215
F5643A010F792B4900A579C2 /* PBXContainerItemProxy */ = {
225216
isa = PBXContainerItemProxy;
226217
containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
@@ -417,8 +408,6 @@
417408
D8F01D521218A164007F729F /* NSApplication+GitXScripting.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSApplication+GitXScripting.m"; sourceTree = "<group>"; };
418409
D8F01D841218A406007F729F /* GitX.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitX.h; sourceTree = "<group>"; };
419410
D8F4AB7812298CE200D6D53C /* rewindImage.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = rewindImage.pdf; path = Images/rewindImage.pdf; sourceTree = "<group>"; };
420-
D8FBCF17115FA20C0098676A /* PBGitSHA.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitSHA.h; sourceTree = "<group>"; };
421-
D8FBCF18115FA20C0098676A /* PBGitSHA.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitSHA.m; sourceTree = "<group>"; };
422411
D8FDD9F611432A12005647F6 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/PBCloneRepositoryPanel.xib; sourceTree = "<group>"; };
423412
D8FDDA5C114335E8005647F6 /* PBGitSVBranchItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitSVBranchItem.h; sourceTree = "<group>"; };
424413
D8FDDA5D114335E8005647F6 /* PBGitSVBranchItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitSVBranchItem.m; sourceTree = "<group>"; };
@@ -560,7 +549,6 @@
560549
911112370E5A097800BF76B4 /* Security.framework in Frameworks */,
561550
F580E6AE0E733276009E2D3F /* Sparkle.framework in Frameworks */,
562551
F5E4DBFB0EAB58D90013FAFC /* SystemConfiguration.framework in Frameworks */,
563-
F5C580E50EDA250900995434 /* libgit2.a in Frameworks */,
564552
D8E3B2B810DC9FB2001096A3 /* ScriptingBridge.framework in Frameworks */,
565553
);
566554
runOnlyForDeploymentPostprocessing = 0;
@@ -1084,8 +1072,6 @@
10841072
F56524EF0E02D45200F03B52 /* PBGitCommit.m */,
10851073
F5C007730E731B48007B84B2 /* PBGitRef.h */,
10861074
F5C007740E731B48007B84B2 /* PBGitRef.m */,
1087-
D8FBCF17115FA20C0098676A /* PBGitSHA.h */,
1088-
D8FBCF18115FA20C0098676A /* PBGitSHA.m */,
10891075
D8295D281130A1DC00C838E8 /* PBGitHistoryList.h */,
10901076
D8295D291130A1DC00C838E8 /* PBGitHistoryList.m */,
10911077
F5FF4E160E0829C20006317A /* PBGitRevList.h */,
@@ -1146,22 +1132,6 @@
11461132
};
11471133
/* End PBXGroup section */
11481134

1149-
/* Begin PBXLegacyTarget section */
1150-
D8022B1411DFCE7F003C21F6 /* libgit2 */ = {
1151-
isa = PBXLegacyTarget;
1152-
buildArgumentsString = "\"${PROJECT_DIR}/build_libgit2.sh\"";
1153-
buildConfigurationList = D8022B1C11DFCE98003C21F6 /* Build configuration list for PBXLegacyTarget "libgit2" */;
1154-
buildPhases = (
1155-
);
1156-
buildToolPath = /bin/sh;
1157-
dependencies = (
1158-
);
1159-
name = libgit2;
1160-
passBuildSettingsInEnvironment = 1;
1161-
productName = libgit2;
1162-
};
1163-
/* End PBXLegacyTarget section */
1164-
11651135
/* Begin PBXNativeTarget section */
11661136
551BF110112F371800265053 /* gitx_askpasswd */ = {
11671137
isa = PBXNativeTarget;
@@ -1196,7 +1166,6 @@
11961166
551BF175112F3F3500265053 /* PBXTargetDependency */,
11971167
913D5E5A0E5564F400CECEA2 /* PBXTargetDependency */,
11981168
F5643A020F792B4900A579C2 /* PBXTargetDependency */,
1199-
D8022C1A11DFE8ED003C21F6 /* PBXTargetDependency */,
12001169
);
12011170
name = GitX;
12021171
productInstallPath = "$(HOME)/Applications";
@@ -1242,7 +1211,6 @@
12421211
8D1107260486CEB800E47090 /* GitX */,
12431212
913D5E480E55644600CECEA2 /* cli tool */,
12441213
F56439F70F792B2100A579C2 /* Generate PList Prefix */,
1245-
D8022B1411DFCE7F003C21F6 /* libgit2 */,
12461214
551BF110112F371800265053 /* gitx_askpasswd */,
12471215
);
12481216
};
@@ -1452,7 +1420,6 @@
14521420
D8295D2A1130A1DC00C838E8 /* PBGitHistoryList.m in Sources */,
14531421
D8295DE01130E43900C838E8 /* PBGitHistoryGrapher.m in Sources */,
14541422
D8E105471157C18200FC28A4 /* PBQLTextView.m in Sources */,
1455-
D8FBCF19115FA20C0098676A /* PBGitSHA.m in Sources */,
14561423
D8022FED11E124C8003C21F6 /* PBGitXMessageSheet.m in Sources */,
14571424
D8EB616A122F643E00FCCAF4 /* GitXRelativeDateFormatter.m in Sources */,
14581425
D8F01D531218A164007F729F /* NSApplication+GitXScripting.m in Sources */,
@@ -1506,11 +1473,6 @@
15061473
target = 913D5E480E55644600CECEA2 /* cli tool */;
15071474
targetProxy = 913D5E590E5564F400CECEA2 /* PBXContainerItemProxy */;
15081475
};
1509-
D8022C1A11DFE8ED003C21F6 /* PBXTargetDependency */ = {
1510-
isa = PBXTargetDependency;
1511-
target = D8022B1411DFCE7F003C21F6 /* libgit2 */;
1512-
targetProxy = D8022C1911DFE8ED003C21F6 /* PBXContainerItemProxy */;
1513-
};
15141476
F5643A020F792B4900A579C2 /* PBXTargetDependency */ = {
15151477
isa = PBXTargetDependency;
15161478
target = F56439F70F792B2100A579C2 /* Generate PList Prefix */;
@@ -1820,31 +1782,6 @@
18201782
};
18211783
name = Release;
18221784
};
1823-
D8022B1511DFCE7F003C21F6 /* Debug */ = {
1824-
isa = XCBuildConfiguration;
1825-
buildSettings = {
1826-
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
1827-
COPY_PHASE_STRIP = NO;
1828-
GCC_DYNAMIC_NO_PIC = NO;
1829-
GCC_OPTIMIZATION_LEVEL = 0;
1830-
PRODUCT_NAME = libgit2;
1831-
SDKROOT = "";
1832-
};
1833-
name = Debug;
1834-
};
1835-
D8022B1611DFCE7F003C21F6 /* Release */ = {
1836-
isa = XCBuildConfiguration;
1837-
buildSettings = {
1838-
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
1839-
COPY_PHASE_STRIP = YES;
1840-
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
1841-
GCC_ENABLE_FIX_AND_CONTINUE = NO;
1842-
PRODUCT_NAME = libgit2;
1843-
SDKROOT = "";
1844-
ZERO_LINK = NO;
1845-
};
1846-
name = Release;
1847-
};
18481785
F56439F80F792B2100A579C2 /* Debug */ = {
18491786
isa = XCBuildConfiguration;
18501787
buildSettings = {
@@ -1911,15 +1848,6 @@
19111848
defaultConfigurationIsVisible = 0;
19121849
defaultConfigurationName = Release;
19131850
};
1914-
D8022B1C11DFCE98003C21F6 /* Build configuration list for PBXLegacyTarget "libgit2" */ = {
1915-
isa = XCConfigurationList;
1916-
buildConfigurations = (
1917-
D8022B1511DFCE7F003C21F6 /* Debug */,
1918-
D8022B1611DFCE7F003C21F6 /* Release */,
1919-
);
1920-
defaultConfigurationIsVisible = 0;
1921-
defaultConfigurationName = Release;
1922-
};
19231851
F56439FD0F792B3600A579C2 /* Build configuration list for PBXAggregateTarget "Generate PList Prefix" */ = {
19241852
isa = XCConfigurationList;
19251853
buildConfigurations = (

PBGitCommit.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,13 @@
1010
#import "PBGitRepository.h"
1111
#import "PBGitTree.h"
1212
#import "PBGitRefish.h"
13-
#import "PBGitSHA.h"
1413

1514

1615
extern NSString * const kGitXCommitType;
1716

1817

1918
@interface PBGitCommit : NSObject <PBGitRefish> {
20-
PBGitSHA *sha;
19+
NSString *sha;
2120

2221
NSString* subject;
2322
NSString* author;
@@ -33,8 +32,8 @@ extern NSString * const kGitXCommitType;
3332
PBGitRepository* repository;
3433
}
3534

36-
+ (PBGitCommit *)commitWithRepository:(PBGitRepository*)repo andSha:(PBGitSHA *)newSha;
37-
- (id)initWithRepository:(PBGitRepository *)repo andSha:(PBGitSHA *)newSha;
35+
+ (PBGitCommit *)commitWithRepository:(PBGitRepository*)repo andSha:(NSString *)newSha;
36+
- (id)initWithRepository:(PBGitRepository *)repo andSha:(NSString *)newSha;
3837

3938
- (void) addRef:(PBGitRef *)ref;
4039
- (void) removeRef:(id)ref;
@@ -49,7 +48,7 @@ extern NSString * const kGitXCommitType;
4948
- (NSString *) shortName;
5049
- (NSString *) refishType;
5150

52-
@property (readonly) PBGitSHA *sha;
51+
@property (readonly) NSString *sha;
5352
@property (copy) NSString* subject;
5453
@property (copy) NSString* author;
5554
@property (copy) NSString *committer;

PBGitCommit.m

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
//
88

99
#import "PBGitCommit.h"
10-
#import "PBGitSHA.h"
1110
#import "PBGitDefaults.h"
1211

1312

@@ -38,12 +37,12 @@ - (NSArray*) treeContents
3837
return self.tree.children;
3938
}
4039

41-
+ (PBGitCommit *)commitWithRepository:(PBGitRepository*)repo andSha:(PBGitSHA *)newSha
40+
+ (PBGitCommit *)commitWithRepository:(PBGitRepository*)repo andSha:(NSString *)newSha
4241
{
4342
return [[self alloc] initWithRepository:repo andSha:newSha];
4443
}
4544

46-
- (id)initWithRepository:(PBGitRepository*) repo andSha:(PBGitSHA *)newSha
45+
- (id)initWithRepository:(PBGitRepository*) repo andSha:(NSString *)newSha
4746
{
4847
details = nil;
4948
repository = repo;
@@ -53,7 +52,7 @@ - (id)initWithRepository:(PBGitRepository*) repo andSha:(PBGitSHA *)newSha
5352

5453
- (NSString *)realSha
5554
{
56-
return sha.string;
55+
return sha;
5756
}
5857

5958
- (BOOL) isOnSameBranchAs:(PBGitCommit *)otherCommit

PBGitGrapher.mm

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#import "PBGitLane.h"
1212
#import "PBGitGraphLine.h"
1313
#import <list>
14-
#import <git2/oid.h>
1514

1615
using namespace std;
1716

@@ -48,7 +47,7 @@ - (void) decorateCommit: (PBGitCommit *) commit
4847

4948
PBGitLane *currentLane = NULL;
5049
BOOL didFirst = NO;
51-
git_oid commit_oid = [[commit sha] oid];
50+
NSString *commit_oid = [commit sha];
5251

5352
// First, iterate over earlier columns and pass through any that don't want this commit
5453
if (previous != nil) {
@@ -88,8 +87,8 @@ - (void) decorateCommit: (PBGitCommit *) commit
8887

8988
// If we already did the first parent, don't do so again
9089
if (!didFirst && currentLanes->size() < MAX_LANES && nParents) {
91-
git_oid parentOID = [[parents objectAtIndex:0] oid];
92-
PBGitLane *newLane = new PBGitLane(&parentOID);
90+
NSString *parentOID = [parents objectAtIndex:0];
91+
PBGitLane *newLane = new PBGitLane(parentOID);
9392
currentLanes->push_back(newLane);
9493
newPos = currentLanes->size();
9594
add_line(lines, &currentLine, 0, newPos, newPos, newLane->index());
@@ -103,7 +102,7 @@ - (void) decorateCommit: (PBGitCommit *) commit
103102

104103
int parentIndex = 0;
105104
for (parentIndex = 1; parentIndex < nParents; ++parentIndex) {
106-
git_oid parentOID = [[parents objectAtIndex:parentIndex] oid];
105+
NSString *parentOID = [parents objectAtIndex:parentIndex];
107106
int i = 0;
108107
BOOL was_displayed = NO;
109108
std::list<PBGitLane *>::iterator it = currentLanes->begin();
@@ -123,7 +122,7 @@ - (void) decorateCommit: (PBGitCommit *) commit
123122

124123
// Really add this parent
125124
addedParent = YES;
126-
PBGitLane *newLane = new PBGitLane(&parentOID);
125+
PBGitLane *newLane = new PBGitLane(parentOID);
127126
currentLanes->push_back(newLane);
128127
add_line(lines, &currentLine, 0, currentLanes->size(), newPos, newLane->index());
129128
}
@@ -150,7 +149,7 @@ - (void) decorateCommit: (PBGitCommit *) commit
150149

151150
// Update the current lane to point to the new parent
152151
if (currentLane && nParents > 0)
153-
currentLane->setSha([[parents objectAtIndex:0] oid]);
152+
currentLane->setSha([parents objectAtIndex:0]);
154153
else
155154
currentLanes->remove(currentLane);
156155

PBGitHistoryController.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
@class QLPreviewPanel;
1919
@class PBCommitList;
2020
@class GLFileView;
21-
@class PBGitSHA;
21+
@class NSString;
2222

2323
@class PBHistorySearchController;
2424

@@ -71,7 +71,7 @@
7171
- (IBAction) setTreeView:(id)sender;
7272
- (IBAction) setBranchFilter:(id)sender;
7373

74-
- (void)selectCommit:(PBGitSHA *)commit;
74+
- (void)selectCommit:(NSString *)commit;
7575
- (IBAction) refresh:(id)sender;
7676
- (IBAction) toggleQLPreviewPanel:(id)sender;
7777
- (IBAction) openSelectedFile:(id)sender;

PBGitHistoryController.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ - (void) scrollSelectionToTopOfViewFrom:(NSInteger)oldIndex
447447
commitList.useAdjustScroll = NO;
448448
}
449449

450-
- (NSArray *) selectedObjectsForSHA:(PBGitSHA *)commitSHA
450+
- (NSArray *) selectedObjectsForSHA:(NSString *)commitSHA
451451
{
452452
NSPredicate *selection = [NSPredicate predicateWithFormat:@"sha == %@", commitSHA];
453453
NSArray *selectedCommits = [[commitController content] filteredArrayUsingPredicate:selection];
@@ -458,7 +458,7 @@ - (NSArray *) selectedObjectsForSHA:(PBGitSHA *)commitSHA
458458
return selectedCommits;
459459
}
460460

461-
- (void)selectCommit:(PBGitSHA *)commitSHA
461+
- (void)selectCommit:(NSString *)commitSHA
462462
{
463463
if (!forceSelectionUpdate && [[[[commitController selectedObjects] lastObject] sha] isEqual:commitSHA])
464464
return;

PBGitHistoryGrapher.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
#import "PBGitHistoryGrapher.h"
1010
#import "PBGitGrapher.h"
11-
#import "PBGitSHA.h"
1211

1312

1413
@implementation PBGitHistoryGrapher
@@ -47,7 +46,7 @@ - (void) graphCommits:(NSArray *)revList
4746
for (PBGitCommit *commit in revList) {
4847
if ([currentThread isCancelled])
4948
return;
50-
PBGitSHA *commitSHA = [commit sha];
49+
NSString *commitSHA = [commit sha];
5150
if (viewAllBranches || [searchSHAs containsObject:commitSHA]) {
5251
[grapher decorateCommit:commit];
5352
[commits addObject:commit];

PBGitHistoryList.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,14 @@
1414
@class PBGitRef;
1515
@class PBGitRevList;
1616
@class PBGitHistoryGrapher;
17-
@class PBGitSHA;
1817

1918
@interface PBGitHistoryList : NSObject {
2019
PBGitRepository *repository;
2120

2221
PBGitRevList *projectRevList;
2322
PBGitRevList *currentRevList;
2423

25-
PBGitSHA *lastSHA;
24+
NSString *lastSHA;
2625
NSSet *lastRefSHAs;
2726
NSInteger lastBranchFilter;
2827
PBGitRef *lastRemoteRef;

0 commit comments

Comments
 (0)