mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
Merge remote-tracking branch 'refs/remotes/laullon/master' into comments
Conflicts: PBGitHistoryController.h PBGitWindowController.h
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
.DS_Store
|
||||
build
|
||||
build/revision
|
||||
._*
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
[submodule "libgit2"]
|
||||
path = libgit2
|
||||
url = git://repo.or.cz/libgit2.git
|
||||
@@ -68,8 +68,8 @@
|
||||
|
||||
if ([PBGitDefaults useAskPasswd]) {
|
||||
// Make sure Git's SSH password requests get forwarded to our little UI tool:
|
||||
setenv( "SSH_ASKPASS", [[[NSBundle mainBundle] pathForResource: @"gitx_askpasswd" ofType: @""] UTF8String], 1 );
|
||||
setenv( "DISPLAY", "localhost:0", 1 );
|
||||
setenv( "SSH_ASKPASS", [[[NSBundle mainBundle] pathForResource: @"gitx_askpasswd" ofType: @""] UTF8String], 1 );
|
||||
setenv( "DISPLAY", "localhost:0", 1 );
|
||||
}
|
||||
|
||||
[self registerServices];
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
#import "PBGitRepository.h"
|
||||
#import "PBPresentable.h"
|
||||
|
||||
@protocol PBCommandFactory
|
||||
+ (NSArray *) commandsForObject:(id<PBPresentable>) object repository:(PBGitRepository *) repository;
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
|
||||
@interface DBPrefsWindowController : NSWindowController /*<NSAnimationDelegate,NSToolbarDelegate>*/{
|
||||
@interface DBPrefsWindowController : NSWindowController PROTOCOL_10_6(NSAnimationDelegate,NSToolbarDelegate){
|
||||
NSMutableArray *toolbarIdentifiers;
|
||||
NSMutableDictionary *toolbarViews;
|
||||
NSMutableDictionary *toolbarItems;
|
||||
|
||||
+270
-1796
File diff suppressed because it is too large
Load Diff
@@ -2,13 +2,13 @@
|
||||
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1050</int>
|
||||
<string key="IBDocument.SystemVersion">10J869</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">1305</string>
|
||||
<string key="IBDocument.AppKitVersion">1038.35</string>
|
||||
<string key="IBDocument.HIToolboxVersion">461.00</string>
|
||||
<string key="IBDocument.SystemVersion">11A459e</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">1565</string>
|
||||
<string key="IBDocument.AppKitVersion">1121.2</string>
|
||||
<string key="IBDocument.HIToolboxVersion">557.00</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="NS.object.0">1305</string>
|
||||
<string key="NS.object.0">1565</string>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
@@ -58,7 +58,7 @@
|
||||
<object class="NSButton" id="604563603">
|
||||
<reference key="NSNextResponder" ref="1005"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{18, 185}, {158, 18}}</string>
|
||||
<string key="NSFrame">{{18, 197}, {158, 18}}</string>
|
||||
<reference key="NSSuperview" ref="1005"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="910887184"/>
|
||||
@@ -91,7 +91,7 @@
|
||||
<object class="NSTextField" id="63761450">
|
||||
<reference key="NSNextResponder" ref="1005"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{17, 22}, {166, 17}}</string>
|
||||
<string key="NSFrame">{{17, 34}, {166, 17}}</string>
|
||||
<reference key="NSSuperview" ref="1005"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="83909567"/>
|
||||
@@ -125,7 +125,7 @@
|
||||
<object class="NSButton" id="83909567">
|
||||
<reference key="NSNextResponder" ref="1005"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{182, 12}, {137, 32}}</string>
|
||||
<string key="NSFrame">{{182, 24}, {137, 32}}</string>
|
||||
<reference key="NSSuperview" ref="1005"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
@@ -148,7 +148,7 @@
|
||||
<object class="NSTextField" id="25030403">
|
||||
<reference key="NSNextResponder" ref="1005"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{248, 117}, {41, 22}}</string>
|
||||
<string key="NSFrame">{{248, 129}, {41, 22}}</string>
|
||||
<reference key="NSSuperview" ref="1005"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="441589300"/>
|
||||
@@ -180,7 +180,7 @@
|
||||
<object class="NSTextField" id="258144035">
|
||||
<reference key="NSNextResponder" ref="1005"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{121, 119}, {122, 17}}</string>
|
||||
<string key="NSFrame">{{121, 131}, {122, 17}}</string>
|
||||
<reference key="NSSuperview" ref="1005"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="25030403"/>
|
||||
@@ -198,7 +198,7 @@
|
||||
<object class="NSButton" id="968361983">
|
||||
<reference key="NSNextResponder" ref="1005"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{18, 145}, {273, 18}}</string>
|
||||
<string key="NSFrame">{{18, 157}, {273, 18}}</string>
|
||||
<reference key="NSSuperview" ref="1005"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="258144035"/>
|
||||
@@ -222,7 +222,7 @@
|
||||
<object class="NSTextField" id="441589300">
|
||||
<reference key="NSNextResponder" ref="1005"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{17, 92}, {99, 17}}</string>
|
||||
<string key="NSFrame">{{17, 104}, {99, 17}}</string>
|
||||
<reference key="NSSuperview" ref="1005"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="525163949"/>
|
||||
@@ -248,7 +248,7 @@
|
||||
<string>NSFilenamesPboardType</string>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrame">{{121, 88}, {179, 22}}</string>
|
||||
<string key="NSFrame">{{121, 100}, {179, 22}}</string>
|
||||
<reference key="NSSuperview" ref="1005"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="1032928366"/>
|
||||
@@ -272,7 +272,7 @@
|
||||
<object class="NSTextField" id="617839596">
|
||||
<reference key="NSNextResponder" ref="1005"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{118, 52}, {192, 28}}</string>
|
||||
<string key="NSFrame">{{118, 64}, {192, 28}}</string>
|
||||
<reference key="NSSuperview" ref="1005"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="63761450"/>
|
||||
@@ -290,7 +290,7 @@
|
||||
<object class="NSButton" id="1032928366">
|
||||
<reference key="NSNextResponder" ref="1005"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{306, 92}, {54, 14}}</string>
|
||||
<string key="NSFrame">{{306, 104}, {54, 14}}</string>
|
||||
<reference key="NSSuperview" ref="1005"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="617839596"/>
|
||||
@@ -317,7 +317,7 @@
|
||||
<object class="NSButton" id="910887184">
|
||||
<reference key="NSNextResponder" ref="1005"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{18, 165}, {203, 18}}</string>
|
||||
<string key="NSFrame">{{18, 177}, {203, 18}}</string>
|
||||
<reference key="NSSuperview" ref="1005"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="968361983"/>
|
||||
@@ -338,14 +338,38 @@
|
||||
<int key="NSPeriodicInterval">25</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSButton" id="160081910">
|
||||
<object class="NSButton" id="669441257">
|
||||
<reference key="NSNextResponder" ref="1005"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{18, 205}, {279, 18}}</string>
|
||||
<string key="NSFrame">{{18, 217}, {279, 18}}</string>
|
||||
<reference key="NSSuperview" ref="1005"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="604563603"/>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSButtonCell" key="NSCell" id="856716276">
|
||||
<int key="NSCellFlags">-2080244224</int>
|
||||
<int key="NSCellFlags2">0</int>
|
||||
<string key="NSContents">Try to open current directory on launch</string>
|
||||
<reference key="NSSupport" ref="734450335"/>
|
||||
<reference key="NSControlView" ref="669441257"/>
|
||||
<int key="NSButtonFlags">1211912703</int>
|
||||
<int key="NSButtonFlags2">2</int>
|
||||
<reference key="NSNormalImage" ref="136676346"/>
|
||||
<reference key="NSAlternateImage" ref="690089052"/>
|
||||
<string key="NSAlternateContents"/>
|
||||
<string key="NSKeyEquivalent"/>
|
||||
<int key="NSPeriodicDelay">200</int>
|
||||
<int key="NSPeriodicInterval">25</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSButton" id="160081910">
|
||||
<reference key="NSNextResponder" ref="1005"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{18, 237}, {279, 18}}</string>
|
||||
<reference key="NSSuperview" ref="1005"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="669441257"/>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSButtonCell" key="NSCell" id="876763316">
|
||||
<int key="NSCellFlags">-2080244224</int>
|
||||
<int key="NSCellFlags2">0</int>
|
||||
@@ -365,7 +389,7 @@
|
||||
<object class="NSButton" id="516324081">
|
||||
<reference key="NSNextResponder" ref="1005"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{18, 225}, {207, 18}}</string>
|
||||
<string key="NSFrame">{{18, 257}, {207, 18}}</string>
|
||||
<reference key="NSSuperview" ref="1005"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="160081910"/>
|
||||
@@ -389,7 +413,7 @@
|
||||
<object class="NSButton" id="68472633">
|
||||
<reference key="NSNextResponder" ref="1005"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{18, 245}, {207, 18}}</string>
|
||||
<string key="NSFrame">{{18, 277}, {207, 18}}</string>
|
||||
<reference key="NSSuperview" ref="1005"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="516324081"/>
|
||||
@@ -411,7 +435,7 @@
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrameSize">{401, 281}</string>
|
||||
<string key="NSFrameSize">{401, 313}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="68472633"/>
|
||||
@@ -592,7 +616,7 @@
|
||||
<integer value="2"/>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NS.format">EEEE, MMMM d, yyyy h:mm:ss a</string>
|
||||
<string key="NS.format">EEEE, d MMMM, y h:mm:ss a</string>
|
||||
<bool key="NS.natural">NO</bool>
|
||||
</object>
|
||||
<reference key="NSControlView" ref="1045127964"/>
|
||||
@@ -695,7 +719,7 @@
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSView" id="983027044">
|
||||
<reference key="NSNextResponder" ref="611988647"/>
|
||||
<int key="NSvFlags">256</int>
|
||||
<int key="NSvFlags">274</int>
|
||||
<object class="NSMutableArray" key="NSSubviews">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSButton" id="933582906">
|
||||
@@ -1286,6 +1310,22 @@
|
||||
</object>
|
||||
<int key="connectionID">161</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBBindingConnection" key="connection">
|
||||
<string key="label">value: values.PBOpenCurDirOnLaunch</string>
|
||||
<reference key="source" ref="669441257"/>
|
||||
<reference key="destination" ref="557723770"/>
|
||||
<object class="NSNibBindingConnector" key="connector">
|
||||
<reference key="NSSource" ref="669441257"/>
|
||||
<reference key="NSDestination" ref="557723770"/>
|
||||
<string key="NSLabel">value: values.PBOpenCurDirOnLaunch</string>
|
||||
<string key="NSBinding">value</string>
|
||||
<string key="NSKeyPath">values.PBOpenCurDirOnLaunch</string>
|
||||
<int key="NSNibBindingConnectorVersion">2</int>
|
||||
</object>
|
||||
</object>
|
||||
<int key="connectionID">165</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<object class="NSArray" key="orderedObjects">
|
||||
@@ -1333,6 +1373,7 @@
|
||||
<reference ref="441589300"/>
|
||||
<reference ref="83909567"/>
|
||||
<reference ref="63761450"/>
|
||||
<reference ref="669441257"/>
|
||||
</object>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">General</string>
|
||||
@@ -1805,6 +1846,20 @@
|
||||
<reference key="object" ref="498406892"/>
|
||||
<reference key="parent" ref="516324081"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">162</int>
|
||||
<reference key="object" ref="669441257"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="856716276"/>
|
||||
</object>
|
||||
<reference key="parent" ref="1005"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">163</int>
|
||||
<reference key="object" ref="856716276"/>
|
||||
<reference key="parent" ref="669441257"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="flattenedProperties">
|
||||
@@ -1854,6 +1909,8 @@
|
||||
<string>155.IBPluginDependency</string>
|
||||
<string>156.IBPluginDependency</string>
|
||||
<string>16.IBPluginDependency</string>
|
||||
<string>162.IBPluginDependency</string>
|
||||
<string>163.IBPluginDependency</string>
|
||||
<string>17.IBPluginDependency</string>
|
||||
<string>18.IBPluginDependency</string>
|
||||
<string>19.IBPluginDependency</string>
|
||||
@@ -1968,6 +2025,8 @@
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>{{324, 683}, {400, 139}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<object class="NSMutableArray">
|
||||
@@ -2017,7 +2076,7 @@
|
||||
<reference key="dict.values" ref="0"/>
|
||||
</object>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">161</int>
|
||||
<int key="maxID">165</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
|
||||
+3
-1
@@ -155,7 +155,7 @@
|
||||
|
||||
- (void) selectCommit:(NSString*)c
|
||||
{
|
||||
[historyController selectCommit:[PBGitSHA shaWithString:c]];
|
||||
[historyController selectCommit:c];
|
||||
}
|
||||
|
||||
// TODO: need to be refactoring
|
||||
@@ -242,6 +242,8 @@
|
||||
|
||||
+ (NSString *) escapeHTML:(NSString *)txt
|
||||
{
|
||||
if (txt == nil)
|
||||
return txt;
|
||||
NSMutableString *newTxt = [NSMutableString stringWithString:txt];
|
||||
[newTxt replaceOccurrencesOfString:@"&" withString:@"&" options:NSLiteralSearch range:NSMakeRange(0, [newTxt length])];
|
||||
[newTxt replaceOccurrencesOfString:@"<" withString:@"<" options:NSLiteralSearch range:NSMakeRange(0, [newTxt length])];
|
||||
|
||||
@@ -80,6 +80,8 @@
|
||||
65D58BC7132D48C2003F7290 /* PBResetSheet.m in Sources */ = {isa = PBXBuildFile; fileRef = 65D58BC6132D48C0003F7290 /* PBResetSheet.m */; };
|
||||
770B37ED0679A11B001EADE2 /* GitTest_DataModel.xcdatamodel in Sources */ = {isa = PBXBuildFile; fileRef = 770B37EC0679A11B001EADE2 /* GitTest_DataModel.xcdatamodel */; };
|
||||
77C8280E06725ACE000B614F /* ApplicationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 77C8280C06725ACE000B614F /* ApplicationController.m */; };
|
||||
89087CA613A3E46B00911503 /* PBWebCommitController.m in Sources */ = {isa = PBXBuildFile; fileRef = 89087CA513A3E46B00911503 /* PBWebCommitController.m */; };
|
||||
8998B1C613A55B3500121729 /* PBWebStashController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8998B1C513A55B3500121729 /* PBWebStashController.m */; };
|
||||
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
|
||||
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
|
||||
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
|
||||
@@ -129,7 +131,6 @@
|
||||
D8F01C4B12182F19007F729F /* GitX.sdef in Resources */ = {isa = PBXBuildFile; fileRef = D8F01C4A12182F19007F729F /* GitX.sdef */; };
|
||||
D8F01D531218A164007F729F /* NSApplication+GitXScripting.m in Sources */ = {isa = PBXBuildFile; fileRef = D8F01D521218A164007F729F /* NSApplication+GitXScripting.m */; };
|
||||
D8F4AB7912298CE200D6D53C /* rewindImage.pdf in Resources */ = {isa = PBXBuildFile; fileRef = D8F4AB7812298CE200D6D53C /* rewindImage.pdf */; };
|
||||
D8FBCF19115FA20C0098676A /* PBGitSHA.m in Sources */ = {isa = PBXBuildFile; fileRef = D8FBCF18115FA20C0098676A /* PBGitSHA.m */; };
|
||||
D8FDD9F711432A12005647F6 /* PBCloneRepositoryPanel.xib in Resources */ = {isa = PBXBuildFile; fileRef = D8FDD9F511432A12005647F6 /* PBCloneRepositoryPanel.xib */; };
|
||||
D8FDDA6A114335E8005647F6 /* PBGitSVBranchItem.m in Sources */ = {isa = PBXBuildFile; fileRef = D8FDDA5D114335E8005647F6 /* PBGitSVBranchItem.m */; };
|
||||
D8FDDA6B114335E8005647F6 /* PBGitSVFolderItem.m in Sources */ = {isa = PBXBuildFile; fileRef = D8FDDA5F114335E8005647F6 /* PBGitSVFolderItem.m */; };
|
||||
@@ -139,6 +140,8 @@
|
||||
D8FDDA6F114335E8005647F6 /* PBGitSVStageItem.m in Sources */ = {isa = PBXBuildFile; fileRef = D8FDDA67114335E8005647F6 /* PBGitSVStageItem.m */; };
|
||||
D8FDDA70114335E8005647F6 /* PBGitSVTagItem.m in Sources */ = {isa = PBXBuildFile; fileRef = D8FDDA69114335E8005647F6 /* PBGitSVTagItem.m */; };
|
||||
D8FDDBF41143F318005647F6 /* AddRemote.png in Resources */ = {isa = PBXBuildFile; fileRef = D8FDDBF31143F318005647F6 /* AddRemote.png */; };
|
||||
DDB8FE0113998CE2001A9EE2 /* PBStashContentController.m in Sources */ = {isa = PBXBuildFile; fileRef = DDB8FE0013998CE2001A9EE2 /* PBStashContentController.m */; };
|
||||
DDB8FEC413999C24001A9EE2 /* PBStashContentView.xib in Resources */ = {isa = PBXBuildFile; fileRef = DDB8FEC313999C24001A9EE2 /* PBStashContentView.xib */; };
|
||||
F50FE0E30E07BE9600854FCD /* PBGitRevisionCell.m in Sources */ = {isa = PBXBuildFile; fileRef = F50FE0E20E07BE9600854FCD /* PBGitRevisionCell.m */; };
|
||||
F513085B0E0740F2000C8BCD /* PBQLOutlineView.m in Sources */ = {isa = PBXBuildFile; fileRef = F513085A0E0740F2000C8BCD /* PBQLOutlineView.m */; };
|
||||
F5140DC90E8A8EB20091E9F3 /* RoundedRectangle.m in Sources */ = {isa = PBXBuildFile; fileRef = F5140DC80E8A8EB20091E9F3 /* RoundedRectangle.m */; };
|
||||
@@ -178,7 +181,6 @@
|
||||
F5AD56790E79B78100EDAAFE /* PBCommitList.m in Sources */ = {isa = PBXBuildFile; fileRef = F5AD56780E79B78100EDAAFE /* PBCommitList.m */; };
|
||||
F5B721C40E05CF7E00AF29DC /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = F5B721C20E05CF7E00AF29DC /* MainMenu.xib */; };
|
||||
F5C007750E731B48007B84B2 /* PBGitRef.m in Sources */ = {isa = PBXBuildFile; fileRef = F5C007740E731B48007B84B2 /* PBGitRef.m */; };
|
||||
F5C580E50EDA250900995434 /* libgit2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F5C580E40EDA250900995434 /* libgit2.a */; };
|
||||
F5C6F68D0E65FF9300478D97 /* PBGitLane.mm in Sources */ = {isa = PBXBuildFile; fileRef = F5C6F68C0E65FF9300478D97 /* PBGitLane.mm */; };
|
||||
F5DFFA6C0E075D8800617813 /* PBEasyFS.m in Sources */ = {isa = PBXBuildFile; fileRef = F5DFFA6B0E075D8800617813 /* PBEasyFS.m */; };
|
||||
F5E424110EA3E4D60046E362 /* PBDiffWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = F5E424100EA3E4D60046E362 /* PBDiffWindow.xib */; };
|
||||
@@ -214,13 +216,6 @@
|
||||
remoteGlobalIDString = 913D5E480E55644600CECEA2;
|
||||
remoteInfo = "cli tool";
|
||||
};
|
||||
D8022C1911DFE8ED003C21F6 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = D8022B1411DFCE7F003C21F6;
|
||||
remoteInfo = libgit2;
|
||||
};
|
||||
F5643A010F792B4900A579C2 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
|
||||
@@ -342,6 +337,10 @@
|
||||
77C82804067257F0000B614F /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
|
||||
77C8280B06725ACE000B614F /* ApplicationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApplicationController.h; sourceTree = "<group>"; };
|
||||
77C8280C06725ACE000B614F /* ApplicationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ApplicationController.m; sourceTree = "<group>"; };
|
||||
89087CA413A3E46500911503 /* PBWebCommitController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBWebCommitController.h; sourceTree = "<group>"; };
|
||||
89087CA513A3E46B00911503 /* PBWebCommitController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBWebCommitController.m; sourceTree = "<group>"; };
|
||||
8998B1AC13A55AC100121729 /* PBWebStashController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBWebStashController.h; sourceTree = "<group>"; };
|
||||
8998B1C513A55B3500121729 /* PBWebStashController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBWebStashController.m; sourceTree = "<group>"; };
|
||||
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
|
||||
8D1107320486CEB800E47090 /* GitX.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GitX.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
911111E10E58BD5A00BF76B4 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/RepositoryWindow.xib; sourceTree = "<group>"; };
|
||||
@@ -417,8 +416,6 @@
|
||||
D8F01D521218A164007F729F /* NSApplication+GitXScripting.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSApplication+GitXScripting.m"; sourceTree = "<group>"; };
|
||||
D8F01D841218A406007F729F /* GitX.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GitX.h; sourceTree = "<group>"; };
|
||||
D8F4AB7812298CE200D6D53C /* rewindImage.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = rewindImage.pdf; path = Images/rewindImage.pdf; sourceTree = "<group>"; };
|
||||
D8FBCF17115FA20C0098676A /* PBGitSHA.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitSHA.h; sourceTree = "<group>"; };
|
||||
D8FBCF18115FA20C0098676A /* PBGitSHA.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitSHA.m; sourceTree = "<group>"; };
|
||||
D8FDD9F611432A12005647F6 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/PBCloneRepositoryPanel.xib; sourceTree = "<group>"; };
|
||||
D8FDDA5C114335E8005647F6 /* PBGitSVBranchItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitSVBranchItem.h; sourceTree = "<group>"; };
|
||||
D8FDDA5D114335E8005647F6 /* PBGitSVBranchItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitSVBranchItem.m; sourceTree = "<group>"; };
|
||||
@@ -436,6 +433,9 @@
|
||||
D8FDDA69114335E8005647F6 /* PBGitSVTagItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitSVTagItem.m; sourceTree = "<group>"; };
|
||||
D8FDDA7311433634005647F6 /* PBSourceViewItems.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBSourceViewItems.h; sourceTree = "<group>"; };
|
||||
D8FDDBF31143F318005647F6 /* AddRemote.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = AddRemote.png; path = Images/AddRemote.png; sourceTree = "<group>"; };
|
||||
DDB8FDFF13998CE2001A9EE2 /* PBStashContentController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBStashContentController.h; sourceTree = "<group>"; };
|
||||
DDB8FE0013998CE2001A9EE2 /* PBStashContentController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBStashContentController.m; sourceTree = "<group>"; };
|
||||
DDB8FEC313999C24001A9EE2 /* PBStashContentView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PBStashContentView.xib; sourceTree = "<group>"; };
|
||||
F50FE0E10E07BE9600854FCD /* PBGitRevisionCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitRevisionCell.h; sourceTree = "<group>"; };
|
||||
F50FE0E20E07BE9600854FCD /* PBGitRevisionCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitRevisionCell.m; sourceTree = "<group>"; };
|
||||
F51308590E0740F2000C8BCD /* PBQLOutlineView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBQLOutlineView.h; sourceTree = "<group>"; };
|
||||
@@ -503,7 +503,7 @@
|
||||
F5B721C30E05CF7E00AF29DC /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||
F5C007730E731B48007B84B2 /* PBGitRef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitRef.h; sourceTree = "<group>"; };
|
||||
F5C007740E731B48007B84B2 /* PBGitRef.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitRef.m; sourceTree = "<group>"; };
|
||||
F5C580E40EDA250900995434 /* libgit2.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libgit2.a; path = libgit2/libgit2.a; sourceTree = "<group>"; };
|
||||
F5C580E40EDA250900995434 /* libgit2.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libgit2.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
F5C6F68B0E65FF9300478D97 /* PBGitLane.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitLane.h; sourceTree = "<group>"; };
|
||||
F5C6F68C0E65FF9300478D97 /* PBGitLane.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PBGitLane.mm; sourceTree = "<group>"; };
|
||||
F5D2DC850EA401A80034AD24 /* PBGitConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitConfig.h; sourceTree = "<group>"; };
|
||||
@@ -560,7 +560,6 @@
|
||||
911112370E5A097800BF76B4 /* Security.framework in Frameworks */,
|
||||
F580E6AE0E733276009E2D3F /* Sparkle.framework in Frameworks */,
|
||||
F5E4DBFB0EAB58D90013FAFC /* SystemConfiguration.framework in Frameworks */,
|
||||
F5C580E50EDA250900995434 /* libgit2.a in Frameworks */,
|
||||
D8E3B2B810DC9FB2001096A3 /* ScriptingBridge.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@@ -777,6 +776,7 @@
|
||||
F5E424100EA3E4D60046E362 /* PBDiffWindow.xib */,
|
||||
F52BCE020E84208300AA3741 /* PBGitHistoryView.xib */,
|
||||
F59116E50E843BB50072CCB1 /* PBGitCommitView.xib */,
|
||||
DDB8FEC313999C24001A9EE2 /* PBStashContentView.xib */,
|
||||
D85B939210E3D8B4007F3C28 /* PBCreateBranchSheet.xib */,
|
||||
D889EB3010E6BCBB00F08413 /* PBCreateTagSheet.xib */,
|
||||
D8C1B77110E875CF009B7F8B /* PBRemoteProgressSheet.xib */,
|
||||
@@ -852,6 +852,17 @@
|
||||
name = Models;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8998B1AB13A55A9B00121729 /* Stash */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DDB8FDFF13998CE2001A9EE2 /* PBStashContentController.h */,
|
||||
DDB8FE0013998CE2001A9EE2 /* PBStashContentController.m */,
|
||||
8998B1AC13A55AC100121729 /* PBWebStashController.h */,
|
||||
8998B1C513A55B3500121729 /* PBWebStashController.m */,
|
||||
);
|
||||
name = Stash;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
913D5E420E5563FD00CECEA2 /* cli */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -947,6 +958,7 @@
|
||||
F5EF8C880E9D498F0050906B /* History */,
|
||||
F5E927F90E883EF600056E75 /* Commit */,
|
||||
D82F435F111B9C6D00A25A39 /* Sheets */,
|
||||
8998B1AB13A55A9B00121729 /* Stash */,
|
||||
77C8280B06725ACE000B614F /* ApplicationController.h */,
|
||||
77C8280C06725ACE000B614F /* ApplicationController.m */,
|
||||
93CB42C00EAB7B2200530609 /* PBGitDefaults.h */,
|
||||
@@ -957,6 +969,8 @@
|
||||
911111F70E594F3F00BF76B4 /* PBRepositoryDocumentController.m */,
|
||||
F5E926040E8827D300056E75 /* PBViewController.h */,
|
||||
F5E926050E8827D300056E75 /* PBViewController.m */,
|
||||
89087CA413A3E46500911503 /* PBWebCommitController.h */,
|
||||
89087CA513A3E46B00911503 /* PBWebCommitController.m */,
|
||||
F5EF8C8C0E9D4A5D0050906B /* PBWebController.h */,
|
||||
F5EF8C8D0E9D4A5D0050906B /* PBWebController.m */,
|
||||
F5FE6C010EB13BC900F30D12 /* PBServicesController.h */,
|
||||
@@ -1084,8 +1098,6 @@
|
||||
F56524EF0E02D45200F03B52 /* PBGitCommit.m */,
|
||||
F5C007730E731B48007B84B2 /* PBGitRef.h */,
|
||||
F5C007740E731B48007B84B2 /* PBGitRef.m */,
|
||||
D8FBCF17115FA20C0098676A /* PBGitSHA.h */,
|
||||
D8FBCF18115FA20C0098676A /* PBGitSHA.m */,
|
||||
D8295D281130A1DC00C838E8 /* PBGitHistoryList.h */,
|
||||
D8295D291130A1DC00C838E8 /* PBGitHistoryList.m */,
|
||||
F5FF4E160E0829C20006317A /* PBGitRevList.h */,
|
||||
@@ -1146,22 +1158,6 @@
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXLegacyTarget section */
|
||||
D8022B1411DFCE7F003C21F6 /* libgit2 */ = {
|
||||
isa = PBXLegacyTarget;
|
||||
buildArgumentsString = "\"${PROJECT_DIR}/build_libgit2.sh\"";
|
||||
buildConfigurationList = D8022B1C11DFCE98003C21F6 /* Build configuration list for PBXLegacyTarget "libgit2" */;
|
||||
buildPhases = (
|
||||
);
|
||||
buildToolPath = /bin/sh;
|
||||
dependencies = (
|
||||
);
|
||||
name = libgit2;
|
||||
passBuildSettingsInEnvironment = 1;
|
||||
productName = libgit2;
|
||||
};
|
||||
/* End PBXLegacyTarget section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
551BF110112F371800265053 /* gitx_askpasswd */ = {
|
||||
isa = PBXNativeTarget;
|
||||
@@ -1196,7 +1192,6 @@
|
||||
551BF175112F3F3500265053 /* PBXTargetDependency */,
|
||||
913D5E5A0E5564F400CECEA2 /* PBXTargetDependency */,
|
||||
F5643A020F792B4900A579C2 /* PBXTargetDependency */,
|
||||
D8022C1A11DFE8ED003C21F6 /* PBXTargetDependency */,
|
||||
);
|
||||
name = GitX;
|
||||
productInstallPath = "$(HOME)/Applications";
|
||||
@@ -1241,7 +1236,6 @@
|
||||
8D1107260486CEB800E47090 /* GitX */,
|
||||
913D5E480E55644600CECEA2 /* cli tool */,
|
||||
F56439F70F792B2100A579C2 /* Generate PList Prefix */,
|
||||
D8022B1411DFCE7F003C21F6 /* libgit2 */,
|
||||
551BF110112F371800265053 /* gitx_askpasswd */,
|
||||
);
|
||||
};
|
||||
@@ -1317,6 +1311,7 @@
|
||||
316E7202131EE9C600AFBB36 /* list_Template.png in Resources */,
|
||||
316E7203131EE9C600AFBB36 /* sidebar_Template.png in Resources */,
|
||||
65D58BC4132D27A8003F7290 /* PBResetSheet.xib in Resources */,
|
||||
DDB8FEC413999C24001A9EE2 /* PBStashContentView.xib in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -1337,7 +1332,7 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "# Build the scripting bridge header GitX.h if the GitX.sdef file changes\nsdef $TARGET_BUILD_DIR/GitX.app | sdp -fh --basename GitX";
|
||||
shellScript = "# Build the scripting bridge header GitX.h if the GitX.sdef file changes\nsdef \"$TARGET_BUILD_DIR/GitX.app\" | sdp -fh --basename GitX";
|
||||
};
|
||||
F56439F60F792B2100A579C2 /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
@@ -1451,7 +1446,6 @@
|
||||
D8295D2A1130A1DC00C838E8 /* PBGitHistoryList.m in Sources */,
|
||||
D8295DE01130E43900C838E8 /* PBGitHistoryGrapher.m in Sources */,
|
||||
D8E105471157C18200FC28A4 /* PBQLTextView.m in Sources */,
|
||||
D8FBCF19115FA20C0098676A /* PBGitSHA.m in Sources */,
|
||||
D8022FED11E124C8003C21F6 /* PBGitXMessageSheet.m in Sources */,
|
||||
D8EB616A122F643E00FCCAF4 /* GitXRelativeDateFormatter.m in Sources */,
|
||||
D8F01D531218A164007F729F /* NSApplication+GitXScripting.m in Sources */,
|
||||
@@ -1479,6 +1473,9 @@
|
||||
217FF0BE12A1CB3E00785A65 /* PBRevealWithFinderCommand.m in Sources */,
|
||||
65D58BC7132D48C2003F7290 /* PBResetSheet.m in Sources */,
|
||||
31776089133569350025876E /* SearchWebView.m in Sources */,
|
||||
DDB8FE0113998CE2001A9EE2 /* PBStashContentController.m in Sources */,
|
||||
89087CA613A3E46B00911503 /* PBWebCommitController.m in Sources */,
|
||||
8998B1C613A55B3500121729 /* PBWebStashController.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -1505,11 +1502,6 @@
|
||||
target = 913D5E480E55644600CECEA2 /* cli tool */;
|
||||
targetProxy = 913D5E590E5564F400CECEA2 /* PBXContainerItemProxy */;
|
||||
};
|
||||
D8022C1A11DFE8ED003C21F6 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = D8022B1411DFCE7F003C21F6 /* libgit2 */;
|
||||
targetProxy = D8022C1911DFE8ED003C21F6 /* PBXContainerItemProxy */;
|
||||
};
|
||||
F5643A020F792B4900A579C2 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = F56439F70F792B2100A579C2 /* Generate PList Prefix */;
|
||||
@@ -1604,6 +1596,7 @@
|
||||
26FC0A850875C7B200E6366F /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@@ -1616,13 +1609,14 @@
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = GitX_Prefix.pch;
|
||||
HEADER_SEARCH_PATHS = libgit2/src;
|
||||
HEADER_SEARCH_PATHS = libgit2/include;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-traditional";
|
||||
INFOPLIST_PREFIX_HEADER = $PROJECT_TEMP_DIR/revision;
|
||||
INFOPLIST_PREPROCESS = YES;
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
LIBRARY_SEARCH_PATHS = libgit2;
|
||||
LIBRARY_SEARCH_PATHS = "";
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PRODUCT_NAME = GitX;
|
||||
SDKROOT = "";
|
||||
WRAPPER_EXTENSION = app;
|
||||
@@ -1633,6 +1627,7 @@
|
||||
26FC0A860875C7B200E6366F /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@@ -1643,13 +1638,13 @@
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = GitX_Prefix.pch;
|
||||
GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = "";
|
||||
HEADER_SEARCH_PATHS = libgit2/src;
|
||||
HEADER_SEARCH_PATHS = libgit2/include;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-traditional";
|
||||
INFOPLIST_PREFIX_HEADER = $PROJECT_TEMP_DIR/revision;
|
||||
INFOPLIST_PREPROCESS = YES;
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
LIBRARY_SEARCH_PATHS = libgit2;
|
||||
LIBRARY_SEARCH_PATHS = "";
|
||||
PRODUCT_NAME = GitX;
|
||||
SDKROOT = "";
|
||||
WRAPPER_EXTENSION = app;
|
||||
@@ -1695,6 +1690,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
@@ -1703,6 +1699,7 @@
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
|
||||
INSTALL_PATH = /usr/local/bin;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
OTHER_LDFLAGS = (
|
||||
"-framework",
|
||||
Foundation,
|
||||
@@ -1719,6 +1716,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
COPY_PHASE_STRIP = YES;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = NO;
|
||||
@@ -1743,6 +1741,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
@@ -1763,6 +1762,7 @@
|
||||
913D5E4B0E55644600CECEA2 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
@@ -1771,7 +1771,8 @@
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
|
||||
INSTALL_PATH = /usr/local/bin;
|
||||
LIBRARY_SEARCH_PATHS = libgit2;
|
||||
LIBRARY_SEARCH_PATHS = "";
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
OTHER_LDFLAGS = (
|
||||
"-framework",
|
||||
Foundation,
|
||||
@@ -1788,6 +1789,7 @@
|
||||
913D5E4C0E55644600CECEA2 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
COPY_PHASE_STRIP = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = NO;
|
||||
@@ -1795,7 +1797,7 @@
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
|
||||
INSTALL_PATH = /usr/local/bin;
|
||||
LIBRARY_SEARCH_PATHS = libgit2;
|
||||
LIBRARY_SEARCH_PATHS = "";
|
||||
OTHER_LDFLAGS = (
|
||||
"-framework",
|
||||
Foundation,
|
||||
@@ -1809,32 +1811,10 @@
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
D8022B1511DFCE7F003C21F6 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
PRODUCT_NAME = libgit2;
|
||||
SDKROOT = "";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
D8022B1611DFCE7F003C21F6 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = NO;
|
||||
PRODUCT_NAME = libgit2;
|
||||
SDKROOT = "";
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
F56439F80F792B2100A579C2 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
@@ -1846,6 +1826,7 @@
|
||||
F56439F90F792B2100A579C2 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
COPY_PHASE_STRIP = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = NO;
|
||||
@@ -1896,15 +1877,6 @@
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
D8022B1C11DFCE98003C21F6 /* Build configuration list for PBXLegacyTarget "libgit2" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
D8022B1511DFCE7F003C21F6 /* Debug */,
|
||||
D8022B1611DFCE7F003C21F6 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
F56439FD0F792B3600A579C2 /* Build configuration list for PBXAggregateTarget "Generate PList Prefix" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
|
||||
@@ -17,3 +17,16 @@
|
||||
#ifndef ALog
|
||||
#define ALog(...) DLog(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
// In 10.6, some NSObject categories (like NSWindowDelegate) were changed to
|
||||
// protocols. Thus to avoid warnings we need to add protocol specifiers, but
|
||||
// only when compiling for 10.6+.
|
||||
#ifndef MAC_OS_X_VERSION_10_6
|
||||
#define MAC_OS_X_VERSION_10_6 1060
|
||||
#endif
|
||||
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
|
||||
#define PROTOCOL_10_6(...) <__VA_ARGS__>
|
||||
#else
|
||||
#define PROTOCOL_10_6(...)
|
||||
#endif
|
||||
|
||||
@@ -60,6 +60,8 @@
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>NSSupportsSuddenTermination</key>
|
||||
<true/>
|
||||
<key>SUFeedURL</key>
|
||||
<string>http://gitx.laullon.com/appcast.xml</string>
|
||||
<key>NSServices</key>
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
NSPoint eventLocation = [self convertPoint: [theEvent locationInWindow] fromView: nil];
|
||||
NSInteger rowIndex = [self rowAtPoint:eventLocation];
|
||||
[self selectRowIndexes:[NSIndexSet indexSetWithIndex:rowIndex] byExtendingSelection:TRUE];
|
||||
return [[self delegate] menuForTable: self];
|
||||
// TODO: Fix the coupling so we don't need the cast (at least).
|
||||
return [(PBGitIndexController*)[self delegate] menuForTable: self];
|
||||
}
|
||||
|
||||
return nil;
|
||||
|
||||
+4
-5
@@ -10,14 +10,13 @@
|
||||
#import "PBGitRepository.h"
|
||||
#import "PBGitTree.h"
|
||||
#import "PBGitRefish.h"
|
||||
#import "PBGitSHA.h"
|
||||
|
||||
|
||||
extern NSString * const kGitXCommitType;
|
||||
|
||||
|
||||
@interface PBGitCommit : NSObject <PBGitRefish> {
|
||||
PBGitSHA *sha;
|
||||
NSString *sha;
|
||||
|
||||
NSString* subject;
|
||||
NSString* author;
|
||||
@@ -33,8 +32,8 @@ extern NSString * const kGitXCommitType;
|
||||
PBGitRepository* repository;
|
||||
}
|
||||
|
||||
+ (PBGitCommit *)commitWithRepository:(PBGitRepository*)repo andSha:(PBGitSHA *)newSha;
|
||||
- (id)initWithRepository:(PBGitRepository *)repo andSha:(PBGitSHA *)newSha;
|
||||
+ (PBGitCommit *)commitWithRepository:(PBGitRepository*)repo andSha:(NSString *)newSha;
|
||||
- (id)initWithRepository:(PBGitRepository *)repo andSha:(NSString *)newSha;
|
||||
|
||||
- (void) addRef:(PBGitRef *)ref;
|
||||
- (void) removeRef:(id)ref;
|
||||
@@ -49,7 +48,7 @@ extern NSString * const kGitXCommitType;
|
||||
- (NSString *) shortName;
|
||||
- (NSString *) refishType;
|
||||
|
||||
@property (readonly) PBGitSHA *sha;
|
||||
@property (readonly) NSString *sha;
|
||||
@property (copy) NSString* subject;
|
||||
@property (copy) NSString* author;
|
||||
@property (copy) NSString *committer;
|
||||
|
||||
+3
-4
@@ -7,7 +7,6 @@
|
||||
//
|
||||
|
||||
#import "PBGitCommit.h"
|
||||
#import "PBGitSHA.h"
|
||||
#import "PBGitDefaults.h"
|
||||
|
||||
|
||||
@@ -38,12 +37,12 @@ NSString * const kGitXCommitType = @"commit";
|
||||
return self.tree.children;
|
||||
}
|
||||
|
||||
+ (PBGitCommit *)commitWithRepository:(PBGitRepository*)repo andSha:(PBGitSHA *)newSha
|
||||
+ (PBGitCommit *)commitWithRepository:(PBGitRepository*)repo andSha:(NSString *)newSha
|
||||
{
|
||||
return [[self alloc] initWithRepository:repo andSha:newSha];
|
||||
}
|
||||
|
||||
- (id)initWithRepository:(PBGitRepository*) repo andSha:(PBGitSHA *)newSha
|
||||
- (id)initWithRepository:(PBGitRepository*) repo andSha:(NSString *)newSha
|
||||
{
|
||||
details = nil;
|
||||
repository = repo;
|
||||
@@ -53,7 +52,7 @@ NSString * const kGitXCommitType = @"commit";
|
||||
|
||||
- (NSString *)realSha
|
||||
{
|
||||
return sha.string;
|
||||
return sha;
|
||||
}
|
||||
|
||||
- (BOOL) isOnSameBranchAs:(PBGitCommit *)otherCommit
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
{
|
||||
[commitMessageView setEditable:YES];
|
||||
[commitMessageView setString:@""];
|
||||
[webController setStateMessage:[NSString stringWithFormat:[[notification userInfo] objectForKey:@"description"]]];
|
||||
[webController setStateMessage:[NSString stringWithString:[[notification userInfo] objectForKey:@"description"]]];
|
||||
[repository reloadRefs];
|
||||
}
|
||||
|
||||
|
||||
+6
-5
@@ -99,19 +99,20 @@
|
||||
NSArray* arguments;
|
||||
|
||||
if (inDir == nil) {
|
||||
arguments = [NSArray arrayWithObjects:@"config", @"--global", @"-l", nil];
|
||||
arguments = [NSArray arrayWithObjects:@"config", @"--global", @"-l", @"-z", nil];
|
||||
} else {
|
||||
arguments = [NSArray arrayWithObjects:@"config", @"-l", nil];
|
||||
arguments = [NSArray arrayWithObjects:@"config", @"-l", @"-z", nil];
|
||||
}
|
||||
|
||||
int ret = 1;
|
||||
NSString* output = [PBEasyPipe outputForCommand:[PBGitBinary path] withArgs:arguments inDir:inDir retValue:&ret];
|
||||
NSMutableDictionary *result = [NSMutableDictionary dictionary];
|
||||
if (ret==0) {
|
||||
NSArray *lines = [output componentsSeparatedByString:@"\n"];
|
||||
|
||||
NSArray *lines = [output componentsSeparatedByString:@"\0"];
|
||||
|
||||
for (NSString* line in lines) {
|
||||
NSRange equalsPos = [line rangeOfString:@"="];
|
||||
if([line length] == 0) continue;
|
||||
NSRange equalsPos = [line rangeOfString:@"\n"];
|
||||
NSString* key = [line substringToIndex:equalsPos.location];
|
||||
NSString* value = [line substringFromIndex:equalsPos.location+1];
|
||||
[result setObject:value forKey:key];
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@
|
||||
forKey:kRefreshAutomatically];
|
||||
[defaultValues setObject:[NSNumber numberWithBool:YES]
|
||||
forKey:kUseAskPasswd];
|
||||
[defaultValues setObject:[NSNumber numberWithBool:YES]
|
||||
[defaultValues setObject:[NSNumber numberWithBool:NO]
|
||||
forKey:kOpenCurDirOnLaunch];
|
||||
[defaultValues setObject:[NSNumber numberWithBool:YES]
|
||||
forKey:kShowOpenPanelOnLaunch];
|
||||
|
||||
+6
-7
@@ -11,7 +11,6 @@
|
||||
#import "PBGitLane.h"
|
||||
#import "PBGitGraphLine.h"
|
||||
#import <list>
|
||||
#import "git/oid.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
@@ -48,7 +47,7 @@ void add_line(struct PBGitGraphLine *lines, int *nLines, int upper, int from, in
|
||||
|
||||
PBGitLane *currentLane = NULL;
|
||||
BOOL didFirst = NO;
|
||||
git_oid commit_oid = [[commit sha] oid];
|
||||
NSString *commit_oid = [commit sha];
|
||||
|
||||
// First, iterate over earlier columns and pass through any that don't want this commit
|
||||
if (previous != nil) {
|
||||
@@ -88,8 +87,8 @@ void add_line(struct PBGitGraphLine *lines, int *nLines, int upper, int from, in
|
||||
|
||||
// If we already did the first parent, don't do so again
|
||||
if (!didFirst && currentLanes->size() < MAX_LANES && nParents) {
|
||||
git_oid parentOID = [[parents objectAtIndex:0] oid];
|
||||
PBGitLane *newLane = new PBGitLane(&parentOID);
|
||||
NSString *parentOID = [parents objectAtIndex:0];
|
||||
PBGitLane *newLane = new PBGitLane(parentOID);
|
||||
currentLanes->push_back(newLane);
|
||||
newPos = currentLanes->size();
|
||||
add_line(lines, ¤tLine, 0, newPos, newPos, newLane->index());
|
||||
@@ -103,7 +102,7 @@ void add_line(struct PBGitGraphLine *lines, int *nLines, int upper, int from, in
|
||||
|
||||
int parentIndex = 0;
|
||||
for (parentIndex = 1; parentIndex < nParents; ++parentIndex) {
|
||||
git_oid parentOID = [[parents objectAtIndex:parentIndex] oid];
|
||||
NSString *parentOID = [parents objectAtIndex:parentIndex];
|
||||
int i = 0;
|
||||
BOOL was_displayed = NO;
|
||||
std::list<PBGitLane *>::iterator it = currentLanes->begin();
|
||||
@@ -123,7 +122,7 @@ void add_line(struct PBGitGraphLine *lines, int *nLines, int upper, int from, in
|
||||
|
||||
// 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());
|
||||
}
|
||||
@@ -150,7 +149,7 @@ void add_line(struct PBGitGraphLine *lines, int *nLines, int upper, int from, in
|
||||
|
||||
// Update the current lane to point to the new parent
|
||||
if (currentLane && nParents > 0)
|
||||
currentLane->setSha([[parents objectAtIndex:0] oid]);
|
||||
currentLane->setSha([parents objectAtIndex:0]);
|
||||
else
|
||||
currentLanes->remove(currentLane);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// PBGitHistoryView.h
|
||||
// PBGitHistoryController.h
|
||||
// GitX
|
||||
//
|
||||
// Created by Pieter de Bie on 19-09-08.
|
||||
@@ -18,12 +18,12 @@
|
||||
@class QLPreviewPanel;
|
||||
@class PBCommitList;
|
||||
@class GLFileView;
|
||||
@class PBGitSHA;
|
||||
@class NSString;
|
||||
|
||||
@class PBHistorySearchController;
|
||||
|
||||
// Controls the split history view from PBGitHistoryView.xib
|
||||
@interface PBGitHistoryController : PBViewController /*<NSOutlineViewDelegate>*/{
|
||||
@interface PBGitHistoryController : PBViewController PROTOCOL_10_6(NSOutlineViewDelegate){
|
||||
IBOutlet PBRefController *refController;
|
||||
IBOutlet NSSearchField *searchField;
|
||||
IBOutlet NSArrayController* commitController;
|
||||
@@ -34,7 +34,7 @@
|
||||
IBOutlet PBCommitList* commitList;
|
||||
IBOutlet NSSplitView *historySplitView;
|
||||
IBOutlet PBWebHistoryController *webHistoryController;
|
||||
QLPreviewPanel* previewPanel;
|
||||
QLPreviewPanel* previewPanel;
|
||||
IBOutlet PBHistorySearchController *searchController;
|
||||
IBOutlet GLFileView *fileView;
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
- (IBAction) setTreeView:(id)sender;
|
||||
- (IBAction) setBranchFilter:(id)sender;
|
||||
|
||||
- (void)selectCommit:(PBGitSHA *)commit;
|
||||
- (void)selectCommit:(NSString *)commit;
|
||||
- (IBAction) refresh:(id)sender;
|
||||
- (IBAction) toggleQLPreviewPanel:(id)sender;
|
||||
- (IBAction) openSelectedFile:(id)sender;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// PBGitHistoryView.m
|
||||
// PBGitHistoryController.m
|
||||
// GitX
|
||||
//
|
||||
// Created by Pieter de Bie on 19-09-08.
|
||||
@@ -94,7 +94,7 @@
|
||||
|
||||
|
||||
[super awakeFromNib];
|
||||
[fileBrowser setDelegate:self];
|
||||
[fileBrowser setDelegate:self];
|
||||
}
|
||||
|
||||
- (void)updateKeys
|
||||
@@ -414,7 +414,7 @@
|
||||
|
||||
- (void) updateView
|
||||
{
|
||||
[self refresh: nil];
|
||||
[self refresh: nil];
|
||||
[self updateKeys];
|
||||
}
|
||||
|
||||
@@ -447,7 +447,7 @@
|
||||
commitList.useAdjustScroll = NO;
|
||||
}
|
||||
|
||||
- (NSArray *) selectedObjectsForSHA:(PBGitSHA *)commitSHA
|
||||
- (NSArray *) selectedObjectsForSHA:(NSString *)commitSHA
|
||||
{
|
||||
NSPredicate *selection = [NSPredicate predicateWithFormat:@"sha == %@", commitSHA];
|
||||
NSArray *selectedCommits = [[commitController content] filteredArrayUsingPredicate:selection];
|
||||
@@ -458,7 +458,7 @@
|
||||
return selectedCommits;
|
||||
}
|
||||
|
||||
- (void)selectCommit:(PBGitSHA *)commitSHA
|
||||
- (void)selectCommit:(NSString *)commitSHA
|
||||
{
|
||||
if (!forceSelectionUpdate && [[[[commitController selectedObjects] lastObject] sha] isEqual:commitSHA])
|
||||
return;
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
|
||||
#import "PBGitHistoryGrapher.h"
|
||||
#import "PBGitGrapher.h"
|
||||
#import "PBGitSHA.h"
|
||||
|
||||
|
||||
@implementation PBGitHistoryGrapher
|
||||
@@ -47,7 +46,7 @@
|
||||
for (PBGitCommit *commit in revList) {
|
||||
if ([currentThread isCancelled])
|
||||
return;
|
||||
PBGitSHA *commitSHA = [commit sha];
|
||||
NSString *commitSHA = [commit sha];
|
||||
if (viewAllBranches || [searchSHAs containsObject:commitSHA]) {
|
||||
[grapher decorateCommit:commit];
|
||||
[commits addObject:commit];
|
||||
|
||||
+1
-2
@@ -14,7 +14,6 @@
|
||||
@class PBGitRef;
|
||||
@class PBGitRevList;
|
||||
@class PBGitHistoryGrapher;
|
||||
@class PBGitSHA;
|
||||
|
||||
@interface PBGitHistoryList : NSObject {
|
||||
PBGitRepository *repository;
|
||||
@@ -22,7 +21,7 @@
|
||||
PBGitRevList *projectRevList;
|
||||
PBGitRevList *currentRevList;
|
||||
|
||||
PBGitSHA *lastSHA;
|
||||
NSString *lastSHA;
|
||||
NSSet *lastRefSHAs;
|
||||
NSInteger lastBranchFilter;
|
||||
PBGitRef *lastRemoteRef;
|
||||
|
||||
+4
-5
@@ -11,7 +11,6 @@
|
||||
#import "PBGitRevList.h"
|
||||
#import "PBGitGrapher.h"
|
||||
#import "PBGitHistoryGrapher.h"
|
||||
#import "PBGitSHA.h"
|
||||
|
||||
|
||||
|
||||
@@ -168,7 +167,7 @@
|
||||
NSMutableSet *baseCommitSHAs = [NSMutableSet set];
|
||||
NSDictionary *refs = repository.refs;
|
||||
|
||||
for (PBGitSHA *sha in refs)
|
||||
for (NSString *sha in refs)
|
||||
for (PBGitRef *ref in [refs objectForKey:sha])
|
||||
if ([ref isBranch] || [ref isTag])
|
||||
[baseCommitSHAs addObject:sha];
|
||||
@@ -187,7 +186,7 @@
|
||||
|
||||
PBGitRef *remoteRef = [[repository.currentBranch ref] remoteRef];
|
||||
|
||||
for (PBGitSHA *sha in refs)
|
||||
for (NSString *sha in refs)
|
||||
for (PBGitRef *ref in [refs objectForKey:sha])
|
||||
if ([remoteRef isEqualToRef:[ref remoteRef]])
|
||||
[baseCommitSHAs addObject:sha];
|
||||
@@ -203,7 +202,7 @@
|
||||
return [NSMutableSet setWithObject:lastSHA];
|
||||
else if ([repository.currentBranch isSimpleRef]) {
|
||||
PBGitRef *currentRef = [repository.currentBranch ref];
|
||||
PBGitSHA *sha = [repository shaForRef:currentRef];
|
||||
NSString *sha = [repository shaForRef:currentRef];
|
||||
if (sha)
|
||||
return [NSMutableSet setWithObject:sha];
|
||||
}
|
||||
@@ -273,7 +272,7 @@
|
||||
return NO;
|
||||
}
|
||||
|
||||
PBGitSHA *revSHA = [repository shaForRef:[rev ref]];
|
||||
NSString *revSHA = [repository shaForRef:[rev ref]];
|
||||
if ([revSHA isEqual:lastSHA] && (lastBranchFilter == repository.currentBranchFilter))
|
||||
return NO;
|
||||
|
||||
|
||||
+6
-20
@@ -6,46 +6,32 @@
|
||||
// Copyright 2008 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#include "git/oid.h"
|
||||
|
||||
class PBGitLane {
|
||||
static int s_colorIndex;
|
||||
|
||||
git_oid d_sha;
|
||||
NSString *d_sha;
|
||||
int d_index;
|
||||
|
||||
public:
|
||||
|
||||
PBGitLane(git_oid *sha)
|
||||
{
|
||||
d_index = s_colorIndex++;
|
||||
d_sha = *sha;
|
||||
}
|
||||
|
||||
PBGitLane(NSString *sha)
|
||||
{
|
||||
git_oid_mkstr(&d_sha, [sha UTF8String]);
|
||||
d_index = s_colorIndex++;
|
||||
d_sha = sha;
|
||||
}
|
||||
|
||||
|
||||
PBGitLane()
|
||||
{
|
||||
d_index = s_colorIndex++;
|
||||
}
|
||||
|
||||
bool isCommit(git_oid sha) const
|
||||
bool isCommit(NSString *sha) const
|
||||
{
|
||||
return !git_oid_cmp(&d_sha, &sha);
|
||||
}
|
||||
|
||||
void setSha(git_oid sha);
|
||||
|
||||
git_oid const *sha() const
|
||||
{
|
||||
return &d_sha;
|
||||
return [d_sha isEqual:sha];
|
||||
}
|
||||
|
||||
void setSha(NSString *sha);
|
||||
int index() const;
|
||||
|
||||
static void resetColors();
|
||||
};
|
||||
+1
-1
@@ -29,7 +29,7 @@ int PBGitLane::index() const
|
||||
return d_index;
|
||||
}
|
||||
|
||||
void PBGitLane::setSha(git_oid sha)
|
||||
void PBGitLane::setSha(NSString *sha)
|
||||
{
|
||||
d_sha = sha;
|
||||
}
|
||||
|
||||
+11
-11
@@ -12,10 +12,6 @@
|
||||
#import "PBGitConfig.h"
|
||||
#import "PBGitRefish.h"
|
||||
|
||||
#import "PBStashController.h"
|
||||
#import "PBGitResetController.h"
|
||||
#import "PBSubmoduleController.h"
|
||||
|
||||
extern NSString* PBGitRepositoryErrorDomain;
|
||||
typedef enum branchFilterTypes {
|
||||
kGitXAllBranchesFilter = 0,
|
||||
@@ -42,7 +38,9 @@ static NSString * PBStringFromBranchFilterType(PBGitXBranchFilterType type) {
|
||||
|
||||
@class PBGitWindowController;
|
||||
@class PBGitCommit;
|
||||
@class PBGitSHA;
|
||||
@class PBGitResetController;
|
||||
@class PBStashController;
|
||||
@class PBSubmoduleController;
|
||||
|
||||
@interface PBGitRepository : NSDocument {
|
||||
PBGitHistoryList* revisionList;
|
||||
@@ -55,7 +53,7 @@ static NSString * PBStringFromBranchFilterType(PBGitXBranchFilterType type) {
|
||||
NSMutableDictionary *refs;
|
||||
|
||||
PBGitRevSpecifier *_headRef; // Caching
|
||||
PBGitSHA* _headSha;
|
||||
NSString* _headSha;
|
||||
|
||||
PBStashController *stashController;
|
||||
PBSubmoduleController *submoduleController;
|
||||
@@ -88,6 +86,7 @@ static NSString * PBStringFromBranchFilterType(PBGitXBranchFilterType type) {
|
||||
|
||||
- (NSFileHandle*) handleForCommand:(NSString*) cmd;
|
||||
- (NSFileHandle*) handleForArguments:(NSArray*) args;
|
||||
- (NSFileHandle*) handleInWorkDirForArguments:(NSArray *)args;
|
||||
- (NSFileHandle *) handleInWorkDirForArguments:(NSArray *)args;
|
||||
- (NSString*) outputForCommand:(NSString*) cmd;
|
||||
- (NSString *)outputForCommand:(NSString *)str retValue:(int *)ret;
|
||||
@@ -111,13 +110,13 @@ static NSString * PBStringFromBranchFilterType(PBGitXBranchFilterType type) {
|
||||
- (void) addRef:(PBGitRef *)ref fromParameters:(NSArray *)params;
|
||||
- (void) lazyReload;
|
||||
- (PBGitRevSpecifier*)headRef;
|
||||
- (PBGitSHA *)headSHA;
|
||||
- (NSString *)headSHA;
|
||||
- (PBGitCommit *)headCommit;
|
||||
- (PBGitSHA *)shaForRef:(PBGitRef *)ref;
|
||||
- (NSString *)shaForRef:(PBGitRef *)ref;
|
||||
- (PBGitCommit *)commitForRef:(PBGitRef *)ref;
|
||||
- (PBGitCommit *)commitForSHA:(PBGitSHA *)sha;
|
||||
- (BOOL)isOnSameBranch:(PBGitSHA *)baseSHA asSHA:(PBGitSHA *)testSHA;
|
||||
- (BOOL)isSHAOnHeadBranch:(PBGitSHA *)testSHA;
|
||||
- (PBGitCommit *)commitForSHA:(NSString *)sha;
|
||||
- (BOOL)isOnSameBranch:(NSString *)baseSHA asSHA:(NSString *)testSHA;
|
||||
- (BOOL)isSHAOnHeadBranch:(NSString *)testSHA;
|
||||
- (BOOL)isRefOnHeadBranch:(PBGitRef *)testRef;
|
||||
- (BOOL)checkRefFormat:(NSString *)refName;
|
||||
- (BOOL)refExists:(PBGitRef *)ref;
|
||||
@@ -127,6 +126,7 @@ static NSString * PBStringFromBranchFilterType(PBGitXBranchFilterType type) {
|
||||
- (BOOL) hasRemotes;
|
||||
- (PBGitRef *) remoteRefForBranch:(PBGitRef *)branch error:(NSError **)error;
|
||||
- (NSString *) infoForRemote:(NSString *)remoteName;
|
||||
- (NSArray*) URLsForRemote:(NSString*)remoteName;
|
||||
|
||||
- (void) readCurrentBranch;
|
||||
- (PBGitRevSpecifier*) addBranch: (PBGitRevSpecifier*) rev;
|
||||
|
||||
+78
-18
@@ -12,14 +12,17 @@
|
||||
#import "PBGitBinary.h"
|
||||
|
||||
#import "NSFileHandleExt.h"
|
||||
#import "PBEasyPipe.h"
|
||||
#import "PBGitRef.h"
|
||||
#import "PBGitRevSpecifier.h"
|
||||
#import "PBRemoteProgressSheet.h"
|
||||
#import "PBGitRevList.h"
|
||||
#import "PBGitDefaults.h"
|
||||
#import "GitXScriptingConstants.h"
|
||||
#import "PBEasyPipe.h"
|
||||
#import "PBGitDefaults.h"
|
||||
#import "PBGitRef.h"
|
||||
#import "PBGitResetController.h"
|
||||
#import "PBGitRevList.h"
|
||||
#import "PBGitRevSpecifier.h"
|
||||
#import "PBHistorySearchController.h"
|
||||
#import "PBRemoteProgressSheet.h"
|
||||
#import "PBStashController.h"
|
||||
#import "PBSubmoduleController.h"
|
||||
|
||||
#import "PBGitStash.h"
|
||||
#import "PBGitSubmodule.h"
|
||||
@@ -118,6 +121,7 @@ NSString* PBGitRepositoryErrorDomain = @"GitXErrorDomain";
|
||||
//this works much better.
|
||||
- (BOOL)readFromURL:(NSURL *)absoluteURL ofType:(NSString *)typeName error:(NSError **)outError
|
||||
{
|
||||
@try {
|
||||
if (![PBGitBinary path])
|
||||
{
|
||||
if (outError) {
|
||||
@@ -153,6 +157,14 @@ NSString* PBGitRepositoryErrorDomain = @"GitXErrorDomain";
|
||||
[self setFileURL:gitDirURL];
|
||||
[self setup];
|
||||
return YES;
|
||||
} @catch(id x) {
|
||||
if (outError) {
|
||||
NSDictionary* userInfo = [NSDictionary dictionaryWithObject:[NSString stringWithFormat:@"An error occured while trying to open %@.\n%@", [self fileURL],x]
|
||||
forKey:NSLocalizedRecoverySuggestionErrorKey];
|
||||
*outError = [NSError errorWithDomain:PBGitRepositoryErrorDomain code:0 userInfo:userInfo];
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
- (void) setup
|
||||
@@ -265,11 +277,16 @@ NSString* PBGitRepositoryErrorDomain = @"GitXErrorDomain";
|
||||
{
|
||||
NSString* type = [components objectAtIndex:1];
|
||||
|
||||
PBGitSHA *sha;
|
||||
NSString *sha;
|
||||
if ([type isEqualToString:@"tag"] && [components count] == 4)
|
||||
sha = [PBGitSHA shaWithString:[components objectAtIndex:3]];
|
||||
sha = [components objectAtIndex:3];
|
||||
else
|
||||
sha = [PBGitSHA shaWithString:[components objectAtIndex:2]];
|
||||
sha = [components objectAtIndex:2];
|
||||
|
||||
if(!sha) {
|
||||
NSLog(@"sha was nil...? ref=%@, components=%@",ref,components);
|
||||
return;
|
||||
}
|
||||
|
||||
NSMutableArray* curRefs;
|
||||
if ( (curRefs = [refs objectForKey:sha]) != nil )
|
||||
@@ -278,6 +295,41 @@ NSString* PBGitRepositoryErrorDomain = @"GitXErrorDomain";
|
||||
[refs setObject:[NSMutableArray arrayWithObject:ref] forKey:sha];
|
||||
}
|
||||
|
||||
// Returns the remote's fetch and pull URLs as an array of two strings.
|
||||
- (NSArray*) URLsForRemote:(NSString*)remoteName
|
||||
{
|
||||
NSArray *arguments = [NSArray arrayWithObjects:@"remote", @"show", @"-n", remoteName, nil];
|
||||
NSString *output = [self outputForArguments:arguments];
|
||||
|
||||
NSArray *remoteLines = [output componentsSeparatedByString:@"\n"];
|
||||
NSString *fetchURL = [remoteLines objectAtIndex:1];
|
||||
NSString *pushURL = [remoteLines objectAtIndex:2];
|
||||
|
||||
if ([fetchURL hasPrefix:@" Fetch URL: "] && [pushURL hasPrefix:@" Push URL: "])
|
||||
return [NSArray arrayWithObjects:
|
||||
[fetchURL substringFromIndex:13],
|
||||
[pushURL substringFromIndex:13],
|
||||
nil];
|
||||
return nil;
|
||||
}
|
||||
|
||||
// Extracts the text that should be shown in a help tag.
|
||||
- (NSString*) helpTextForRef:(PBGitRef*)ref
|
||||
{
|
||||
NSString *output = nil;
|
||||
NSString *name = [ref shortName];
|
||||
NSArray *arguments = nil;
|
||||
|
||||
if ([ref isTag]) {
|
||||
arguments = [NSArray arrayWithObjects:@"tag", @"-ln", name, nil];
|
||||
output = [self outputForArguments:arguments];
|
||||
if (![output hasPrefix:name])
|
||||
return nil;
|
||||
return [[output substringFromIndex:[name length]] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void) reloadRefs
|
||||
{
|
||||
_headRef = nil;
|
||||
@@ -290,6 +342,13 @@ NSString* PBGitRepositoryErrorDomain = @"GitXErrorDomain";
|
||||
NSString *output = [self outputForArguments:arguments];
|
||||
NSArray *lines = [output componentsSeparatedByString:@"\n"];
|
||||
|
||||
if([output hasPrefix:@"fatal: "]) {
|
||||
NSLog(@"Unable to read refs!");
|
||||
NSLog(@"arguments=%@",arguments);
|
||||
NSLog(@"output=%@",output);
|
||||
@throw output;
|
||||
}
|
||||
|
||||
for (NSString *line in lines) {
|
||||
// If its an empty line, skip it (e.g. with empty repositories)
|
||||
if ([line length] == 0)
|
||||
@@ -300,6 +359,7 @@ NSString* PBGitRepositoryErrorDomain = @"GitXErrorDomain";
|
||||
PBGitRef *newRef = [PBGitRef refFromString:[components objectAtIndex:0]];
|
||||
PBGitRevSpecifier *revSpec = [[PBGitRevSpecifier alloc] initWithRef:newRef];
|
||||
|
||||
[revSpec setHelpText:[self helpTextForRef:newRef]];
|
||||
[self addBranch:revSpec];
|
||||
[self addRef:newRef fromParameters:components];
|
||||
[oldBranches removeObject:revSpec];
|
||||
@@ -353,7 +413,7 @@ NSString* PBGitRepositoryErrorDomain = @"GitXErrorDomain";
|
||||
return _headRef;
|
||||
}
|
||||
|
||||
- (PBGitSHA *)headSHA
|
||||
- (NSString *)headSHA
|
||||
{
|
||||
if (! _headSha)
|
||||
[self headRef];
|
||||
@@ -366,12 +426,12 @@ NSString* PBGitRepositoryErrorDomain = @"GitXErrorDomain";
|
||||
return [self commitForSHA:[self headSHA]];
|
||||
}
|
||||
|
||||
- (PBGitSHA *)shaForRef:(PBGitRef *)ref
|
||||
- (NSString *)shaForRef:(PBGitRef *)ref
|
||||
{
|
||||
if (!ref)
|
||||
return nil;
|
||||
|
||||
for (PBGitSHA *sha in refs)
|
||||
for (NSString *sha in refs)
|
||||
for (PBGitRef *existingRef in [refs objectForKey:sha])
|
||||
if ([existingRef isEqualToRef:ref])
|
||||
return sha;
|
||||
@@ -382,7 +442,7 @@ NSString* PBGitRepositoryErrorDomain = @"GitXErrorDomain";
|
||||
if (retValue || [shaForRef isEqualToString:@""])
|
||||
return nil;
|
||||
|
||||
return [PBGitSHA shaWithString:shaForRef];
|
||||
return shaForRef;
|
||||
}
|
||||
|
||||
- (PBGitCommit *)commitForRef:(PBGitRef *)ref
|
||||
@@ -393,7 +453,7 @@ NSString* PBGitRepositoryErrorDomain = @"GitXErrorDomain";
|
||||
return [self commitForSHA:[self shaForRef:ref]];
|
||||
}
|
||||
|
||||
- (PBGitCommit *)commitForSHA:(PBGitSHA *)sha
|
||||
- (PBGitCommit *)commitForSHA:(NSString *)sha
|
||||
{
|
||||
if (!sha)
|
||||
return nil;
|
||||
@@ -410,7 +470,7 @@ NSString* PBGitRepositoryErrorDomain = @"GitXErrorDomain";
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (BOOL)isOnSameBranch:(PBGitSHA *)branchSHA asSHA:(PBGitSHA *)testSHA
|
||||
- (BOOL)isOnSameBranch:(NSString *)branchSHA asSHA:(NSString *)testSHA
|
||||
{
|
||||
if (!branchSHA || !testSHA)
|
||||
return NO;
|
||||
@@ -423,7 +483,7 @@ NSString* PBGitRepositoryErrorDomain = @"GitXErrorDomain";
|
||||
NSMutableSet *searchSHAs = [NSMutableSet setWithObject:branchSHA];
|
||||
|
||||
for (PBGitCommit *commit in revList) {
|
||||
PBGitSHA *commitSHA = [commit sha];
|
||||
NSString *commitSHA = [commit sha];
|
||||
if ([searchSHAs containsObject:commitSHA]) {
|
||||
if ([testSHA isEqual:commitSHA])
|
||||
return YES;
|
||||
@@ -437,12 +497,12 @@ NSString* PBGitRepositoryErrorDomain = @"GitXErrorDomain";
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL)isSHAOnHeadBranch:(PBGitSHA *)testSHA
|
||||
- (BOOL)isSHAOnHeadBranch:(NSString *)testSHA
|
||||
{
|
||||
if (!testSHA)
|
||||
return NO;
|
||||
|
||||
PBGitSHA *headSHA = [self headSHA];
|
||||
NSString *headSHA = [self headSHA];
|
||||
|
||||
if ([testSHA isEqual:headSHA])
|
||||
return YES;
|
||||
|
||||
+28
-26
@@ -102,11 +102,11 @@ using namespace std;
|
||||
std::map<string, NSStringEncoding> encodingMap;
|
||||
NSThread *currentThread = [NSThread currentThread];
|
||||
|
||||
NSString *formatString = @"--pretty=format:%H\01%e\01%aN\01%cN\01%s\01%P\01%at";
|
||||
NSString *formatString = @"--pretty=format:%H\01%e\01%aN\01%cN\01%P\01%at\01%s";
|
||||
BOOL showSign = [rev hasLeftRight];
|
||||
|
||||
if (showSign)
|
||||
formatString = [formatString stringByAppendingString:@"\01%m"];
|
||||
formatString = [@"%m\01" stringByAppendingString:formatString];
|
||||
|
||||
NSMutableArray *arguments = [NSMutableArray arrayWithObjects:@"log", @"-z", @"--topo-order", @"--children", formatString, nil];
|
||||
|
||||
@@ -129,6 +129,16 @@ using namespace std;
|
||||
if ([currentThread isCancelled])
|
||||
break;
|
||||
|
||||
char c;
|
||||
char sign;
|
||||
if (showSign)
|
||||
{
|
||||
stream >> sign;
|
||||
stream >> c; // Remove separator
|
||||
if (sign != '>' && sign != '<' && sign != '^' && sign != '-')
|
||||
DLog(@"Error loading commits: sign not correct");
|
||||
}
|
||||
|
||||
string sha;
|
||||
if (!getline(stream, sha, '\1'))
|
||||
break;
|
||||
@@ -147,9 +157,14 @@ using namespace std;
|
||||
}
|
||||
}
|
||||
|
||||
git_oid oid;
|
||||
git_oid_mkstr(&oid, sha.c_str());
|
||||
PBGitCommit *newCommit = [PBGitCommit commitWithRepository:repository andSha:[PBGitSHA shaWithOID:oid]];
|
||||
NSString *oid=[NSString stringWithCString:sha.c_str() encoding:encoding];
|
||||
if([oid length]!=40)
|
||||
break;
|
||||
|
||||
PBGitCommit *newCommit = [PBGitCommit commitWithRepository:repository andSha:oid];
|
||||
|
||||
if (showSign)
|
||||
[newCommit setSign: sign];
|
||||
|
||||
string author;
|
||||
getline(stream, author, '\1');
|
||||
@@ -157,11 +172,9 @@ using namespace std;
|
||||
string committer;
|
||||
getline(stream, committer, '\1');
|
||||
|
||||
string subject;
|
||||
getline(stream, subject, '\1');
|
||||
|
||||
string parentString;
|
||||
getline(stream, parentString, '\1');
|
||||
|
||||
if (parentString.size() != 0)
|
||||
{
|
||||
if (((parentString.size() + 1) % 41) != 0) {
|
||||
@@ -171,35 +184,24 @@ using namespace std;
|
||||
int nParents = (parentString.size() + 1) / 41;
|
||||
NSMutableArray *parents = [NSMutableArray arrayWithCapacity:nParents];
|
||||
int parentIndex;
|
||||
for (parentIndex = 0; parentIndex < nParents; ++parentIndex)
|
||||
[parents addObject:[PBGitSHA shaWithCString:parentString.substr(parentIndex * 41, 40).c_str()]];
|
||||
|
||||
for (parentIndex = 0; parentIndex < nParents; ++parentIndex) {
|
||||
NSString *pOid=[NSString stringWithCString:parentString.substr(parentIndex * 41, 40).c_str() encoding:encoding];
|
||||
[parents addObject:pOid];
|
||||
}
|
||||
[newCommit setParents:parents];
|
||||
}
|
||||
|
||||
int time;
|
||||
stream >> time;
|
||||
|
||||
string subject;
|
||||
getline(stream, subject, '\0');
|
||||
|
||||
[newCommit setSubject:[NSString stringWithCString:subject.c_str() encoding:encoding]];
|
||||
[newCommit setAuthor:[NSString stringWithCString:author.c_str() encoding:encoding]];
|
||||
[newCommit setCommitter:[NSString stringWithCString:committer.c_str() encoding:encoding]];
|
||||
[newCommit setTimestamp:time];
|
||||
|
||||
if (showSign)
|
||||
{
|
||||
char c;
|
||||
stream >> c; // Remove separator
|
||||
stream >> c;
|
||||
if (c != '>' && c != '<' && c != '^' && c != '-')
|
||||
DLog(@"Error loading commits: sign not correct");
|
||||
[newCommit setSign: c];
|
||||
}
|
||||
|
||||
char c;
|
||||
stream >> c;
|
||||
if (c != '\0')
|
||||
cout << "Error" << endl;
|
||||
|
||||
[revisions addObject: newCommit];
|
||||
if (isGraphing)
|
||||
[g decorateCommit:newCommit];
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
@interface PBGitRevSpecifier : NSObject <NSCopying> {
|
||||
NSString *description;
|
||||
NSString *helpText;
|
||||
NSArray *parameters;
|
||||
NSURL *workingDirectory;
|
||||
BOOL isSimpleRef;
|
||||
@@ -36,6 +37,7 @@
|
||||
+ (PBGitRevSpecifier *)localBranchesRevSpec;
|
||||
|
||||
@property(retain) NSString *description;
|
||||
@property(retain) NSString *helpText;
|
||||
@property(readonly) NSArray *parameters;
|
||||
@property(retain) NSURL *workingDirectory;
|
||||
@property(readonly) BOOL isSimpleRef;
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
|
||||
@implementation PBGitRevSpecifier
|
||||
|
||||
@synthesize parameters, description, workingDirectory;
|
||||
@synthesize parameters, description, helpText, workingDirectory;
|
||||
@synthesize isSimpleRef;
|
||||
@synthesize behind,ahead;
|
||||
|
||||
|
||||
+2
-2
@@ -60,10 +60,10 @@
|
||||
|
||||
- (BOOL) isCurrentCommit
|
||||
{
|
||||
PBGitSHA *thisSha = [self.objectValue sha];
|
||||
NSString *thisSha = [self.objectValue sha];
|
||||
|
||||
PBGitRepository* repository = [self.objectValue repository];
|
||||
PBGitSHA *currentSha = [repository headSHA];
|
||||
NSString *currentSha = [repository headSHA];
|
||||
|
||||
return [currentSha isEqual:thisSha];
|
||||
}
|
||||
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
//
|
||||
// PBGitSHA.h
|
||||
// GitX
|
||||
//
|
||||
// Created by BrotherBard on 3/28/10.
|
||||
// Copyright 2010 BrotherBard. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#include "git/oid.h"
|
||||
|
||||
|
||||
@interface PBGitSHA : NSObject <NSCopying> {
|
||||
git_oid oid;
|
||||
NSString *string;
|
||||
}
|
||||
|
||||
|
||||
+ (PBGitSHA *)shaWithOID:(git_oid)oid;
|
||||
+ (PBGitSHA *)shaWithString:(NSString *)shaString;
|
||||
+ (PBGitSHA *)shaWithCString:(const char *)shaCString;
|
||||
|
||||
- (BOOL)isEqualToOID:(git_oid)other_oid;
|
||||
|
||||
@property (readonly) git_oid oid;
|
||||
@property (readonly) NSString *string;
|
||||
|
||||
@end
|
||||
-139
@@ -1,139 +0,0 @@
|
||||
//
|
||||
// PBGitSHA.m
|
||||
// GitX
|
||||
//
|
||||
// Created by BrotherBard on 3/28/10.
|
||||
// Copyright 2010 BrotherBard. All rights reserved.
|
||||
//
|
||||
|
||||
#import "PBGitSHA.h"
|
||||
|
||||
|
||||
@interface PBGitSHA ()
|
||||
|
||||
- (id)initWithOID:(git_oid)g_oid;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation PBGitSHA
|
||||
|
||||
|
||||
@synthesize oid;
|
||||
@synthesize string;
|
||||
|
||||
|
||||
+ (PBGitSHA *)shaWithOID:(git_oid)oid
|
||||
{
|
||||
return [[PBGitSHA alloc] initWithOID:oid];
|
||||
}
|
||||
|
||||
|
||||
+ (PBGitSHA *)shaWithString:(NSString *)shaString
|
||||
{
|
||||
git_oid oid;
|
||||
int err = git_oid_mkstr(&oid, [shaString UTF8String]);
|
||||
if (err == GIT_ENOTOID)
|
||||
return nil;
|
||||
|
||||
return [self shaWithOID:oid];
|
||||
}
|
||||
|
||||
|
||||
+ (PBGitSHA *)shaWithCString:(const char *)shaCString
|
||||
{
|
||||
git_oid oid;
|
||||
int err = git_oid_mkstr(&oid, shaCString);
|
||||
if (err == GIT_ENOTOID)
|
||||
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)g_oid
|
||||
{
|
||||
self = [super init];
|
||||
if (!self)
|
||||
return nil;
|
||||
|
||||
oid = g_oid;
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
|
||||
- (NSString *)string
|
||||
{
|
||||
if (!string) {
|
||||
char *hex = git_oid_allocfmt(&oid);
|
||||
if (hex == NULL)
|
||||
return nil;
|
||||
string = [NSString stringWithUTF8String:hex];
|
||||
free(hex);
|
||||
}
|
||||
|
||||
return string;
|
||||
}
|
||||
|
||||
|
||||
- (BOOL)isEqual:(id)otherSHA
|
||||
{
|
||||
if (self == otherSHA)
|
||||
return YES;
|
||||
|
||||
git_oid other_oid = [(PBGitSHA *)otherSHA oid];
|
||||
return git_oid_cmp(&oid, &other_oid) == 0;
|
||||
}
|
||||
|
||||
|
||||
- (BOOL)isEqualToOID:(git_oid)other_oid
|
||||
{
|
||||
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 <NSCopying>
|
||||
|
||||
- (id)copyWithZone:(NSZone *)zone
|
||||
{
|
||||
git_oid oidCopy;
|
||||
git_oid_cpy(&oidCopy, &oid);
|
||||
PBGitSHA *copy = [[[self class] allocWithZone:zone] initWithOID:oidCopy];
|
||||
|
||||
return copy;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -12,9 +12,11 @@
|
||||
|
||||
@interface PBGitSVRemoteItem : PBSourceViewItem {
|
||||
BOOL alert;
|
||||
NSString *helpText;
|
||||
}
|
||||
|
||||
@property (assign) BOOL alert;
|
||||
@property (retain) NSString *helpText;
|
||||
|
||||
+ (id)remoteItemWithTitle:(NSString *)title;
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
@implementation PBGitSVRemoteItem
|
||||
|
||||
@synthesize alert;
|
||||
@synthesize helpText;
|
||||
|
||||
+ (id)remoteItemWithTitle:(NSString *)title
|
||||
{
|
||||
|
||||
@@ -12,17 +12,18 @@
|
||||
@class PBSourceViewItem;
|
||||
@class PBGitHistoryController;
|
||||
@class PBGitCommitController;
|
||||
@class PBStashContentController;
|
||||
|
||||
@interface PBGitSidebarController : PBViewController /*<NSOutlineViewDelegate>*/{
|
||||
@interface PBGitSidebarController : PBViewController PROTOCOL_10_6(NSOutlineViewDelegate, NSMenuDelegate){
|
||||
IBOutlet NSWindow *window;
|
||||
IBOutlet NSOutlineView *sourceView;
|
||||
IBOutlet NSView *sourceListControlsView;
|
||||
IBOutlet NSPopUpButton *actionButton;
|
||||
IBOutlet NSSegmentedControl *remoteControls;
|
||||
|
||||
IBOutlet NSButton* svnFetchButton;
|
||||
IBOutlet NSButton* svnRebaseButton;
|
||||
IBOutlet NSButton* svnDcommitButton;
|
||||
IBOutlet NSButton* svnFetchButton;
|
||||
IBOutlet NSButton* svnRebaseButton;
|
||||
IBOutlet NSButton* svnDcommitButton;
|
||||
|
||||
NSMutableArray *items;
|
||||
|
||||
@@ -33,6 +34,7 @@
|
||||
|
||||
PBGitHistoryController *historyViewController;
|
||||
PBGitCommitController *commitViewController;
|
||||
PBStashContentController *stashViewController;
|
||||
}
|
||||
|
||||
- (void) selectStage;
|
||||
@@ -54,5 +56,6 @@
|
||||
@property(readonly) NSView *sourceListControlsView;
|
||||
@property(readonly) PBGitHistoryController *historyViewController;
|
||||
@property(readonly) PBGitCommitController *commitViewController;
|
||||
@property(readonly) PBStashContentController *stashViewController;
|
||||
|
||||
@end
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#import "PBCommandMenuItem.h"
|
||||
#import "PBGitStash.h"
|
||||
#import "PBGitSubmodule.h"
|
||||
#import "PBSubmoduleController.h"
|
||||
#import "PBStashContentController.h"
|
||||
|
||||
static NSString * const kObservingContextStashes = @"stashesChanged";
|
||||
static NSString * const kObservingContextSubmodules = @"submodulesChanged";
|
||||
@@ -42,6 +44,7 @@ static NSString * const kObservingContextSubmodules = @"submodulesChanged";
|
||||
@synthesize sourceListControlsView;
|
||||
@synthesize historyViewController;
|
||||
@synthesize commitViewController;
|
||||
@synthesize stashViewController;
|
||||
|
||||
- (id)initWithRepository:(PBGitRepository *)theRepository superController:(PBGitWindowController *)controller
|
||||
{
|
||||
@@ -60,6 +63,9 @@ static NSString * const kObservingContextSubmodules = @"submodulesChanged";
|
||||
|
||||
historyViewController = [[PBGitHistoryController alloc] initWithRepository:repository superController:superController];
|
||||
commitViewController = [[PBGitCommitController alloc] initWithRepository:repository superController:superController];
|
||||
stashViewController = [[PBStashContentController alloc] initWithRepository:repository superController:superController];
|
||||
|
||||
[stashViewController loadView];
|
||||
|
||||
[repository addObserver:self forKeyPath:@"refs" options:0 context:@"updateRefs"];
|
||||
[repository addObserver:self forKeyPath:@"currentBranch" options:0 context:@"currentBranchChange"];
|
||||
@@ -83,6 +89,7 @@ static NSString * const kObservingContextSubmodules = @"submodulesChanged";
|
||||
{
|
||||
[historyViewController closeView];
|
||||
[commitViewController closeView];
|
||||
[stashViewController closeView];
|
||||
|
||||
[repository removeObserver:self forKeyPath:@"currentBranch"];
|
||||
[repository removeObserver:self forKeyPath:@"branches"];
|
||||
@@ -318,6 +325,12 @@ static NSString * const kObservingContextSubmodules = @"submodulesChanged";
|
||||
[PBGitDefaults setShowStageView:YES];
|
||||
}
|
||||
|
||||
if ([item parent] == stashes) {
|
||||
[superController changeContentController:stashViewController];
|
||||
[PBGitDefaults setShowStageView:NO];
|
||||
[stashViewController showStash:(PBGitStash*)[(PBGitMenuItem*)item sourceObject]];
|
||||
}
|
||||
|
||||
[self updateActionMenu];
|
||||
[self updateRemoteControls];
|
||||
}
|
||||
@@ -342,6 +355,11 @@ static NSString * const kObservingContextSubmodules = @"submodulesChanged";
|
||||
[cell setImage:[item icon]];
|
||||
}
|
||||
|
||||
- (NSString *)outlineView:(NSOutlineView *)outlineView toolTipForCell:(NSCell *)cell rect:(NSRectPointer)rect tableColumn:(NSTableColumn *)tc item:(id)item mouseLocation:(NSPoint)mouseLocation
|
||||
{
|
||||
return [item helpText];
|
||||
}
|
||||
|
||||
- (BOOL)outlineView:(NSOutlineView *)outlineView shouldSelectItem:(id)item
|
||||
{
|
||||
return ![item isGroupItem];
|
||||
@@ -360,6 +378,17 @@ static NSString * const kObservingContextSubmodules = @"submodulesChanged";
|
||||
return ![item isUncollapsible];
|
||||
}
|
||||
|
||||
- (NSString*) helpTextForRemoteURLs:(NSArray*)urls
|
||||
{
|
||||
NSString *fetchURL = [urls objectAtIndex:0];
|
||||
NSString *pushURL = [urls objectAtIndex:1];
|
||||
|
||||
if ([fetchURL isEqual:pushURL])
|
||||
return fetchURL;
|
||||
else // Down triangle for fetch, up triangle for push
|
||||
return [NSString stringWithFormat:@"\u25bc %@\n\u25b2", fetchURL, pushURL];
|
||||
}
|
||||
|
||||
- (void)populateList
|
||||
{
|
||||
PBSourceViewItem *project = [PBSourceViewItem groupItemWithTitle:[repository projectName]];
|
||||
@@ -379,6 +408,8 @@ static NSString * const kObservingContextSubmodules = @"submodulesChanged";
|
||||
|
||||
for (PBGitRevSpecifier *rev in repository.branches)
|
||||
[self addRevSpec:rev];
|
||||
for (PBGitSVRemoteItem *remote in remotes.children)
|
||||
[remote setHelpText:[self helpTextForRemoteURLs:[[self repository] URLsForRemote:[remote title]]]];
|
||||
|
||||
[items addObject:project];
|
||||
[items addObject:branches];
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
@class PBViewController, PBGitSidebarController, PBGitCommitController;
|
||||
|
||||
// Controls the main repository window from RepositoryWindow.xib
|
||||
@interface PBGitWindowController : NSWindowController /*<NSWindowDelegate>*/{
|
||||
@interface PBGitWindowController : NSWindowController PROTOCOL_10_6(NSWindowDelegate){
|
||||
__weak PBGitRepository* repository;
|
||||
|
||||
PBViewController *contentController;
|
||||
@@ -57,6 +57,8 @@
|
||||
- (IBAction) cloneTo:(id)sender;
|
||||
- (IBAction) refresh:(id)sender;
|
||||
|
||||
- (void)selectCommitForSha:(NSString *)sha;
|
||||
- (NSArray *)menuItemsForPaths:(NSArray *)paths;
|
||||
- (void)setHistorySearch:(NSString *)searchString mode:(NSInteger)mode;
|
||||
|
||||
@end
|
||||
|
||||
@@ -234,6 +234,18 @@
|
||||
[super observeValueForKeyPath:keyPath ofObject:object change:change context:context];
|
||||
}
|
||||
|
||||
- (void) selectCommitForSha:(NSString *)sha
|
||||
{
|
||||
if (contentController != sidebarController.historyViewController)
|
||||
[sidebarController selectCurrentBranch];
|
||||
[sidebarController.historyViewController selectCommit:sha];
|
||||
}
|
||||
|
||||
- (NSArray *) menuItemsForPaths:(NSArray *)paths
|
||||
{
|
||||
return [sidebarController.historyViewController menuItemsForPaths:paths];
|
||||
}
|
||||
|
||||
- (void)setHistorySearch:(NSString *)searchString mode:(NSInteger)mode
|
||||
{
|
||||
[sidebarController setHistorySearch:searchString mode:mode];
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@
|
||||
|
||||
+ (BOOL) canInitWithRequest:(NSURLRequest *)request
|
||||
{
|
||||
return [[[request URL] scheme] isEqualToString:@"GitX"];
|
||||
return [[[[request URL] scheme] lowercaseString] isEqualToString:@"gitx"];
|
||||
}
|
||||
|
||||
+ (NSURLRequest *)canonicalRequestForRequest:(NSURLRequest *)request
|
||||
|
||||
@@ -442,7 +442,7 @@
|
||||
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]) {
|
||||
[indexes addIndex:index];
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#import "PBCreateTagSheet.h"
|
||||
#import "PBGitDefaults.h"
|
||||
#import "PBDiffWindowController.h"
|
||||
#import "PBGitResetController.h"
|
||||
|
||||
#import "PBArgumentPickerController.h"
|
||||
|
||||
|
||||
+10
-71
@@ -12,6 +12,8 @@
|
||||
|
||||
@interface PBSourceViewCell()
|
||||
- (NSRect)infoButtonRectForBounds:(NSRect)bounds;
|
||||
- (void)mouseEntered:(NSEvent *)event;
|
||||
- (void)mouseExited:(NSEvent *)event;
|
||||
@end
|
||||
|
||||
@implementation PBSourceViewCell
|
||||
@@ -33,7 +35,7 @@
|
||||
NSPoint point = [self.controlView convertPoint:[event locationInWindow] fromView:nil];
|
||||
NSInteger row = [view rowAtPoint:point];
|
||||
|
||||
PBGitSidebarController *controller = [view delegate];
|
||||
PBGitSidebarController *controller = (PBGitSidebarController*)[view delegate];
|
||||
|
||||
return [controller menuForRow:row];
|
||||
}
|
||||
@@ -91,91 +93,28 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//- (NSUInteger)hitTestForEvent:(NSEvent *)event inRect:(NSRect)cellFrame ofView:(NSView *)controlView {
|
||||
// if (showsActionButton) {
|
||||
// NSPoint point = [controlView convertPoint:[event locationInWindow] fromView:nil];
|
||||
// //
|
||||
// // NSRect titleRect = [self titleRectForBounds:cellFrame];
|
||||
// // if (NSMouseInRect(point, titleRect, [controlView isFlipped])) {
|
||||
// // return NSCellHitContentArea | NSCellHitEditableTextArea;
|
||||
// // }
|
||||
// //
|
||||
// // NSRect imageRect = [self imageRectForBounds:cellFrame];
|
||||
// // if (NSMouseInRect(point, imageRect, [controlView isFlipped])) {
|
||||
// // return NSCellHitContentArea;
|
||||
// // }
|
||||
// //
|
||||
// // // Did we hit the sub title?
|
||||
// // NSAttributedString *attributedSubTitle = [self attributedSubTitle];
|
||||
// // if ([attributedSubTitle length] > 0) {
|
||||
// // NSRect attributedSubTitleRect = [self rectForSubTitleBasedOnTitleRect:titleRect inBounds:cellFrame];
|
||||
// // if (NSMouseInRect(point, attributedSubTitleRect, [controlView isFlipped])) {
|
||||
// // // Notice that this text isn't an editable area. Clicking on it won't begin an editing session.
|
||||
// // return NSCellHitContentArea;
|
||||
// // }
|
||||
// // }
|
||||
//
|
||||
// // How about the info button?
|
||||
// NSRect infoButtonRect = [self infoButtonRectForBounds:cellFrame];
|
||||
// if (NSMouseInRect(point, infoButtonRect, [controlView isFlipped])) {
|
||||
// return NSCellHitContentArea | NSCellHitTrackableArea;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// return [super hitTestForEvent:event inRect:cellFrame ofView:controlView];
|
||||
//}
|
||||
|
||||
//+ (BOOL)prefersTrackingUntilMouseUp {
|
||||
// // NSCell returns NO for this by default. If you want to have trackMouse:inRect:ofView:untilMouseUp: always track until the mouse is up, then you MUST return YES. Otherwise, strange things will happen.
|
||||
// return YES;
|
||||
//}
|
||||
|
||||
// Mouse tracking -- the only part we want to track is the "info" button
|
||||
- (BOOL)trackMouse:(NSEvent *)theEvent inRect:(NSRect)cellFrame ofView:(NSView *)controlView untilMouseUp:(BOOL)flag {
|
||||
// [self setControlView:controlView];
|
||||
//
|
||||
NSRect infoButtonRect = [self infoButtonRectForBounds:cellFrame];
|
||||
if ([theEvent type] != NSLeftMouseUp) {
|
||||
// This is VERY simple event tracking. We simply check to see if the mouse is in the "i" button or not and dispatch entered/exited mouse events
|
||||
NSPoint point = [controlView convertPoint:[theEvent locationInWindow] fromView:nil];
|
||||
BOOL mouseInButton = NSMouseInRect(point, infoButtonRect, [controlView isFlipped]);
|
||||
if (iMouseDownInInfoButton != mouseInButton) {
|
||||
iMouseDownInInfoButton = mouseInButton;
|
||||
[controlView setNeedsDisplayInRect:cellFrame];
|
||||
}
|
||||
if ([theEvent type] == NSMouseEntered || [theEvent type] == NSMouseExited) {
|
||||
[NSApp sendEvent:theEvent];
|
||||
}
|
||||
// Note that we process mouse entered and exited events and dispatch them to properly handle updates
|
||||
theEvent = [[controlView window] nextEventMatchingMask:(NSLeftMouseUpMask | NSLeftMouseDraggedMask | NSMouseEnteredMask | NSMouseExitedMask)];
|
||||
}
|
||||
|
||||
// Another way of implementing the above code would be to keep an NSButtonCell as an ivar, and simply call trackMouse:inRect:ofView:untilMouseUp: on it, if the tracking area was inside of it.
|
||||
|
||||
NSPoint locationOfTouch = [controlView convertPoint:[theEvent locationInWindow] fromView:nil];
|
||||
|
||||
BOOL mouseInButton = NSMouseInRect(locationOfTouch, [self infoButtonRectForBounds:cellFrame], [controlView isFlipped]);
|
||||
if (mouseInButton) {
|
||||
[self mouseEntered:theEvent];
|
||||
// show menu
|
||||
NSMenu *menu = [self menuForEvent:theEvent inRect:cellFrame ofView:controlView];
|
||||
if (menu){
|
||||
[NSMenu popUpContextMenu:menu withEvent:theEvent forView:controlView];
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
|
||||
if (iMouseDownInInfoButton) {
|
||||
// Send the action, and redisplay
|
||||
iMouseDownInInfoButton = NO;
|
||||
[controlView setNeedsDisplayInRect:cellFrame];
|
||||
}
|
||||
if (iMouseDownInInfoButton) {
|
||||
// Send the action, and redisplay
|
||||
iMouseDownInInfoButton = NO;
|
||||
[controlView setNeedsDisplayInRect:cellFrame];
|
||||
}
|
||||
|
||||
return [super trackMouse:theEvent inRect:cellFrame ofView:controlView untilMouseUp:flag];
|
||||
|
||||
|
||||
//
|
||||
// // We return YES since the mouse was released while we were tracking. Not returning YES when you processed the mouse up is an easy way to introduce bugs!
|
||||
// return YES;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
+ (id)itemWithTitle:(NSString *)title;
|
||||
|
||||
- (NSString *)badge;
|
||||
- (NSString *)helpText;
|
||||
|
||||
- (void)addChild:(PBSourceViewItem *)child;
|
||||
- (void)removeChild:(PBSourceViewItem *)child;
|
||||
|
||||
@@ -128,6 +128,11 @@
|
||||
return [[revSpecifier description] lastPathComponent];
|
||||
}
|
||||
|
||||
- (NSString *) helpText
|
||||
{
|
||||
return [revSpecifier helpText];
|
||||
}
|
||||
|
||||
- (NSString *) stringValue
|
||||
{
|
||||
return self.title;
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// PBStashContentController.h
|
||||
// GitX
|
||||
//
|
||||
// Created by David Catmull on 20-06-11.
|
||||
// Copyright 2011. All rights reserved.
|
||||
//
|
||||
|
||||
#import "PBViewController.h"
|
||||
#import "PBWebHistoryController.h"
|
||||
|
||||
@class PBGitStash;
|
||||
@class PBWebStashController;
|
||||
|
||||
// Controls the view displaying a stash diff
|
||||
@interface PBStashContentController : PBViewController {
|
||||
IBOutlet id webView;
|
||||
IBOutlet PBWebStashController *unstagedController;
|
||||
IBOutlet PBWebStashController *stagedController;
|
||||
}
|
||||
|
||||
- (void) showStash:(PBGitStash*)stash;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,46 @@
|
||||
//
|
||||
// PBStashContentController.h
|
||||
// GitX
|
||||
//
|
||||
// Created by David Catmull on 20-06-11.
|
||||
// Copyright 2011. All rights reserved.
|
||||
//
|
||||
|
||||
#import "PBStashContentController.h"
|
||||
#import "PBGitCommit.h"
|
||||
#import "PBGitDefaults.h"
|
||||
#import "PBGitStash.h"
|
||||
|
||||
const CGFloat kMinPaneSize = 32.0;
|
||||
|
||||
@implementation PBStashContentController
|
||||
|
||||
- (void) awakeFromNib
|
||||
{
|
||||
[unstagedController setRepository:repository];
|
||||
[stagedController setRepository:repository];
|
||||
}
|
||||
|
||||
- (void) showStash:(PBGitStash*)stash
|
||||
{
|
||||
NSString *stashRef = [NSString stringWithFormat:@"refs/%@", [stash name]];
|
||||
NSString *stashSHA = [repository shaForRef:[PBGitRef refFromString:stashRef]];
|
||||
PBGitCommit *commit = [repository commitForSHA:stashSHA];
|
||||
NSString *indexSHA = [commit.parents objectAtIndex:1];
|
||||
PBGitCommit *indexCommit = [repository commitForSHA:indexSHA];
|
||||
|
||||
[unstagedController changeContentTo:commit];
|
||||
[stagedController changeContentTo:indexCommit];
|
||||
}
|
||||
|
||||
- (CGFloat)splitView:(NSSplitView *)splitView constrainMinCoordinate:(CGFloat)proposedMin ofSubviewAt:(NSInteger)dividerIndex
|
||||
{
|
||||
return kMinPaneSize;
|
||||
}
|
||||
|
||||
- (CGFloat)splitView:(NSSplitView *)splitView constrainMaxCoordinate:(CGFloat)proposedMax ofSubviewAt:(NSInteger)dividerIndex
|
||||
{
|
||||
return [splitView frame].size.height - kMinPaneSize;
|
||||
}
|
||||
|
||||
@end
|
||||
File diff suppressed because it is too large
Load Diff
@@ -20,6 +20,7 @@
|
||||
}
|
||||
|
||||
@property (readonly) __weak PBGitRepository *repository;
|
||||
@property (readonly) __weak PBGitWindowController *superController;
|
||||
@property(copy) NSString *status;
|
||||
@property(assign) BOOL isBusy;
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
@implementation PBViewController
|
||||
|
||||
@synthesize repository;
|
||||
@synthesize superController;
|
||||
@synthesize status;
|
||||
@synthesize isBusy;
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
//
|
||||
// PBWebCommitController.h
|
||||
//
|
||||
// Created by David Catmull on 10-06-11.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "PBWebController.h"
|
||||
|
||||
#import "PBRefContextDelegate.h"
|
||||
|
||||
|
||||
@class NSString;
|
||||
@class PBGitCommit;
|
||||
|
||||
// Displays the diff from a commit in the repository.
|
||||
@interface PBWebCommitController : PBWebController {
|
||||
IBOutlet id<PBRefContextDelegate> contextMenuDelegate;
|
||||
|
||||
NSString* currentSha;
|
||||
NSString* diff;
|
||||
}
|
||||
|
||||
- (void) changeContentTo: (PBGitCommit *) content;
|
||||
- (void) sendKey: (NSString*) key;
|
||||
- (void) openFileMerge:(NSString*)file sha:(NSString *)sha sha2:(NSString *)sha2;
|
||||
|
||||
- (void) didLoad;
|
||||
// Called when a commit or parent link is clicked.
|
||||
- (void)selectCommit:(NSString *)sha;
|
||||
// HTML listing refs (branch name, etc) for the displayed commit.
|
||||
- (NSString*) refsForCurrentCommit;
|
||||
// Look up a PBGitRef based on its SHA.
|
||||
- (PBGitRef*) refFromString:(NSString*)refString;
|
||||
// Choose which parents should be used for the diff
|
||||
- (NSArray*) chooseDiffParents:(NSArray*)parents;
|
||||
// Context menu items to be displayed for a file.
|
||||
- (NSArray*) menuItemsForPath:(NSString*)path;
|
||||
|
||||
@property (readonly) NSString* diff;
|
||||
@end
|
||||
@@ -0,0 +1,361 @@
|
||||
//
|
||||
// PBWebCommitController.m
|
||||
//
|
||||
// Created by David Catmull on 10-06-11.
|
||||
//
|
||||
|
||||
#import "PBWebCommitController.h"
|
||||
#import "PBGitCommit.h"
|
||||
#import "PBGitDefaults.h"
|
||||
#import "GLFileView.h"
|
||||
#import <CommonCrypto/CommonDigest.h>
|
||||
|
||||
@interface PBWebCommitController (Private)
|
||||
|
||||
- (NSArray *)parseHeader:(NSString *)text;
|
||||
- (NSString *)htmlForHeader:(NSArray *)header withRefs:(NSString *)badges;
|
||||
- (NSMutableDictionary *)parseStats:(NSString *)txt;
|
||||
- (NSString *) arbitraryHashForString:(NSString*)concat;
|
||||
|
||||
@end
|
||||
|
||||
// -parseHeader: returns an array of dictionaries with these keys
|
||||
const NSString *kHeaderKeyName = @"name";
|
||||
const NSString *kHeaderKeyContent = @"content";
|
||||
|
||||
// Keys for the author/committer dictionary
|
||||
const NSString *kAuthorKeyName = @"name";
|
||||
const NSString *kAuthorKeyEmail = @"email";
|
||||
const NSString *kAuthorKeyDate = @"date";
|
||||
|
||||
@implementation PBWebCommitController
|
||||
|
||||
@synthesize diff;
|
||||
|
||||
- (void) awakeFromNib
|
||||
{
|
||||
startFile = @"history";
|
||||
[super awakeFromNib];
|
||||
}
|
||||
|
||||
- (void)closeView
|
||||
{
|
||||
[[self script] setValue:nil forKey:@"commit"];
|
||||
|
||||
[super closeView];
|
||||
}
|
||||
|
||||
- (void) didLoad
|
||||
{
|
||||
currentSha = nil;
|
||||
}
|
||||
|
||||
- (void) changeContentTo: (PBGitCommit *) content
|
||||
{
|
||||
if (content == nil || !finishedLoading)
|
||||
return;
|
||||
|
||||
currentSha = [content sha];
|
||||
|
||||
// Now we load the extended details. We used to do this in a separate thread,
|
||||
// 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", @"--numstat", @"--summary", @"--pretty=raw", currentSha, nil];
|
||||
if (![PBGitDefaults showWhitespaceDifferences])
|
||||
[taskArguments insertObject:@"-w" atIndex:1];
|
||||
|
||||
NSFileHandle *handle = [repository handleForArguments:taskArguments];
|
||||
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
|
||||
// Remove notification, in case we have another one running
|
||||
[nc removeObserver:self name:NSFileHandleReadToEndOfFileCompletionNotification object:nil];
|
||||
[nc addObserver:self selector:@selector(commitDetailsLoaded:) name:NSFileHandleReadToEndOfFileCompletionNotification object:handle];
|
||||
[handle readToEndOfFileInBackgroundAndNotify];
|
||||
}
|
||||
|
||||
- (void)commitDetailsLoaded:(NSNotification *)notification
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self name:NSFileHandleReadToEndOfFileCompletionNotification object:nil];
|
||||
|
||||
NSData *data = [[notification userInfo] valueForKey:NSFileHandleNotificationDataItem];
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
NSString *details = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
|
||||
if (!details)
|
||||
details = [[NSString alloc] initWithData:data encoding:NSISOLatin1StringEncoding];
|
||||
|
||||
if (!details)
|
||||
return;
|
||||
|
||||
// Header
|
||||
NSArray *headerItems = [self parseHeader:details];
|
||||
NSString *header = [self htmlForHeader:headerItems withRefs:[self refsForCurrentCommit]];
|
||||
|
||||
// In case the commit is a merge, we need to explicity give diff-tree the
|
||||
// list of parents, or else it will yield an empty result.
|
||||
// If it's not a merge, this won't hurt.
|
||||
NSMutableArray *allParents = [NSMutableArray array];
|
||||
|
||||
for (NSDictionary *item in headerItems)
|
||||
if ([[item objectForKey:kHeaderKeyName] isEqualToString:@"parent"])
|
||||
[allParents addObject:[item objectForKey:kHeaderKeyContent]];
|
||||
|
||||
NSArray *parents = [self chooseDiffParents:allParents];
|
||||
|
||||
// File Stats
|
||||
NSMutableDictionary *stats = [self parseStats:details];
|
||||
|
||||
// File list
|
||||
NSMutableArray *args = [NSMutableArray arrayWithObjects:@"diff-tree", @"--root", @"-r", @"-C90%", @"-M90%", nil];
|
||||
[args addObjectsFromArray:parents];
|
||||
[args addObject:currentSha];
|
||||
NSString *dt = [repository outputInWorkdirForArguments:args];
|
||||
NSString *fileList = [GLFileView parseDiffTree:dt withStats:stats];
|
||||
|
||||
// Diffs list
|
||||
args = [NSMutableArray arrayWithObjects:@"diff-tree", @"--root", @"--cc", @"-C90%", @"-M90%", nil];
|
||||
[args addObjectsFromArray:parents];
|
||||
[args addObject:currentSha];
|
||||
NSString *d = [repository outputInWorkdirForArguments:args];
|
||||
NSString *diffs = [GLFileView parseDiff:d];
|
||||
|
||||
NSString *html = [NSString stringWithFormat:@"%@%@<div id='diffs'>%@</div>",header,fileList,diffs];
|
||||
|
||||
html = [html stringByReplacingOccurrencesOfString:@"{SHA_PREV}" withString:[NSString stringWithFormat:@"%@^",currentSha]];
|
||||
html = [html stringByReplacingOccurrencesOfString:@"{SHA}" withString:currentSha];
|
||||
|
||||
[[view windowScriptObject] callWebScriptMethod:@"showCommit" withArguments:[NSArray arrayWithObject:html]];
|
||||
|
||||
#ifdef DEBUG_BUILD
|
||||
NSString *dom = [(DOMHTMLElement*)[[[view mainFrame] DOMDocument] documentElement] outerHTML];
|
||||
NSString *tmpFile = @"~/tmp/test2.html";
|
||||
[dom writeToFile:[tmpFile stringByExpandingTildeInPath] atomically:true encoding:NSUTF8StringEncoding error:nil];
|
||||
#endif
|
||||
}
|
||||
|
||||
- (NSString*) refsForCurrentCommit
|
||||
{
|
||||
return @"";
|
||||
}
|
||||
|
||||
- (NSArray*) chooseDiffParents:(NSArray *)parents
|
||||
{
|
||||
return parents;
|
||||
}
|
||||
|
||||
- (NSMutableDictionary *)parseStats:(NSString *)txt
|
||||
{
|
||||
NSArray *lines = [txt componentsSeparatedByString:@"\n"];
|
||||
NSMutableDictionary *stats=[NSMutableDictionary dictionary];
|
||||
int black=0;
|
||||
for(NSString *line in lines){
|
||||
if([line length]==0){
|
||||
black++;
|
||||
}else if(black==2){
|
||||
NSArray *file=[line componentsSeparatedByString:@"\t"];
|
||||
if([file count]==3){
|
||||
[stats setObject:file forKey:[file objectAtIndex:2]];
|
||||
}
|
||||
}
|
||||
}
|
||||
return stats;
|
||||
}
|
||||
|
||||
- (NSArray *)parseHeader:(NSString *)text
|
||||
{
|
||||
NSMutableArray *result = [NSMutableArray array];
|
||||
NSArray *lines = [text componentsSeparatedByString:@"\n"];
|
||||
BOOL parsingSubject = NO;
|
||||
|
||||
for (NSString *line in lines) {
|
||||
if ([line length] == 0) {
|
||||
if (!parsingSubject)
|
||||
parsingSubject = TRUE;
|
||||
else
|
||||
break;
|
||||
} else {
|
||||
if (parsingSubject) {
|
||||
NSString *trimmedLine = [line stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
|
||||
[result addObject:[NSDictionary dictionaryWithObjectsAndKeys:
|
||||
@"subject", kHeaderKeyName, trimmedLine, kHeaderKeyContent, nil]];
|
||||
} else {
|
||||
NSArray *comps = [line componentsSeparatedByString:@" "];
|
||||
if ([comps count] == 2) {
|
||||
[result addObject:[NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[comps objectAtIndex:0], kHeaderKeyName,
|
||||
[comps objectAtIndex:1], kHeaderKeyContent, nil]];
|
||||
} else if ([comps count] > 2) {
|
||||
NSRange r_email_i = [line rangeOfString:@"<"];
|
||||
NSRange r_email_e = [line rangeOfString:@">"];
|
||||
NSRange r_name_i = [line rangeOfString:@" "];
|
||||
|
||||
NSString *name = [line substringWithRange:NSMakeRange(r_name_i.location,(r_email_i.location-r_name_i.location))];
|
||||
NSString *email = [line substringWithRange:NSMakeRange(r_email_i.location+1,((r_email_e.location-1)-r_email_i.location))];
|
||||
|
||||
NSArray *t=[[line substringFromIndex:r_email_e.location+2] componentsSeparatedByString:@" "];
|
||||
NSDate *date=[NSDate dateWithTimeIntervalSince1970:[[t objectAtIndex:0] doubleValue]];
|
||||
|
||||
NSDictionary *content = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
name, kAuthorKeyName,
|
||||
email, kAuthorKeyEmail,
|
||||
date, kAuthorKeyDate,
|
||||
nil];
|
||||
[result addObject:[NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[comps objectAtIndex:0], kHeaderKeyName,
|
||||
content, kHeaderKeyContent,
|
||||
nil]];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
- (NSString *)htmlForHeader:(NSArray *)header withRefs:(NSString *)badges
|
||||
{
|
||||
NSString *last_mail = @"";
|
||||
NSMutableString *auths=[NSMutableString string];
|
||||
NSMutableString *refs=[NSMutableString string];
|
||||
NSMutableString *subject=[NSMutableString string];
|
||||
|
||||
for (NSDictionary *item in header) {
|
||||
if ([[item objectForKey:kHeaderKeyName] isEqualToString:@"subject"]) {
|
||||
[subject appendString:[NSString stringWithFormat:@"%@<br/>",[GLFileView escapeHTML:[item objectForKey:kHeaderKeyContent]]]];
|
||||
}else{
|
||||
if([[item objectForKey:kHeaderKeyContent] isKindOfClass:[NSString class]]){
|
||||
[refs appendString:[NSString stringWithFormat:@"<tr><td>%@</td><td><a href='' onclick='selectCommit(this.innerHTML); return false;'>%@</a></td></tr>",[item objectForKey:kHeaderKeyName],[item objectForKey:kHeaderKeyContent]]];
|
||||
}else{ // NSDictionary: author or committer
|
||||
NSDictionary *content = [item objectForKey:kHeaderKeyContent];
|
||||
NSString *email = [content objectForKey:kAuthorKeyEmail];
|
||||
|
||||
if(![email isEqualToString:last_mail]){
|
||||
NSString *name = [content objectForKey:kAuthorKeyName];
|
||||
NSDate *date = [content objectForKey:kAuthorKeyDate];
|
||||
NSDateFormatter* theDateFormatter = [[NSDateFormatter alloc] init];
|
||||
[theDateFormatter setDateStyle:NSDateFormatterMediumStyle];
|
||||
[theDateFormatter setTimeStyle:NSDateFormatterMediumStyle];
|
||||
NSString *dateString=[theDateFormatter stringForObjectValue:date];
|
||||
|
||||
[auths appendString:[NSString stringWithFormat:@"<div class='user %@ clearfix'>",[item objectForKey:kHeaderKeyName]]];
|
||||
if([self isFeatureEnabled:@"gravatar"]){
|
||||
NSString *hash=[self arbitraryHashForString:email];
|
||||
[auths appendString:[NSString stringWithFormat:@"<img class='avatar' src='http://www.gravatar.com/avatar/%@?d=wavatar&s=30'/>",hash]];
|
||||
}
|
||||
[auths appendString:[NSString stringWithFormat:@"<p class='name'>%@ <span class='rol'>(%@)</span></p>",name,[item objectForKey:kHeaderKeyName]]];
|
||||
[auths appendString:[NSString stringWithFormat:@"<p class='time'>%@</p></div>",dateString]];
|
||||
}
|
||||
last_mail=email;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return [NSString stringWithFormat:@"<div id='header' class='clearfix'><table class='references'>%@</table><p class='subject'>%@</p>%@<div id='badges'>%@</div></div>",refs,subject,auths,badges];
|
||||
}
|
||||
|
||||
- (NSString *) arbitraryHashForString:(NSString*)concat {
|
||||
const char *concat_str = [concat UTF8String];
|
||||
unsigned char result[CC_MD5_DIGEST_LENGTH];
|
||||
CC_MD5(concat_str, strlen(concat_str), result);
|
||||
|
||||
NSMutableString *hash = [NSMutableString string];
|
||||
|
||||
int i;
|
||||
for (i = 0; i < 16; i++)
|
||||
[hash appendFormat:@"%02x", result[i]];
|
||||
|
||||
return hash;
|
||||
}
|
||||
|
||||
- (void)selectCommit:(NSString *)sha
|
||||
{
|
||||
}
|
||||
|
||||
// TODO: this is duplicated in PBWebDiffController
|
||||
- (void) openFileMerge:(NSString*)file sha:(NSString *)sha sha2:(NSString *)sha2
|
||||
{
|
||||
NSArray *args=[NSArray arrayWithObjects:@"difftool",@"--no-prompt",@"--tool=opendiff",sha,sha2,@"--",file,nil];
|
||||
[repository handleInWorkDirForArguments:args];
|
||||
}
|
||||
|
||||
|
||||
- (void) sendKey: (NSString*) key
|
||||
{
|
||||
id script = [view windowScriptObject];
|
||||
[script callWebScriptMethod:@"handleKeyFromCocoa" withArguments: [NSArray arrayWithObject:key]];
|
||||
}
|
||||
|
||||
- (void) copySource
|
||||
{
|
||||
NSString *source = [(DOMHTMLElement *)[[[view mainFrame] DOMDocument] documentElement] outerHTML];
|
||||
NSPasteboard *a =[NSPasteboard generalPasteboard];
|
||||
[a declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:self];
|
||||
[a setString:source forType: NSStringPboardType];
|
||||
}
|
||||
|
||||
- (PBGitRef*) refFromString:(NSString*)refString
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSArray*) menuItemsForPath:(NSString*)path
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSArray *) webView:(WebView *)sender
|
||||
contextMenuItemsForElement:(NSDictionary *)element
|
||||
defaultMenuItems:(NSArray *)defaultMenuItems
|
||||
{
|
||||
DOMNode *node = [element valueForKey:@"WebElementDOMNode"];
|
||||
|
||||
while (node) {
|
||||
// Every ref has a class name of 'refs' and some other class. We check on that to see if we pressed on a ref.
|
||||
if ([[node className] hasPrefix:@"refs "]) {
|
||||
NSString *selectedRefString = [[[node childNodes] item:0] textContent];
|
||||
PBGitRef *ref = [self refFromString:selectedRefString];
|
||||
if (ref != nil)
|
||||
return [contextMenuDelegate menuItemsForRef:ref];
|
||||
DLog(@"Could not find selected ref!");
|
||||
return defaultMenuItems;
|
||||
}
|
||||
if ([node hasAttributes] && [[node attributes] getNamedItem:@"representedFile"])
|
||||
return [self menuItemsForPath:[[[node attributes] getNamedItem:@"representedFile"] value]];
|
||||
else if ([[node class] isEqual:[DOMHTMLImageElement class]]) {
|
||||
// Copy Image is the only menu item that makes sense here since we don't need
|
||||
// to download the image or open it in a new window (besides with the
|
||||
// current implementation these two entries can crash GitX anyway)
|
||||
for (NSMenuItem *item in defaultMenuItems)
|
||||
if ([item tag] == WebMenuItemTagCopyImageToClipboard)
|
||||
return [NSArray arrayWithObject:item];
|
||||
return nil;
|
||||
}
|
||||
|
||||
node = [node parentNode];
|
||||
}
|
||||
|
||||
return defaultMenuItems;
|
||||
}
|
||||
|
||||
|
||||
// Open external links in the default browser
|
||||
- (void)webView:(WebView *)sender decidePolicyForNewWindowAction:(NSDictionary *)actionInformation
|
||||
request:(NSURLRequest *)request
|
||||
newFrameName:(NSString *)frameName
|
||||
decisionListener:(id < WebPolicyDecisionListener >)listener
|
||||
{
|
||||
[[NSWorkspace sharedWorkspace] openURL:[request URL]];
|
||||
}
|
||||
|
||||
- getConfig:(NSString *)config
|
||||
{
|
||||
return [repository valueForKeyPath:[@"config." stringByAppendingString:config]];
|
||||
}
|
||||
|
||||
- (void) preferencesChanged
|
||||
{
|
||||
[[self script] callWebScriptMethod:@"enableFeatures" withArguments:nil];
|
||||
}
|
||||
|
||||
@end
|
||||
+4
-2
@@ -9,6 +9,8 @@
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import <WebKit/WebKit.h>
|
||||
|
||||
#import "PBGitRepository.h"
|
||||
|
||||
@interface PBWebController : NSObject {
|
||||
IBOutlet WebView* view;
|
||||
NSString *startFile;
|
||||
@@ -18,11 +20,11 @@
|
||||
NSMapTable *callbacks;
|
||||
|
||||
// For the repository access
|
||||
IBOutlet id repository;
|
||||
IBOutlet PBGitRepository *repository;
|
||||
}
|
||||
|
||||
@property (retain) NSString *startFile;
|
||||
@property (retain) id repository;
|
||||
@property (retain) PBGitRepository *repository;
|
||||
|
||||
- (WebScriptObject *) script;
|
||||
- (void) closeView;
|
||||
|
||||
+8
-5
@@ -23,9 +23,6 @@
|
||||
|
||||
- (void) awakeFromNib
|
||||
{
|
||||
NSString *path = [NSString stringWithFormat:@"html/views/%@", startFile];
|
||||
NSString* file = [[NSBundle mainBundle] pathForResource:@"index" ofType:@"html" inDirectory:path];
|
||||
NSURLRequest * request = [NSURLRequest requestWithURL:[NSURL fileURLWithPath:file]];
|
||||
callbacks = [NSMapTable mapTableWithKeyOptions:(NSPointerFunctionsObjectPointerPersonality|NSPointerFunctionsStrongMemory) valueOptions:(NSPointerFunctionsObjectPointerPersonality|NSPointerFunctionsStrongMemory)];
|
||||
|
||||
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
|
||||
@@ -38,7 +35,12 @@
|
||||
[view setUIDelegate:self];
|
||||
[view setFrameLoadDelegate:self];
|
||||
[view setResourceLoadDelegate:self];
|
||||
[[view mainFrame] loadRequest:request];
|
||||
|
||||
NSURL *resourceURL = [[[NSBundle mainBundle] resourceURL] URLByStandardizingPath];
|
||||
NSURL *baseURL = [[resourceURL URLByAppendingPathComponent:@"html/views" isDirectory:YES] URLByAppendingPathComponent:startFile isDirectory:YES];
|
||||
|
||||
NSURL *fileURL = [baseURL URLByAppendingPathComponent:@"index.html" isDirectory:NO];
|
||||
[[view mainFrame] loadRequest:[NSURLRequest requestWithURL:fileURL]];
|
||||
}
|
||||
|
||||
- (WebScriptObject *) script
|
||||
@@ -91,7 +93,8 @@
|
||||
return request;
|
||||
|
||||
// TODO: Change this to canInitWithRequest
|
||||
if ([[[request URL] scheme] isEqualToString:@"GitX"]) {
|
||||
NSString *scheme = [[[request URL] scheme] lowercaseString];
|
||||
if ([scheme isEqualToString:@"gitx"]) {
|
||||
NSMutableURLRequest *newRequest = [request mutableCopy];
|
||||
[newRequest setRepository:self.repository];
|
||||
return newRequest;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#import "PBWebController.h"
|
||||
#import "PBDiffWindowController.h"
|
||||
|
||||
// Instantiated in PBDiffWindow.xib, used by PBDiffWindowController
|
||||
@interface PBWebDiffController : PBWebController {
|
||||
IBOutlet PBDiffWindowController *diffController;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// PBWebGitController.h
|
||||
// PBWebHistoryController.h
|
||||
// GitTest
|
||||
//
|
||||
// Created by Pieter de Bie on 14-06-08.
|
||||
@@ -7,29 +7,12 @@
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "PBWebController.h"
|
||||
#import "PBWebCommitController.h"
|
||||
|
||||
#import "PBGitCommit.h"
|
||||
#import "PBGitHistoryController.h"
|
||||
#import "PBRefContextDelegate.h"
|
||||
@class PBGitHistoryController;
|
||||
|
||||
|
||||
@class PBGitSHA;
|
||||
|
||||
@interface PBWebHistoryController : PBWebController {
|
||||
@interface PBWebHistoryController : PBWebCommitController {
|
||||
IBOutlet PBGitHistoryController* historyController;
|
||||
IBOutlet id<PBRefContextDelegate> contextMenuDelegate;
|
||||
|
||||
PBGitSHA* currentSha;
|
||||
NSString* diff;
|
||||
}
|
||||
|
||||
- (void) changeContentTo: (PBGitCommit *) content;
|
||||
- (void) sendKey: (NSString*) key;
|
||||
- (NSString *)parseHeader:(NSString *)txt withRefs:(NSString *)badges;
|
||||
- (NSMutableDictionary *)parseStats:(NSString *)txt;
|
||||
- (NSString *) someMethodThatReturnsSomeHashForSomeString:(NSString*)concat;
|
||||
- (void) openFileMerge:(NSString*)file sha:(NSString *)sha sha2:(NSString *)sha2;
|
||||
|
||||
@property (readonly) NSString* diff;
|
||||
@end
|
||||
|
||||
+21
-252
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// PBWebGitController.m
|
||||
// PBWebHistoryController.m
|
||||
// GitTest
|
||||
//
|
||||
// Created by Pieter de Bie on 14-06-08.
|
||||
@@ -8,14 +8,10 @@
|
||||
|
||||
#import "PBWebHistoryController.h"
|
||||
#import "PBGitDefaults.h"
|
||||
#import "PBGitSHA.h"
|
||||
#import "GLFileView.h"
|
||||
#import <CommonCrypto/CommonDigest.h>
|
||||
#import "PBGitHistoryController.h"
|
||||
|
||||
@implementation PBWebHistoryController
|
||||
|
||||
@synthesize diff;
|
||||
|
||||
- (void) awakeFromNib
|
||||
{
|
||||
startFile = @"history";
|
||||
@@ -34,279 +30,52 @@
|
||||
|
||||
- (void) didLoad
|
||||
{
|
||||
currentSha = nil;
|
||||
[super didLoad];
|
||||
[self changeContentTo: historyController.webCommit];
|
||||
}
|
||||
|
||||
- (void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
|
||||
{
|
||||
if ([(NSString *)context isEqualToString: @"ChangedCommit"])
|
||||
if ([(NSString *)context isEqualToString: @"ChangedCommit"])
|
||||
[self changeContentTo: historyController.webCommit];
|
||||
else
|
||||
[super observeValueForKeyPath:keyPath ofObject:object change:change context:context];
|
||||
}
|
||||
|
||||
- (void) changeContentTo: (PBGitCommit *) content
|
||||
- (NSString*) refsForCurrentCommit
|
||||
{
|
||||
if (content == nil || !finishedLoading)
|
||||
return;
|
||||
|
||||
currentSha = [content sha];
|
||||
|
||||
// Now we load the extended details. We used to do this in a separate thread,
|
||||
// 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", @"--numstat", @"--summary", @"--pretty=raw", [currentSha string], nil];
|
||||
if (![PBGitDefaults showWhitespaceDifferences])
|
||||
[taskArguments insertObject:@"-w" atIndex:1];
|
||||
|
||||
NSFileHandle *handle = [repository handleForArguments:taskArguments];
|
||||
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
|
||||
// Remove notification, in case we have another one running
|
||||
[nc removeObserver:self name:NSFileHandleReadToEndOfFileCompletionNotification object:nil];
|
||||
[nc addObserver:self selector:@selector(commitDetailsLoaded:) name:NSFileHandleReadToEndOfFileCompletionNotification object:handle];
|
||||
[handle readToEndOfFileInBackgroundAndNotify];
|
||||
}
|
||||
|
||||
- (void)commitDetailsLoaded:(NSNotification *)notification
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self name:NSFileHandleReadToEndOfFileCompletionNotification object:nil];
|
||||
|
||||
NSData *data = [[notification userInfo] valueForKey:NSFileHandleNotificationDataItem];
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
NSString *details = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
|
||||
if (!details)
|
||||
details = [[NSString alloc] initWithData:data encoding:NSISOLatin1StringEncoding];
|
||||
|
||||
if (!details)
|
||||
return;
|
||||
|
||||
|
||||
NSMutableString *refs=[NSMutableString string];
|
||||
NSArray *refsA=[historyController.webCommit refs];
|
||||
NSString *currentRef=[[[historyController repository] headRef] simpleRef];
|
||||
NSString *style=@"";
|
||||
int r=0;
|
||||
for(r=0;r<[refsA count];r++){
|
||||
PBGitRef *ref=[refsA objectAtIndex:r];
|
||||
NSMutableString *refs = [NSMutableString string];
|
||||
NSArray *refsA = [historyController.webCommit refs];
|
||||
NSString *currentRef = [[[historyController repository] headRef] simpleRef];
|
||||
NSString *style = @"";
|
||||
for(PBGitRef *ref in refsA){
|
||||
if([currentRef isEqualToString:[ref ref]]){
|
||||
style=[NSString stringWithFormat:@"currentBranch refs %@",[ref type]];
|
||||
style = [NSString stringWithFormat:@"currentBranch refs %@",[ref type]];
|
||||
}else{
|
||||
style=[NSString stringWithFormat:@"refs %@",[ref type]];
|
||||
style = [NSString stringWithFormat:@"refs %@",[ref type]];
|
||||
}
|
||||
[refs appendString:[NSString stringWithFormat:@"<span class='%@'>%@</span>",style,[ref shortName]]];
|
||||
}
|
||||
|
||||
// Header
|
||||
NSString *header=[self parseHeader:details withRefs:refs];
|
||||
|
||||
// File Stats
|
||||
NSMutableDictionary *stats=[self parseStats:details];
|
||||
|
||||
// File list
|
||||
NSString *dt=[repository outputInWorkdirForArguments:[NSArray arrayWithObjects:@"diff-tree", @"-r", @"-C90%", @"-M90%", [currentSha string], nil]];
|
||||
NSString *fileList=[GLFileView parseDiffTree:dt withStats:stats];
|
||||
|
||||
// Diffs list
|
||||
NSString *d=[repository outputInWorkdirForArguments:[NSArray arrayWithObjects:@"diff-tree", @"--cc", @"-C90%", @"-M90%", [currentSha string], nil]];
|
||||
NSString *diffs=[GLFileView parseDiff:d];
|
||||
|
||||
NSString *html=[NSString stringWithFormat:@"%@%@<div id='diffs'>%@</div>",header,fileList,diffs];
|
||||
|
||||
html=[html stringByReplacingOccurrencesOfString:@"{SHA_PREV}" withString:[NSString stringWithFormat:@"%@^",[currentSha string]]];
|
||||
html=[html stringByReplacingOccurrencesOfString:@"{SHA}" withString:[currentSha string]];
|
||||
|
||||
[[view windowScriptObject] callWebScriptMethod:@"showCommit" withArguments:[NSArray arrayWithObject:html]];
|
||||
|
||||
#ifdef DEBUG_BUILD
|
||||
NSString *dom=[[[[view mainFrame] DOMDocument] documentElement] outerHTML];
|
||||
NSString *tmpFile=@"~/tmp/test2.html";
|
||||
[dom writeToFile:[tmpFile stringByExpandingTildeInPath] atomically:true encoding:NSUTF8StringEncoding error:nil];
|
||||
#endif
|
||||
}
|
||||
|
||||
- (NSMutableDictionary *)parseStats:(NSString *)txt
|
||||
{
|
||||
NSArray *lines = [txt componentsSeparatedByString:@"\n"];
|
||||
NSMutableDictionary *stats=[NSMutableDictionary dictionary];
|
||||
int black=0;
|
||||
for(NSString *line in lines){
|
||||
if([line length]==0){
|
||||
black++;
|
||||
}else if(black==2){
|
||||
NSArray *file=[line componentsSeparatedByString:@"\t"];
|
||||
if([file count]==3){
|
||||
[stats setObject:file forKey:[file objectAtIndex:2]];
|
||||
}
|
||||
}
|
||||
}
|
||||
return stats;
|
||||
}
|
||||
|
||||
- (NSString *)parseHeader:(NSString *)txt withRefs:(NSString *)badges
|
||||
{
|
||||
NSArray *lines = [txt componentsSeparatedByString:@"\n"];
|
||||
NSString *line;
|
||||
NSString *last_mail=@"";
|
||||
NSMutableString *auths=[NSMutableString string];
|
||||
NSMutableString *refs=[NSMutableString string];
|
||||
NSMutableString *subject=[NSMutableString string];
|
||||
BOOL subj=FALSE;
|
||||
|
||||
int i;
|
||||
for (i=0; i<[lines count]; i++) {
|
||||
line=[lines objectAtIndex:i];
|
||||
if([line length]==0){
|
||||
if(!subj){
|
||||
subj=TRUE;
|
||||
}else{
|
||||
i=[lines count];
|
||||
}
|
||||
}else{
|
||||
if (subj) {
|
||||
NSString *trimmedLine = [line stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
|
||||
[subject appendString:[NSString stringWithFormat:@"%@<br/>",[GLFileView escapeHTML:trimmedLine]]];
|
||||
}else{
|
||||
NSArray *comps=[line componentsSeparatedByString:@" "];
|
||||
if([comps count]==2){
|
||||
[refs appendString:[NSString stringWithFormat:@"<tr><td>%@</td><td><a href='' onclick='selectCommit(this.innerHTML); return false;'>%@</a></td></tr>",[comps objectAtIndex:0],[comps objectAtIndex:1]]];
|
||||
}else if([comps count]>2){
|
||||
NSRange r_email_i = [line rangeOfString:@"<"];
|
||||
NSRange r_email_e = [line rangeOfString:@">"];
|
||||
NSRange r_name_i = [line rangeOfString:@" "];
|
||||
|
||||
NSString *rol=[line substringToIndex:r_name_i.location];
|
||||
NSString *name=[line substringWithRange:NSMakeRange(r_name_i.location,(r_email_i.location-r_name_i.location))];
|
||||
NSString *email=[line substringWithRange:NSMakeRange(r_email_i.location+1,((r_email_e.location-1)-r_email_i.location))];
|
||||
|
||||
NSArray *t=[[line substringFromIndex:r_email_e.location+2] componentsSeparatedByString:@" "];
|
||||
NSDate *date=[NSDate dateWithTimeIntervalSince1970:[[t objectAtIndex:0] doubleValue]];
|
||||
NSDateFormatter* theDateFormatter = [[NSDateFormatter alloc] init];
|
||||
[theDateFormatter setDateStyle:NSDateFormatterMediumStyle];
|
||||
[theDateFormatter setTimeStyle:NSDateFormatterMediumStyle];
|
||||
NSString *dateString=[theDateFormatter stringForObjectValue:date];
|
||||
|
||||
if(![email isEqualToString:last_mail]){
|
||||
[auths appendString:[NSString stringWithFormat:@"<div class='user %@ clearfix'>",rol]];
|
||||
if([self isFeatureEnabled:@"gravatar"]){
|
||||
NSString *hash=[self someMethodThatReturnsSomeHashForSomeString:email];
|
||||
[auths appendString:[NSString stringWithFormat:@"<img class='avatar' src='http://www.gravatar.com/avatar/%@?d=wavatar&s=30'/>",hash]];
|
||||
}
|
||||
[auths appendString:[NSString stringWithFormat:@"<p class='name'>%@ <span class='rol'>(%@)</span></p>",name,rol]];
|
||||
[auths appendString:[NSString stringWithFormat:@"<p class='time'>%@</p></div>",dateString]];
|
||||
}
|
||||
last_mail=email;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return [NSString stringWithFormat:@"<div id='header' class='clearfix'><table class='references'>%@</table><p class='subject'>%@</p>%@<div id='badges'>%@</div></div>",refs,subject,auths,badges];
|
||||
}
|
||||
|
||||
- (NSString *) someMethodThatReturnsSomeHashForSomeString:(NSString*)concat {
|
||||
const char *concat_str = [concat UTF8String];
|
||||
unsigned char result[CC_MD5_DIGEST_LENGTH];
|
||||
CC_MD5(concat_str, strlen(concat_str), result);
|
||||
|
||||
NSMutableString *hash = [NSMutableString string];
|
||||
|
||||
int i;
|
||||
for (i = 0; i < 16; i++)
|
||||
[hash appendFormat:@"%02x", result[i]];
|
||||
|
||||
return hash;
|
||||
return refs;
|
||||
}
|
||||
|
||||
- (void)selectCommit:(NSString *)sha
|
||||
{
|
||||
[historyController selectCommit:[PBGitSHA shaWithString:sha]];
|
||||
[historyController selectCommit:sha];
|
||||
}
|
||||
|
||||
// TODO: need to be refactoring
|
||||
- (void) openFileMerge:(NSString*)file sha:(NSString *)sha sha2:(NSString *)sha2
|
||||
- (PBGitRef*) refFromString:(NSString*)refString
|
||||
{
|
||||
NSArray *args=[NSArray arrayWithObjects:@"difftool",@"--no-prompt",@"--tool=opendiff",sha,sha2,@"--",file,nil];
|
||||
[historyController.repository handleInWorkDirForArguments:args];
|
||||
for (PBGitRef *ref in historyController.webCommit.refs)
|
||||
if ([[ref shortName] isEqualToString:refString])
|
||||
return ref;
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
||||
- (void) sendKey: (NSString*) key
|
||||
- (NSArray*) menuItemsForPath:(NSString*)path
|
||||
{
|
||||
id script = [view windowScriptObject];
|
||||
[script callWebScriptMethod:@"handleKeyFromCocoa" withArguments: [NSArray arrayWithObject:key]];
|
||||
}
|
||||
|
||||
- (void) copySource
|
||||
{
|
||||
NSString *source = [(DOMHTMLElement *)[[[view mainFrame] DOMDocument] documentElement] outerHTML];
|
||||
NSPasteboard *a =[NSPasteboard generalPasteboard];
|
||||
[a declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:self];
|
||||
[a setString:source forType: NSStringPboardType];
|
||||
}
|
||||
|
||||
- (NSArray *) webView:(WebView *)sender
|
||||
contextMenuItemsForElement:(NSDictionary *)element
|
||||
defaultMenuItems:(NSArray *)defaultMenuItems
|
||||
{
|
||||
DOMNode *node = [element valueForKey:@"WebElementDOMNode"];
|
||||
|
||||
while (node) {
|
||||
// Every ref has a class name of 'refs' and some other class. We check on that to see if we pressed on a ref.
|
||||
if ([[node className] hasPrefix:@"refs "]) {
|
||||
NSString *selectedRefString = [[[node childNodes] item:0] textContent];
|
||||
for (PBGitRef *ref in historyController.webCommit.refs)
|
||||
{
|
||||
if ([[ref shortName] isEqualToString:selectedRefString])
|
||||
return [contextMenuDelegate menuItemsForRef:ref];
|
||||
}
|
||||
DLog(@"Could not find selected ref!");
|
||||
return defaultMenuItems;
|
||||
}
|
||||
if ([node hasAttributes] && [[node attributes] getNamedItem:@"representedFile"])
|
||||
return [historyController menuItemsForPaths:[NSArray arrayWithObject:[[[node attributes] getNamedItem:@"representedFile"] value]]];
|
||||
else if ([[node class] isEqual:[DOMHTMLImageElement class]]) {
|
||||
// Copy Image is the only menu item that makes sense here since we don't need
|
||||
// to download the image or open it in a new window (besides with the
|
||||
// current implementation these two entries can crash GitX anyway)
|
||||
for (NSMenuItem *item in defaultMenuItems)
|
||||
if ([item tag] == WebMenuItemTagCopyImageToClipboard)
|
||||
return [NSArray arrayWithObject:item];
|
||||
return nil;
|
||||
}
|
||||
|
||||
node = [node parentNode];
|
||||
}
|
||||
|
||||
return defaultMenuItems;
|
||||
}
|
||||
|
||||
|
||||
// Open external links in the default browser
|
||||
- (void)webView:(WebView *)sender decidePolicyForNewWindowAction:(NSDictionary *)actionInformation
|
||||
request:(NSURLRequest *)request
|
||||
newFrameName:(NSString *)frameName
|
||||
decisionListener:(id < WebPolicyDecisionListener >)listener
|
||||
{
|
||||
[[NSWorkspace sharedWorkspace] openURL:[request URL]];
|
||||
}
|
||||
|
||||
- getConfig:(NSString *)config
|
||||
{
|
||||
return [historyController valueForKeyPath:[@"repository.config." stringByAppendingString:config]];
|
||||
}
|
||||
|
||||
- (void)finalize
|
||||
{
|
||||
[super finalize];
|
||||
}
|
||||
|
||||
- (void) preferencesChanged
|
||||
{
|
||||
[[self script] callWebScriptMethod:@"enableFeatures" withArguments:nil];
|
||||
return [historyController menuItemsForPaths:[NSArray arrayWithObject:path]];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// PBWebStashController.h
|
||||
//
|
||||
// Created by David Catmull on 12-06-11.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "PBWebCommitController.h"
|
||||
|
||||
@class PBStashContentController;
|
||||
|
||||
@interface PBWebStashController : PBWebCommitController {
|
||||
IBOutlet PBStashContentController *stashController;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// PBWebStashController.m
|
||||
//
|
||||
// Created by David Catmull on 12-06-11.
|
||||
//
|
||||
|
||||
#import "PBWebStashController.h"
|
||||
#import "PBStashContentController.h"
|
||||
|
||||
@implementation PBWebStashController
|
||||
|
||||
- (void)selectCommit:(NSString *)sha
|
||||
{
|
||||
[[stashController superController] selectCommitForSha:sha];
|
||||
}
|
||||
|
||||
- (NSArray*) menuItemsForPath:(NSString*)path
|
||||
{
|
||||
return [[stashController superController] menuItemsForPaths:[NSArray arrayWithObject:path]];
|
||||
}
|
||||
|
||||
- (NSArray*) chooseDiffParents:(NSArray *)parents
|
||||
{
|
||||
return [NSArray arrayWithObject:[parents lastObject]];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,56 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# build_libgit2.sh
|
||||
# GitX
|
||||
#
|
||||
# Created by BrotherBard on 7/3/10.
|
||||
# Copyright 2010 BrotherBard. All rights reserved.
|
||||
#
|
||||
# based on: http://log.yeahrightkeller.com/post/270155578/run-script-while-cleaning-in-xcode
|
||||
|
||||
buildAction () {
|
||||
echo "Building libgit2..."
|
||||
if [[ -d .git ]]
|
||||
then
|
||||
if [ "$(which git)" == "" ]; then
|
||||
echo "git not found"
|
||||
exit -1
|
||||
fi
|
||||
git submodule init
|
||||
git submodule sync
|
||||
git submodule update
|
||||
cd libgit2
|
||||
rm -f libgit2.a
|
||||
make CFLAGS="-arch i386 -arch ppc"
|
||||
ranlib libgit2.a
|
||||
else
|
||||
echo "error: Not a git repository."
|
||||
echo "error: clone GitX first so that the libgit2 submodule can be updated"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
cleanAction () {
|
||||
echo "Cleaning libgit2..."
|
||||
cd libgit2
|
||||
make clean
|
||||
}
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# MAIN
|
||||
|
||||
#echo "Running with ACTION=${ACTION}"
|
||||
|
||||
case $ACTION in
|
||||
# NOTE: it gets set to "" rather than "build" when doing a build.
|
||||
"")
|
||||
buildAction
|
||||
;;
|
||||
|
||||
"clean")
|
||||
cleanAction
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -169,7 +169,7 @@ void handleOpenRepository(NSURL *repositoryURL, NSMutableArray *arguments)
|
||||
// this allows the repository document to modify itself before it shows it's GUI
|
||||
BOOL didOpenURLs = [[NSWorkspace sharedWorkspace] openURLs:[NSArray arrayWithObject:repositoryURL]
|
||||
withAppBundleIdentifier:kGitXBundleIdentifier
|
||||
options:0
|
||||
options:NSWorkspaceLaunchDefault
|
||||
additionalEventParamDescriptor:recordDescriptor
|
||||
launchIdentifiers:NULL];
|
||||
if (!didOpenURLs) {
|
||||
|
||||
+238
-138
@@ -9,166 +9,266 @@
|
||||
|
||||
#include <ApplicationServices/ApplicationServices.h>
|
||||
#import <AppKit/AppKit.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <Security/Security.h>
|
||||
#include <CoreServices/CoreServices.h>
|
||||
#include <Security/SecKeychain.h>
|
||||
#include <Security/SecKeychainItem.h>
|
||||
#include <Security/SecAccess.h>
|
||||
#include <Security/SecTrustedApplication.h>
|
||||
#include <Security/SecACL.h>
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
|
||||
#define OKBUTTONWIDTH 100.0
|
||||
#define OKBUTTONHEIGHT 24.0
|
||||
#define CANCELBUTTONWIDTH 100.0
|
||||
#define CANCELBUTTONHEIGHT 24.0
|
||||
#define PASSHEIGHT 22.0
|
||||
#define PASSLABELHEIGHT 16.0
|
||||
#define WINDOWAUTOSAVENAME @"GitXAskPasswordWindowFrame"
|
||||
#define OKBUTTONWIDTH 100.0
|
||||
#define OKBUTTONHEIGHT 24.0
|
||||
#define CANCELBUTTONWIDTH 100.0
|
||||
#define CANCELBUTTONHEIGHT 24.0
|
||||
#define PASSHEIGHT 22.0
|
||||
#define PASSLABELHEIGHT 16.0
|
||||
#define WINDOWAUTOSAVENAME @"GitXAskPasswordWindowFrame"
|
||||
|
||||
// In 10.6, some NSObject categories (like NSWindowDelegate) were changed to
|
||||
// protocols. Thus to avoid warnings we need to add protocol specifiers, but
|
||||
// only when compiling for 10.6+.
|
||||
#ifndef MAC_OS_X_VERSION_10_6
|
||||
#define MAC_OS_X_VERSION_10_6 1060
|
||||
#endif
|
||||
|
||||
@interface GAPAppDelegate : NSObject
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
|
||||
#define PROTOCOL_10_6(...) <__VA_ARGS__>
|
||||
#else
|
||||
#define PROTOCOL_10_6(...)
|
||||
#endif
|
||||
|
||||
@interface GAPAppDelegate : NSObject PROTOCOL_10_6(NSApplicationDelegate)
|
||||
{
|
||||
NSPanel* mPasswordPanel;
|
||||
NSSecureTextField* mPasswordField;
|
||||
}
|
||||
|
||||
-(NSPanel*) passwordPanel;
|
||||
|
||||
-(IBAction) doOKButton: (id)sender;
|
||||
-(IBAction) doCancelButton: (id)sender;
|
||||
|
||||
@end
|
||||
|
||||
NSString* url;
|
||||
OSStatus StorePasswordKeychain (const char *url, UInt32 urlLength, void* password,UInt32 passwordLength);
|
||||
|
||||
@implementation GAPAppDelegate
|
||||
|
||||
-(NSPanel*) passwordPanel
|
||||
{
|
||||
if( !mPasswordPanel )
|
||||
{
|
||||
NSRect box = NSMakeRect( 100, 100, 400, 134 );
|
||||
mPasswordPanel = [[NSPanel alloc] initWithContentRect: box
|
||||
styleMask: NSTitledWindowMask
|
||||
backing: NSBackingStoreBuffered defer: NO];
|
||||
[mPasswordPanel setHidesOnDeactivate: NO];
|
||||
[mPasswordPanel setLevel: NSFloatingWindowLevel];
|
||||
[mPasswordPanel setTitle: @"GitX SSH Remote Login"];
|
||||
if (![mPasswordPanel setFrameUsingName: WINDOWAUTOSAVENAME]) {
|
||||
[mPasswordPanel center];
|
||||
[mPasswordPanel setFrameAutosaveName: WINDOWAUTOSAVENAME];
|
||||
@implementation GAPAppDelegate
|
||||
|
||||
-(void)yesNo:(NSString *)prompt url:(NSString *)url{
|
||||
NSAlert *alert = [[NSAlert alloc] init];
|
||||
[alert addButtonWithTitle:@"YES"];
|
||||
[alert addButtonWithTitle:@"NO"];
|
||||
[alert setMessageText:[NSString stringWithFormat:@"%@?",url]];
|
||||
[alert setInformativeText:prompt];
|
||||
[alert setAlertStyle:NSWarningAlertStyle];
|
||||
NSInteger result = [alert runModal];
|
||||
|
||||
Boolean yes=NO;
|
||||
if ( result == NSAlertFirstButtonReturn ) {
|
||||
yes=YES;
|
||||
}
|
||||
[alert release];
|
||||
printf("%s",yes?"yes":"no");
|
||||
}
|
||||
|
||||
|
||||
- (void)pasword:(NSString *)prompt url:(NSString *)url{
|
||||
|
||||
NSRect box = NSMakeRect(0, 0, 200, 24);
|
||||
|
||||
NSSecureTextField * passView = [[NSSecureTextField alloc] initWithFrame: box];
|
||||
[passView setSelectable: YES];
|
||||
[passView setEditable: YES];
|
||||
[passView setBordered: YES];
|
||||
[passView setBezeled: YES];
|
||||
[passView setBezelStyle: NSTextFieldSquareBezel];
|
||||
[passView selectText: self];
|
||||
|
||||
|
||||
NSAlert *alert = [[NSAlert alloc] init];
|
||||
[alert addButtonWithTitle:@"Ok"];
|
||||
[alert addButtonWithTitle:@"cancel"];
|
||||
[alert setMessageText:[NSString stringWithFormat:@"%@?",url]];
|
||||
[alert setInformativeText:prompt];
|
||||
[alert setAlertStyle:NSWarningAlertStyle];
|
||||
[alert setAccessoryView:passView];
|
||||
[alert setShowsSuppressionButton:YES];
|
||||
[[alert suppressionButton] setTitle:@"Save on keychain"];
|
||||
NSInteger result = [alert runModal];
|
||||
if ( result == NSAlertFirstButtonReturn ) {
|
||||
NSString *pas=[passView stringValue];
|
||||
printf( "%s", [pas UTF8String] );
|
||||
if ([[alert suppressionButton] state] == NSOnState) {
|
||||
StorePasswordKeychain ([url cStringUsingEncoding:NSASCIIStringEncoding],
|
||||
[url lengthOfBytesUsingEncoding:NSASCIIStringEncoding],
|
||||
(void *)[pas cStringUsingEncoding:NSASCIIStringEncoding],
|
||||
[pas lengthOfBytesUsingEncoding:NSASCIIStringEncoding]);
|
||||
}
|
||||
|
||||
box.origin = NSZeroPoint; // Only need local coords from now on.
|
||||
|
||||
// OK:
|
||||
NSRect okBox = box;
|
||||
okBox.origin.x = NSMaxX( box ) -OKBUTTONWIDTH -20;
|
||||
okBox.size.width = OKBUTTONWIDTH;
|
||||
okBox.origin.y += 20;
|
||||
okBox.size.height = OKBUTTONHEIGHT;
|
||||
NSButton *okButton = [[NSButton alloc] initWithFrame: okBox];
|
||||
[okButton setTarget: self];
|
||||
[okButton setAction: @selector(doOKButton:)];
|
||||
[okButton setTitle: @"OK"]; // +++ Localize.
|
||||
[okButton setKeyEquivalent: @"\r"];
|
||||
[okButton setBordered: YES];
|
||||
[okButton setBezelStyle: NSRoundedBezelStyle];
|
||||
[[mPasswordPanel contentView] addSubview: okButton];
|
||||
|
||||
// Cancel:
|
||||
NSRect cancelBox = box;
|
||||
cancelBox.origin.x = NSMinX( okBox ) -CANCELBUTTONWIDTH -6;
|
||||
cancelBox.size.width = CANCELBUTTONWIDTH;
|
||||
cancelBox.origin.y += 20;
|
||||
cancelBox.size.height = CANCELBUTTONHEIGHT;
|
||||
NSButton *cancleButton = [[NSButton alloc] initWithFrame: cancelBox];
|
||||
[cancleButton setTarget: self];
|
||||
[cancleButton setAction: @selector(doCancelButton:)];
|
||||
[cancleButton setTitle: @"Cancel"]; // +++ Localize.
|
||||
[cancleButton setBordered: YES];
|
||||
[cancleButton setBezelStyle: NSRoundedBezelStyle];
|
||||
[[mPasswordPanel contentView] addSubview: cancleButton];
|
||||
|
||||
// Password field:
|
||||
NSRect passBox = box;
|
||||
passBox.origin.y = NSMaxY(okBox) + 24;
|
||||
passBox.size.height = PASSHEIGHT;
|
||||
passBox.origin.x += 104;
|
||||
passBox.size.width -= 104 + 20;
|
||||
mPasswordField = [[NSSecureTextField alloc] initWithFrame: passBox];
|
||||
[mPasswordField setSelectable: YES];
|
||||
[mPasswordField setEditable: YES];
|
||||
[mPasswordField setBordered: YES];
|
||||
[mPasswordField setBezeled: YES];
|
||||
[mPasswordField setBezelStyle: NSTextFieldSquareBezel];
|
||||
[mPasswordField selectText: self];
|
||||
[[mPasswordPanel contentView] addSubview: mPasswordField];
|
||||
|
||||
// Password label:
|
||||
NSRect passLabelBox = box;
|
||||
passLabelBox.origin.y = NSMaxY(passBox) + 8;
|
||||
passLabelBox.size.height = PASSLABELHEIGHT;
|
||||
passLabelBox.origin.x += 100;
|
||||
passLabelBox.size.width -= 100 + 20;
|
||||
NSTextField *passwordLabel = [[NSTextField alloc] initWithFrame: passLabelBox];
|
||||
[passwordLabel setSelectable: YES];
|
||||
[passwordLabel setEditable: NO];
|
||||
[passwordLabel setBordered: NO];
|
||||
[passwordLabel setBezeled: NO];
|
||||
[passwordLabel setDrawsBackground: NO];
|
||||
[passwordLabel setStringValue: @"Please enter your password:"]; // +++ Localize.
|
||||
[[mPasswordPanel contentView] addSubview: passwordLabel];
|
||||
|
||||
// GitX icon:
|
||||
NSRect gitxIconBox = box;
|
||||
gitxIconBox.origin.y = NSMaxY(box) - 78;
|
||||
gitxIconBox.size.height = 64;
|
||||
gitxIconBox.origin.x += 20;
|
||||
gitxIconBox.size.width = 64;
|
||||
NSImageView *gitxIconView = [[NSImageView alloc] initWithFrame: gitxIconBox];
|
||||
[gitxIconView setEditable: NO];
|
||||
NSString *gitxIconPath = [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent: @"gitx.icns"];
|
||||
NSImage *gitxIcon = [[NSImage alloc] initWithContentsOfFile: gitxIconPath];
|
||||
[gitxIconView setImage: gitxIcon];
|
||||
[[mPasswordPanel contentView] addSubview: gitxIconView];
|
||||
}
|
||||
|
||||
return mPasswordPanel;
|
||||
}
|
||||
|
||||
|
||||
-(IBAction) doOKButton: (id)sender
|
||||
{
|
||||
printf( "%s\n", [[mPasswordField stringValue] UTF8String] );
|
||||
[[NSApplication sharedApplication] stopModalWithCode: 0];
|
||||
}
|
||||
|
||||
|
||||
// TODO: Need to find out how to get SSH to cancel.
|
||||
// When the user cancels the window it is opened again for however
|
||||
// many times the remote server allows failed attempts.
|
||||
-(IBAction) doCancelButton: (id)sender
|
||||
{
|
||||
[[NSApplication sharedApplication] stopModalWithCode: 1];
|
||||
[alert release];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
void getproclline(pid_t pid, char *command_name);
|
||||
|
||||
|
||||
int main( int argc, const char** argv )
|
||||
void getproclline(pid_t pid, char *command_name)
|
||||
{
|
||||
// close stderr to stop cocoa log messages from being picked up by GitX
|
||||
close(STDERR_FILENO);
|
||||
int mib[3], argmax, nargs, c = 0;
|
||||
size_t size;
|
||||
char *procargs, *sp, *np, *cp;
|
||||
|
||||
mib[0] = CTL_KERN;
|
||||
mib[1] = KERN_ARGMAX;
|
||||
|
||||
size = sizeof(argmax);
|
||||
if (sysctl(mib, 2, &argmax, &size, NULL, 0) == -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Allocate space for the arguments. */
|
||||
procargs = (char *)malloc(argmax);
|
||||
if (procargs == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
mib[0] = CTL_KERN;
|
||||
mib[1] = KERN_PROCARGS2;
|
||||
mib[2] = pid;
|
||||
|
||||
size = (size_t)argmax;
|
||||
if (sysctl(mib, 3, procargs, &size, NULL, 0) == -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
memcpy(&nargs, procargs, sizeof(nargs));
|
||||
cp = procargs + sizeof(nargs);
|
||||
|
||||
/* Skip the saved exec_path. */
|
||||
for (; cp < &procargs[size]; cp++) {
|
||||
if (*cp == '\0') {
|
||||
/* End of exec_path reached. */
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (cp == &procargs[size]) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Skip trailing '\0' characters. */
|
||||
for (; cp < &procargs[size]; cp++) {
|
||||
if (*cp != '\0') {
|
||||
/* Beginning of first argument reached. */
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (cp == &procargs[size]) {
|
||||
return;
|
||||
}
|
||||
/* Save where the argv[0] string starts. */
|
||||
sp = cp;
|
||||
|
||||
for (np = NULL; c < nargs && cp < &procargs[size]; cp++) {
|
||||
if (*cp == '\0') {
|
||||
c++;
|
||||
if (np != NULL) {
|
||||
*np = ' ';
|
||||
}
|
||||
np = cp;
|
||||
}
|
||||
}
|
||||
sprintf(command_name, "%s",sp);
|
||||
}
|
||||
|
||||
OSStatus StorePasswordKeychain (const char *url, UInt32 urlLength, void* password,UInt32 passwordLength)
|
||||
{
|
||||
OSStatus status;
|
||||
status = SecKeychainAddGenericPassword (
|
||||
NULL, // default keychain
|
||||
4, // length of service name
|
||||
"GitX", // service name
|
||||
urlLength, // length of account name
|
||||
url, // account name
|
||||
passwordLength, // length of password
|
||||
password, // pointer to password data
|
||||
NULL // the item reference
|
||||
);
|
||||
return (status);
|
||||
}
|
||||
|
||||
OSStatus GetPasswordKeychain (const char *url, UInt32 urlLength ,void *passwordData,UInt32 *passwordLength,
|
||||
SecKeychainItemRef *itemRef)
|
||||
{
|
||||
OSStatus status ;
|
||||
status = SecKeychainFindGenericPassword (
|
||||
NULL, // default keychain
|
||||
4, // length of service name
|
||||
"GitX", // service name
|
||||
urlLength, // length of account name
|
||||
url, // account name
|
||||
passwordLength, // length of password
|
||||
passwordData, // pointer to password data
|
||||
itemRef // the item reference
|
||||
);
|
||||
return (status);
|
||||
}
|
||||
|
||||
|
||||
int main( int argc, const char* argv[] )
|
||||
{
|
||||
// close stderr to stop cocoa log messages from being picked up by GitX
|
||||
close(STDERR_FILENO);
|
||||
|
||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||
ProcessSerialNumber myPSN = { 0, kCurrentProcess };
|
||||
TransformProcessType( &myPSN, kProcessTransformToForegroundApplication );
|
||||
|
||||
NSApplication *app = [NSApplication sharedApplication];
|
||||
GAPAppDelegate *appDel = [[GAPAppDelegate alloc] init];
|
||||
[app setDelegate:appDel];
|
||||
|
||||
ProcessSerialNumber myPSN = { 0, kCurrentProcess };
|
||||
TransformProcessType( &myPSN, kProcessTransformToForegroundApplication );
|
||||
|
||||
char c_args[4024];
|
||||
getproclline(getppid(),c_args);
|
||||
NSString *cmd=[NSString stringWithFormat:@"%@",[NSString stringWithUTF8String:c_args]];
|
||||
|
||||
NSApplication *app = [NSApplication sharedApplication];
|
||||
GAPAppDelegate *appDel = [[GAPAppDelegate alloc] init];
|
||||
[app setDelegate: appDel];
|
||||
NSWindow *passPanel = [appDel passwordPanel];
|
||||
NSLog(@"cmd: '%@'",cmd);
|
||||
|
||||
[app activateIgnoringOtherApps: YES];
|
||||
[passPanel makeKeyAndOrderFront: nil];
|
||||
NSInteger code = [app runModalForWindow: passPanel];
|
||||
NSString *prompt;
|
||||
NSString *url;
|
||||
BOOL yesno=NO;
|
||||
NSArray *args=[cmd componentsSeparatedByString:@" "];
|
||||
|
||||
[defaults synchronize];
|
||||
if(argc<1){
|
||||
prompt=@"Enter your OpenSSH passphrase:";
|
||||
url=@"private key";
|
||||
}else{
|
||||
prompt=[NSString stringWithFormat:@"%@",[NSString stringWithCString:argv[1] encoding:NSASCIIStringEncoding]];
|
||||
if([[prompt lowercaseString] rangeOfString:@"yes/no"].location==NSNotFound){
|
||||
url=[args objectAtIndex:[args count]-1];
|
||||
}else{
|
||||
yesno=YES;
|
||||
url=[args objectAtIndex:1];
|
||||
}
|
||||
}
|
||||
|
||||
return code;
|
||||
}
|
||||
void *passwordData = nil;
|
||||
SecKeychainItemRef itemRef = nil;
|
||||
UInt32 passwordLength = 0;
|
||||
|
||||
OSStatus status = GetPasswordKeychain ([url cStringUsingEncoding:NSASCIIStringEncoding],[url lengthOfBytesUsingEncoding:NSASCIIStringEncoding],&passwordData,&passwordLength,&itemRef);
|
||||
if (status == noErr) {
|
||||
SecKeychainItemFreeContent (NULL,passwordData);
|
||||
NSString *pas=[[NSString stringWithCString:passwordData encoding:NSASCIIStringEncoding] substringToIndex:passwordLength];
|
||||
printf( "%s", [pas UTF8String] );
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(yesno){
|
||||
[appDel yesNo:prompt url:url];
|
||||
}else{
|
||||
[appDel pasword:prompt url:url];
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ function HighlightAllOccurencesOfStringForElement(element,keyword) {
|
||||
} else if (element.nodeType == 1) { // Element node
|
||||
if (element.style.display != "none" && element.nodeName.toLowerCase() != 'select') {
|
||||
for (var i=0; i<element.childNodes.length; i++) {
|
||||
if((element.childNodes[i].nodeType==1)
|
||||
if (element.childNodes[i].nodeType==1)
|
||||
alert("-->"+element.childNodes[i].getAttribute('class'));
|
||||
HighlightAllOccurencesOfStringForElement(element.childNodes[i],keyword);
|
||||
}
|
||||
|
||||
+35
-35
@@ -1,41 +1,41 @@
|
||||
<html>
|
||||
<head>
|
||||
<script src="../../lib/GitX.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="blame.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shCore.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shAutoloader.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushAS3.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushAppleScript.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushBash.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushCSharp.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushColdFusion.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushCpp.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushCss.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushDelphi.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushDiff.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushErlang.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushGroovy.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushJScript.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushJava.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushJavaFX.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushObjC.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushPerl.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushPhp.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushPlain.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushPowerShell.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushPython.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushRuby.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushSass.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushScala.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushSql.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushVb.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushXml.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shLegacy.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/GitX.js"></script>
|
||||
<script src="blame.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shCore.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shAutoloader.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushAS3.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushAppleScript.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushBash.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushCSharp.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushColdFusion.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushCpp.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushCss.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushDelphi.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushDiff.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushErlang.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushGroovy.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushJScript.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushJava.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushJavaFX.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushObjC.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushPerl.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushPhp.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushPlain.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushPowerShell.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushPython.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushRuby.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushSass.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushScala.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushSql.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushVb.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushXml.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shLegacy.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="blame.css" type="text/css" media="screen" title="no title" charset="utf-8"/>
|
||||
<link rel="stylesheet" href="../../css/GitX.css" type="text/css" media="screen" title="no title" charset="utf-8"/>
|
||||
<link rel="stylesheet" href="../../css/shCoreGitX.css" type="text/css" media="screen" title="no title" charset="utf-8"/>
|
||||
<link rel="stylesheet" href="../../css/shThemeGitX.css" type="text/css" media="screen" title="no title" charset="utf-8"/>
|
||||
<link rel="stylesheet" href="blame.css">
|
||||
<link rel="stylesheet" href="../../css/GitX.css">
|
||||
<link rel="stylesheet" href="../../css/shCoreGitX.css">
|
||||
<link rel="stylesheet" href="../../css/shThemeGitX.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="message"></div>
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Diff for file</title>
|
||||
<link rel="stylesheet" href="../../css/GitX.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
<script src="../../lib/GitX.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../../lib/md5.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../../lib/diffHighlighter.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../../lib/keyboardNavigation.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="../../css/GitX.css">
|
||||
<link rel="stylesheet" href="commit.css">
|
||||
|
||||
<script src="../../lib/GitX.js"></script>
|
||||
<script src="../../lib/md5.js"></script>
|
||||
<script src="../../lib/diffHighlighter.js"></script>
|
||||
<script src="../../lib/keyboardNavigation.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="commit.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
<script src="commit.js" type="text/javascript" chahrset="utf-8"></script>
|
||||
<script src="multipleSelection.js" type="text/javascript" chahrset="utf-8"></script>
|
||||
<script src="commit.js"></script>
|
||||
<script src="multipleSelection.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<script src="../../lib/GitX.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/md5.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/diffHighlighter.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/keyboardNavigation.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="diffWindow.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/GitX.js"></script>
|
||||
<script src="../../lib/md5.js"></script>
|
||||
<script src="../../lib/diffHighlighter.js"></script>
|
||||
<script src="../../lib/keyboardNavigation.js"></script>
|
||||
<script src="diffWindow.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="diffWindow.css" type="text/css" media="screen" title="no title" charset="utf-8"/>
|
||||
<link rel="stylesheet" href="../../css/GitX.css" type="text/css" media="screen" title="no title" charset="utf-8"/>
|
||||
<link rel="stylesheet" href="diffWindow.css">
|
||||
<link rel="stylesheet" href="../../css/GitX.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
@@ -1,41 +1,42 @@
|
||||
<html>
|
||||
<head>
|
||||
<script src="../../lib/GitX.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shCore.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shAutoloader.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushAS3.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushAppleScript.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushBash.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushCSharp.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushColdFusion.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushCpp.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushCss.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushDelphi.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushDiff.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushErlang.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushGroovy.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushJScript.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushJava.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushJavaFX.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushObjC.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushPerl.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushPhp.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushPlain.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushPowerShell.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushPython.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushRuby.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushSass.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushScala.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushSql.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushVb.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushXml.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shLegacy.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="fileview.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/SearchWebView.js" type="text/javascript" charset="utf-8"/>
|
||||
<link rel="stylesheet" href="../../css/GitX.css" type="text/css" media="screen" title="no title" charset="utf-8"/>
|
||||
<link rel="stylesheet" href="source.css" type="text/css" media="screen" title="no title" charset="utf-8"/>
|
||||
<link rel="stylesheet" href="../../css/shCoreGitX.css" type="text/css" media="screen" title="no title" charset="utf-8"/>
|
||||
<link rel="stylesheet" href="../../css/shThemeGitX.css" type="text/css" media="screen" title="no title" charset="utf-8"/>
|
||||
<script src="../../lib/GitX.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shCore.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shAutoloader.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushAS3.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushAppleScript.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushBash.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushCSharp.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushColdFusion.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushCpp.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushCss.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushDelphi.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushDiff.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushErlang.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushGroovy.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushJScript.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushJava.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushJavaFX.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushObjC.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushPerl.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushPhp.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushPlain.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushPowerShell.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushPython.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushRuby.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushSass.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushScala.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushSql.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushVb.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shBrushXml.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter/scripts/shLegacy.js"></script>
|
||||
<script src="fileview.js"></script>
|
||||
<script src="../../lib/SearchWebView.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="../../css/GitX.css">
|
||||
<link rel="stylesheet" href="source.css">
|
||||
<link rel="stylesheet" href="../../css/shCoreGitX.css">
|
||||
<link rel="stylesheet" href="../../css/shThemeGitX.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="message"></div>
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Details for commit</title>
|
||||
<script src="../../lib/GitX.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/md5.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/diffHighlighter.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/keyboardNavigation.js" type="text/javascript" charset="utf-8"/>
|
||||
<link rel="stylesheet" href="../../css/GitX.css">
|
||||
<link rel="stylesheet" href="../diff/diffWindow.css">
|
||||
<link rel="stylesheet" href="history.css">
|
||||
|
||||
<script src="../../lib/GitX.js"></script>
|
||||
<script src="../../lib/md5.js"></script>
|
||||
<script src="../../lib/diffHighlighter.js"></script>
|
||||
<script src="../../lib/keyboardNavigation.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="../../css/GitX.css" type="text/css" media="screen" title="no title" charset="utf-8"/>
|
||||
<link rel="stylesheet" href="../diff/diffWindow.css" type="text/css" media="screen" title="no title" charset="utf-8"/>
|
||||
<link rel="stylesheet" href="history.css" type="text/css" media="screen" title="no title" charset="utf-8"/>
|
||||
<script src="history.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="history.js"></script>
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
<div id="commit"></div>
|
||||
</body>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<script src="../../lib/GitX.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/md5.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/diffHighlighter.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/keyboardNavigation.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="log.js" type="text/javascript" charset="utf-8"/>
|
||||
<script src="../../lib/GitX.js"></script>
|
||||
<script src="../../lib/md5.js"></script>
|
||||
<script src="../../lib/diffHighlighter.js"></script>
|
||||
<script src="../../lib/keyboardNavigation.js"></script>
|
||||
<script src="log.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="../../css/GitX.css" type="text/css" media="screen" title="no title" charset="utf-8"/>
|
||||
<link rel="stylesheet" href="log.css" type="text/css" media="screen" title="no title" charset="utf-8"/>
|
||||
<link rel="stylesheet" href="../../css/GitX.css">
|
||||
<link rel="stylesheet" href="log.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<script src="../../lib/GitX.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../../lib/syntaxhighlighter_2.1.364/scripts/shCore.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../../lib/syntaxhighlighter_2.1.364/scripts/shBrushObjC.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="source.js" type="text/javascript" charset="utf-8"></script>
|
||||
<link rel="stylesheet" href="source.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
<link rel="stylesheet" href="../../lib/syntaxhighlighter_2.1.364/styles/shCore.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
<link rel="stylesheet" href="../../lib/syntaxhighlighter_2.1.364/styles/shThemeDefault.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
<script src="../../lib/GitX.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter_2.1.364/scripts/shCore.js"></script>
|
||||
<script src="../../lib/syntaxhighlighter_2.1.364/scripts/shBrushObjC.js"></script>
|
||||
<script src="source.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="source.css">
|
||||
<link rel="stylesheet" href="../../lib/syntaxhighlighter_2.1.364/styles/shCore.css">
|
||||
<link rel="stylesheet" href="../../lib/syntaxhighlighter_2.1.364/styles/shThemeDefault.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="message"></pre>
|
||||
|
||||
-1
Submodule libgit2 deleted from 998a7bf824
Reference in New Issue
Block a user