Files
gitx/html/test.html
T
2009-05-14 17:05:40 +01:00

3062 lines
108 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<html>
<head>
<title>Details for commit</title>
<link rel="stylesheet" href="css/GitX.css" type="text/css" media="screen" title="no title" charset="utf-8">
<link rel="stylesheet" href="css/diff.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/diffHighlighter.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
var newFile = function(name, id) {
var link = document.createElement("a");
link.setAttribute("href", "#" + id);
link.appendChild(document.createTextNode(name));
$("filelist").appendChild(link);
$("filelist").appendChild(document.createElement("br"));
}
newFile.displayName = "newFileCallback";
var doeHet = function() {
var start = Date.now();
console.profile();
highlightDiff($("orig_diff").value,
$("diff"),
{ "newfile" : newFile }
);
console.profileEnd();
var end = Date.now();
console.debug("Parsing took: " + (end - start) + " ms");
}
</script>
</head>
<body style="padding: 0px; border: 0px; font-size:60%" onLoad="doeHet()">
<div id="title"></div>
<div id="filelist"></div>
<textarea style='display:none' id="orig_diff" rows="8" cols="40">
diff --git a/.gitignore b/.gitignore
index b89b7b7..3367a4e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
build
+build/revision
*.xcodeproj/*.pbxuser
*.xcodeproj/*.perspectivev3
*.xcodeproj/*.mode1v3
diff --git a/ApplicationController.m b/ApplicationController.m
index 86252cd..3a86d38 100644
--- a/ApplicationController.m
+++ b/ApplicationController.m
@@ -21,7 +21,7 @@ @implementation ApplicationController
- (ApplicationController*)init
{
-#ifndef NDEBUG
+#ifdef DEBUG_BUILD
[NSApp activateIgnoringOtherApps:YES];
#endif
@@ -92,12 +92,16 @@ - (IBAction)openPreferencesWindow:(id)sender
- (IBAction)installCliTool:(id)sender;
{
BOOL success = NO;
- NSString* installationPath = @"/usr/local/bin/gitx";
+ NSString* installationPath = @"/usr/local/bin/";
+ NSString* installationName = @"gitx";
NSString* toolPath = [[NSBundle mainBundle] pathForResource:@"gitx" ofType:@""];
if (toolPath) {
AuthorizationRef auth;
if (AuthorizationCreate(NULL, kAuthorizationEmptyEnvironment, kAuthorizationFlagDefaults, &auth) == errAuthorizationSuccess) {
- char const* arguments[] = { "-f", "-s", [toolPath UTF8String], [installationPath UTF8String], NULL };
+ char const* mkdir_arg[] = { "-p", [installationPath UTF8String], NULL};
+ char const* mkdir = "/bin/mkdir";
+ AuthorizationExecuteWithPrivileges(auth, mkdir, kAuthorizationFlagDefaults, (char**)mkdir_arg, NULL);
+ char const* arguments[] = { "-f", "-s", [toolPath UTF8String], [[installationPath stringByAppendingString: installationName] UTF8String], NULL };
char const* helperTool = "/bin/ln";
if (AuthorizationExecuteWithPrivileges(auth, helperTool, kAuthorizationFlagDefaults, (char**)arguments, NULL) == errAuthorizationSuccess) {
int status;
diff --git a/Documentation/ReleaseNotes.txt b/Documentation/ReleaseNotes.txt
deleted file mode 100644
index 21ddcf1..0000000
--- a/Documentation/ReleaseNotes.txt
+++ /dev/null
@@ -1,108 +0,0 @@
-GitX Release Notes
-
-v0.6.1
-===
-
-This is a bugfix release. The following bugs have been fixed:
-
-* The commit view shows new files with linebreaks
-* The history view works with Git >= 1.5.4 again
-* Reloading the detailed view in the History no longer causes an empty page
-
-v0.6
-===
-
-This release has the following new features and enhancements:
-* The diff display now looks much nicer, using boxes to segment files
-* The toolbar can now me customized
-* Images that have been changed or added in a commit can now be viewed
- inline in GitX
-* GitX has gained a preference pane which allows you to specify a git path
- and disable the Gist and Gravatar integration
-* The commit interface is now more intuitive. Particularly, you can now
- select multiple files and use drag and drop to stage / unstage files
-* You can now drag and drop files out of the commit view
-* The files in the commit view have gained a context menu that allows you
- to revert changes / open the file / ignore the file
-* It is now possible to adjust the amount of context lines in the commit view.
- Using a smaller context size allows you to do more fine-grained commits
-* The branch menu is now organized in branches/remotes/tags
-* The view switch button now uses icons rather than words
-* The view shortcuts have changed to use command 1/2 for the history/commit
- view. The history's subviews can now be changed using command-option-1/2/3
-* Listing commits has become much faster
-* GitX no longer spawns zombie processes
-* GitX now shows a list of files that have been changed in a commit
-
-* GitX now uses libgit2 to store object id's, reducing it's memory footprint
-
-In addition many bugs were fixed, including the correct calculation of a
-gravatar MD5 hash.
-
-
-v0.5
-====
-
-This feature release has several new smaller or larger features:
-* The current branch is now highlighted
-* In the commit view, there is an option to amend commits
-* The "Gist it" button now respects github.user/token
-* Display a gravatar of the committer
-* The commit message view now displays a vertical line at 50 characters
-* It is now possible to revert changes by using the context menu in the
- commit view
-* You can now stage only parts of a file by using the "Stage Hunk" buttons
- in the commit view
-* You can now use GitX to show a diff of anything, for example by using
- 'gitx --diff HEAD^^' or 'git diff HEAD~3 | gitx --diff'
-* You can now drag and drop refs to move them and also create branches
-
-In addition, the following bugs have been fixed:
-* Better detection of git version
-* Branch lines are no longer interspersed with half a pixel of whitespace
-* The toolbar keeps its state when switching views
-
-v0.4.1
-==
-
-This is a maintenance release. Most important fixes:
-
-* The diff display is now much faster
-* More locations are now searched for a default git
-* Code pasted online is now private
-
-v0.4: Changes since v0.3.1
-===
-* A new commitview, allowing you to selectively add changes and commit them.
-* You can now upload a commit as a patch to gist.github.com
-* GitX now searches for your git binary in more directories and is smarter
- about reporting errors regarding git paths.
-* You can now remove branches by right-clicking on them in the detailed view
-* GitX now comes with a spicy new icon
-* The diff view has become prettier and now also highlights trailing
- whitespace.
-* Various little changes and stability improvement
-
-v0.3.1
-===
-* Fixed a serious crasher
-
-V0.3: Changes since v0.2.1
-====
-* You can now pass on command-line arguments just like you can with 'git log'
-* The program has an icon
-* Also displays remote branches in the branch list
-* Is better in determining if a directory is a bare git repository
-* Support for --left-right: use 'gitx --left-right HEAD..origin/master'
- to see which commits are only on your branch or on their branch
-* Navigate through changed hunks by using j/k keys
-* Scroll down in webview by using space / shift-space
-
-V0.2.1
-===
-* Added Sparkle update system
-
-V0.2: Changes since v0.1
-====
-* The graph now has colors
-* There are now lables attached to commits
\ No newline at end of file
diff --git a/Documentation/ReleaseNotes/v0.2.1.txt b/Documentation/ReleaseNotes/v0.2.1.txt
new file mode 100644
index 0000000..8ed0e9f
--- /dev/null
+++ b/Documentation/ReleaseNotes/v0.2.1.txt
@@ -0,0 +1,3 @@
+V0.2.1
+===
+* Added Sparkle update system
diff --git a/Documentation/ReleaseNotes/v0.2.txt b/Documentation/ReleaseNotes/v0.2.txt
new file mode 100644
index 0000000..29ab6a3
--- /dev/null
+++ b/Documentation/ReleaseNotes/v0.2.txt
@@ -0,0 +1,4 @@
+V0.2: Changes since v0.1
+====
+* The graph now has colors
+* There are now lables attached to commits
\ No newline at end of file
diff --git a/Documentation/ReleaseNotes/v0.3.1.txt b/Documentation/ReleaseNotes/v0.3.1.txt
new file mode 100644
index 0000000..05d8d00
--- /dev/null
+++ b/Documentation/ReleaseNotes/v0.3.1.txt
@@ -0,0 +1,3 @@
+v0.3.1
+===
+* Fixed a serious crasher
diff --git a/Documentation/ReleaseNotes/v0.3.txt b/Documentation/ReleaseNotes/v0.3.txt
new file mode 100644
index 0000000..d46ea1d
--- /dev/null
+++ b/Documentation/ReleaseNotes/v0.3.txt
@@ -0,0 +1,10 @@
+V0.3: Changes since v0.2.1
+====
+* You can now pass on command-line arguments just like you can with 'git log'
+* The program has an icon
+* Also displays remote branches in the branch list
+* Is better in determining if a directory is a bare git repository
+* Support for --left-right: use 'gitx --left-right HEAD..origin/master'
+ to see which commits are only on your branch or on their branch
+* Navigate through changed hunks by using j/k keys
+* Scroll down in webview by using space / shift-space
diff --git a/Documentation/ReleaseNotes/v0.4.1.txt b/Documentation/ReleaseNotes/v0.4.1.txt
new file mode 100644
index 0000000..b8e6a93
--- /dev/null
+++ b/Documentation/ReleaseNotes/v0.4.1.txt
@@ -0,0 +1,8 @@
+v0.4.1
+==
+
+This is a maintenance release. Most important fixes:
+
+* The diff display is now much faster
+* More locations are now searched for a default git
+* Code pasted online is now private
diff --git a/Documentation/ReleaseNotes/v0.4.txt b/Documentation/ReleaseNotes/v0.4.txt
new file mode 100644
index 0000000..2a4efd0
--- /dev/null
+++ b/Documentation/ReleaseNotes/v0.4.txt
@@ -0,0 +1,11 @@
+v0.4: Changes since v0.3.1
+===
+* A new commitview, allowing you to selectively add changes and commit them.
+* You can now upload a commit as a patch to gist.github.com
+* GitX now searches for your git binary in more directories and is smarter
+ about reporting errors regarding git paths.
+* You can now remove branches by right-clicking on them in the detailed view
+* GitX now comes with a spicy new icon
+* The diff view has become prettier and now also highlights trailing
+ whitespace.
+* Various little changes and stability improvement
diff --git a/Documentation/ReleaseNotes/v0.5.txt b/Documentation/ReleaseNotes/v0.5.txt
new file mode 100644
index 0000000..3cfcc8a
--- /dev/null
+++ b/Documentation/ReleaseNotes/v0.5.txt
@@ -0,0 +1,23 @@
+v0.5
+====
+
+This feature release has several new smaller or larger features:
+
+* The current branch is now highlighted
+* In the commit view, there is an option to amend commits
+* The "Gist it" button now respects github.user/token
+* Display a gravatar of the committer
+* The commit message view now displays a vertical line at 50 characters
+* It is now possible to revert changes by using the context menu in the
+ commit view
+* You can now stage only parts of a file by using the "Stage Hunk" buttons
+ in the commit view
+* You can now use GitX to show a diff of anything, for example by using
+ 'gitx --diff HEAD^^' or 'git diff HEAD~3 | gitx --diff'
+* You can now drag and drop refs to move them and also create branches
+
+In addition, the following bugs have been fixed:
+
+* Better detection of git version
+* Branch lines are no longer interspersed with half a pixel of whitespace
+* The toolbar keeps its state when switching views
diff --git a/Documentation/ReleaseNotes/v0.6.1.txt b/Documentation/ReleaseNotes/v0.6.1.txt
new file mode 100644
index 0000000..c77a31b
--- /dev/null
+++ b/Documentation/ReleaseNotes/v0.6.1.txt
@@ -0,0 +1,8 @@
+v0.6.1
+===
+
+This is a bugfix release. The following bugs have been fixed:
+
+* The commit view shows new files with linebreaks
+* The history view works with Git >= 1.5.4 again
+* Reloading the detailed view in the History no longer causes an empty page
diff --git a/Documentation/ReleaseNotes/v0.6.2.txt b/Documentation/ReleaseNotes/v0.6.2.txt
new file mode 100644
index 0000000..37303d7
--- /dev/null
+++ b/Documentation/ReleaseNotes/v0.6.2.txt
@@ -0,0 +1,18 @@
+v0.6.2
+===
+
+This is a maintenance release. The following bugs have been fixed:
+
+* Fix many display bugs in the history view (Thanks to Johannes Gilger)
+* Fix moving of refs
+* GitX no longer stalls if you have a large amount of untracked files
+* GitX now asks for confirmation before deleting a branch
+* GitX no longer shows ghost files after staging a hunk
+* Dragging and dropping a tree now correctly copies all files
+
+In addition, the following features have been added:
+
+* There is now a 'New…' option to create a new repository
+* The 'Gist It' feature now asks for confirmation by default. This can be changed in the preferences
+* GitX can now open any directory by dragging it on the icon
+* GitX now asks for confirmation before deleting a branch
\ No newline at end of file
diff --git a/Documentation/ReleaseNotes/v0.6.txt b/Documentation/ReleaseNotes/v0.6.txt
new file mode 100644
index 0000000..d152d89
--- /dev/null
+++ b/Documentation/ReleaseNotes/v0.6.txt
@@ -0,0 +1,29 @@
+v0.6
+===
+
+This release has the following new features and enhancements:
+
+* The diff display now looks much nicer, using boxes to segment files
+* The toolbar can now me customized
+* Images that have been changed or added in a commit can now be viewed
+ inline in GitX
+* GitX has gained a preference pane which allows you to specify a git path
+ and disable the Gist and Gravatar integration
+* The commit interface is now more intuitive. Particularly, you can now
+ select multiple files and use drag and drop to stage / unstage files
+* You can now drag and drop files out of the commit view
+* The files in the commit view have gained a context menu that allows you
+ to revert changes / open the file / ignore the file
+* It is now possible to adjust the amount of context lines in the commit view.
+ Using a smaller context size allows you to do more fine-grained commits
+* The branch menu is now organized in branches/remotes/tags
+* The view switch button now uses icons rather than words
+* The view shortcuts have changed to use command 1/2 for the history/commit
+ view. The history's subviews can now be changed using command-option-1/2/3
+* Listing commits has become much faster
+* GitX no longer spawns zombie processes
+* GitX now shows a list of files that have been changed in a commit
+* GitX now uses libgit2 to store object id's, reducing it's memory footprint
+
+In addition many bugs were fixed, including the correct calculation of a
+gravatar MD5 hash.
diff --git a/English.lproj/MainMenu.xib b/English.lproj/MainMenu.xib
index 1e9e26d..3e4d678 100644
--- a/English.lproj/MainMenu.xib
+++ b/English.lproj/MainMenu.xib
@@ -8,7 +8,7 @@
<string key="IBDocument.HIToolboxVersion">353.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="57"/>
+ <integer value="81"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -213,7 +213,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMenuItem" id="968526216">
<reference key="NSMenu" ref="310195297"/>
- <string key="NSTitle">New</string>
+ <string type="base64-UTF8" key="NSTitle">TmV34oCmA</string>
<string key="NSKeyEquiv">n</string>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
@@ -222,7 +222,7 @@
</object>
<object class="NSMenuItem" id="432647792">
<reference key="NSMenu" ref="310195297"/>
- <string key="NSTitle">Open...</string>
+ <string type="base64-UTF8" key="NSTitle">T3BlbuKApg</string>
<string key="NSKeyEquiv">o</string>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
@@ -1212,6 +1212,14 @@
</object>
<int key="connectionID">933</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">newDocument:</string>
+ <reference key="source" ref="954860085"/>
+ <reference key="destination" ref="968526216"/>
+ </object>
+ <int key="connectionID">934</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -2256,7 +2264,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">933</int>
+ <int key="maxID">934</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
diff --git a/English.lproj/Preferences.xib b/English.lproj/Preferences.xib
index d7477bf..44d184f 100644
--- a/English.lproj/Preferences.xib
+++ b/English.lproj/Preferences.xib
@@ -1,15 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02">
+<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.03">
<data>
<int key="IBDocument.SystemTarget">1050</int>
- <string key="IBDocument.SystemVersion">9F33</string>
- <string key="IBDocument.InterfaceBuilderVersion">670</string>
- <string key="IBDocument.AppKitVersion">949.34</string>
- <string key="IBDocument.HIToolboxVersion">352.00</string>
+ <string key="IBDocument.SystemVersion">9G55</string>
+ <string key="IBDocument.InterfaceBuilderVersion">677</string>
+ <string key="IBDocument.AppKitVersion">949.43</string>
+ <string key="IBDocument.HIToolboxVersion">353.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="62"/>
<integer value="1"/>
+ <integer value="62"/>
+ <integer value="87"/>
<integer value="4" id="12"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
@@ -17,6 +18,15 @@
<string>com.apple.InterfaceBuilderKit</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomObject" id="1001">
@@ -396,27 +406,30 @@
<object class="NSUserDefaultsController" id="557723770">
<object class="NSMutableArray" key="NSDeclaredKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
- <string>gitExecutable</string>
+ <string>PBConfirmPublicGists</string>
+ <string>PBGitGist</string>
+ <string>PBEnableGist</string>
+ <string>PBGistPublic</string>
</object>
<bool key="NSSharedInstance">YES</bool>
</object>
- <object class="NSCustomView" id="1012601198">
+ <object class="NSCustomView" id="263788152">
<reference key="NSNextResponder"/>
<int key="NSvFlags">268</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSButton" id="978972354">
- <reference key="NSNextResponder" ref="1012601198"/>
+ <object class="NSButton" id="237556568">
+ <reference key="NSNextResponder" ref="263788152"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{18, 38}, {111, 18}}</string>
- <reference key="NSSuperview" ref="1012601198"/>
+ <string key="NSFrame">{{18, 80}, {111, 18}}</string>
+ <reference key="NSSuperview" ref="263788152"/>
<bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="469684733">
+ <object class="NSButtonCell" key="NSCell" id="973971251">
<int key="NSCellFlags">-2080244224</int>
<int key="NSCellFlags2">0</int>
<string type="base64-UTF8" key="NSContents">RW5hYmxlICdHaXN0IGl0Jw</string>
<reference key="NSSupport" ref="734450335"/>
- <reference key="NSControlView" ref="978972354"/>
+ <reference key="NSControlView" ref="237556568"/>
<int key="NSButtonFlags">1211912703</int>
<int key="NSButtonFlags2">130</int>
<reference key="NSNormalImage" ref="294005107"/>
@@ -427,18 +440,62 @@
<int key="NSPeriodicInterval">25</int>
</object>
</object>
- <object class="NSButton" id="740198534">
- <reference key="NSNextResponder" ref="1012601198"/>
+ <object class="NSButton" id="485413225">
+ <reference key="NSNextResponder" ref="263788152"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{18, 18}, {121, 18}}</string>
- <reference key="NSSuperview" ref="1012601198"/>
+ <reference key="NSSuperview" ref="263788152"/>
<bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="18634163">
+ <object class="NSButtonCell" key="NSCell" id="12685338">
<int key="NSCellFlags">-2080244224</int>
<int key="NSCellFlags2">0</int>
<string key="NSContents">Enable Gravatar</string>
<reference key="NSSupport" ref="734450335"/>
- <reference key="NSControlView" ref="740198534"/>
+ <reference key="NSControlView" ref="485413225"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">130</int>
+ <reference key="NSNormalImage" ref="294005107"/>
+ <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="933582906">
+ <reference key="NSNextResponder" ref="263788152"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{38, 60}, {181, 18}}</string>
+ <reference key="NSSuperview" ref="263788152"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="601773126">
+ <int key="NSCellFlags">-2080244224</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Confirm creation of Gists</string>
+ <reference key="NSSupport" ref="734450335"/>
+ <reference key="NSControlView" ref="933582906"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">130</int>
+ <reference key="NSNormalImage" ref="294005107"/>
+ <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="766070942">
+ <reference key="NSNextResponder" ref="263788152"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{38, 38}, {179, 18}}</string>
+ <reference key="NSSuperview" ref="263788152"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="817763751">
+ <int key="NSCellFlags">-2080244224</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Make Gists public</string>
+ <reference key="NSSupport" ref="734450335"/>
+ <reference key="NSControlView" ref="766070942"/>
<int key="NSButtonFlags">1211912703</int>
<int key="NSButtonFlags2">130</int>
<reference key="NSNormalImage" ref="294005107"/>
@@ -450,7 +507,7 @@
</object>
</object>
</object>
- <string key="NSFrameSize">{400, 74}</string>
+ <string key="NSFrameSize">{403, 116}</string>
<reference key="NSSuperview"/>
<string key="NSClassName">NSView</string>
</object>
@@ -673,17 +730,17 @@
<object class="IBOutletConnection" key="connection">
<string key="label">integrationPrefsView</string>
<reference key="source" ref="1001"/>
- <reference key="destination" ref="1012601198"/>
+ <reference key="destination" ref="263788152"/>
</object>
- <int key="connectionID">89</int>
+ <int key="connectionID">92</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: values.PBEnableGist</string>
- <reference key="source" ref="978972354"/>
+ <reference key="source" ref="237556568"/>
<reference key="destination" ref="557723770"/>
<object class="NSNibBindingConnector" key="connector">
- <reference key="NSSource" ref="978972354"/>
+ <reference key="NSSource" ref="237556568"/>
<reference key="NSDestination" ref="557723770"/>
<string key="NSLabel">value: values.PBEnableGist</string>
<string key="NSBinding">value</string>
@@ -691,15 +748,15 @@
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
- <int key="connectionID">97</int>
+ <int key="connectionID">94</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: values.PBEnableGravatar</string>
- <reference key="source" ref="740198534"/>
+ <reference key="source" ref="485413225"/>
<reference key="destination" ref="557723770"/>
<object class="NSNibBindingConnector" key="connector">
- <reference key="NSSource" ref="740198534"/>
+ <reference key="NSSource" ref="485413225"/>
<reference key="NSDestination" ref="557723770"/>
<string key="NSLabel">value: values.PBEnableGravatar</string>
<string key="NSBinding">value</string>
@@ -707,7 +764,71 @@
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
- <int key="connectionID">101</int>
+ <int key="connectionID">96</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">value: values.PBConfirmPublicGists</string>
+ <reference key="source" ref="933582906"/>
+ <reference key="destination" ref="557723770"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="933582906"/>
+ <reference key="NSDestination" ref="557723770"/>
+ <string key="NSLabel">value: values.PBConfirmPublicGists</string>
+ <string key="NSBinding">value</string>
+ <string key="NSKeyPath">values.PBConfirmPublicGists</string>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
+ </object>
+ <int key="connectionID">104</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">enabled: values.PBEnableGist</string>
+ <reference key="source" ref="933582906"/>
+ <reference key="destination" ref="557723770"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="933582906"/>
+ <reference key="NSDestination" ref="557723770"/>
+ <string key="NSLabel">enabled: values.PBEnableGist</string>
+ <string key="NSBinding">enabled</string>
+ <string key="NSKeyPath">values.PBEnableGist</string>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
+ </object>
+ <int key="connectionID">107</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">enabled: values.PBEnableGist</string>
+ <reference key="source" ref="766070942"/>
+ <reference key="destination" ref="557723770"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="766070942"/>
+ <reference key="NSDestination" ref="557723770"/>
+ <string key="NSLabel">enabled: values.PBEnableGist</string>
+ <string key="NSBinding">enabled</string>
+ <string key="NSKeyPath">values.PBEnableGist</string>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
+ </object>
+ <int key="connectionID">111</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">value: values.PBGistPublic</string>
+ <reference key="source" ref="766070942"/>
+ <reference key="destination" ref="557723770"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="766070942"/>
+ <reference key="NSDestination" ref="557723770"/>
+ <string key="NSLabel">value: values.PBGistPublic</string>
+ <string key="NSBinding">value</string>
+ <string key="NSKeyPath">values.PBGistPublic</string>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
+ </object>
+ <int key="connectionID">113</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
@@ -987,43 +1108,73 @@
<reference key="parent" ref="1032928366"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">88</int>
- <reference key="object" ref="1012601198"/>
+ <int key="objectID">87</int>
+ <reference key="object" ref="263788152"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="978972354"/>
- <reference ref="740198534"/>
+ <reference ref="237556568"/>
+ <reference ref="933582906"/>
+ <reference ref="485413225"/>
+ <reference ref="766070942"/>
</object>
<reference key="parent" ref="1002"/>
<string key="objectName">Integration</string>
</object>
<object class="IBObjectRecord">
- <int key="objectID">90</int>
- <reference key="object" ref="978972354"/>
+ <int key="objectID">88</int>
+ <reference key="object" ref="485413225"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="469684733"/>
+ <reference ref="12685338"/>
</object>
- <reference key="parent" ref="1012601198"/>
+ <reference key="parent" ref="263788152"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">89</int>
+ <reference key="object" ref="237556568"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="973971251"/>
+ </object>
+ <reference key="parent" ref="263788152"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">90</int>
+ <reference key="object" ref="973971251"/>
+ <reference key="parent" ref="237556568"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">91</int>
- <reference key="object" ref="469684733"/>
- <reference key="parent" ref="978972354"/>
+ <reference key="object" ref="12685338"/>
+ <reference key="parent" ref="485413225"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">92</int>
- <reference key="object" ref="740198534"/>
+ <int key="objectID">97</int>
+ <reference key="object" ref="933582906"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="18634163"/>
+ <reference ref="601773126"/>
</object>
- <reference key="parent" ref="1012601198"/>
+ <reference key="parent" ref="263788152"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">93</int>
- <reference key="object" ref="18634163"/>
- <reference key="parent" ref="740198534"/>
+ <int key="objectID">98</int>
+ <reference key="object" ref="601773126"/>
+ <reference key="parent" ref="933582906"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">108</int>
+ <reference key="object" ref="766070942"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="817763751"/>
+ </object>
+ <reference key="parent" ref="263788152"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">109</int>
+ <reference key="object" ref="817763751"/>
+ <reference key="parent" ref="766070942"/>
</object>
</object>
</object>
@@ -1040,6 +1191,8 @@
<string>1.WindowOrigin</string>
<string>1.editorWindowContentRectSynchronizationRect</string>
<string>10.IBPluginDependency</string>
+ <string>108.IBPluginDependency</string>
+ <string>109.IBPluginDependency</string>
<string>11.IBPluginDependency</string>
<string>12.IBPluginDependency</string>
<string>13.IBPluginDependency</string>
@@ -1073,13 +1226,15 @@
<string>64.IBPluginDependency</string>
<string>77.IBPluginDependency</string>
<string>78.IBPluginDependency</string>
- <string>88.IBEditorWindowLastContentRect</string>
+ <string>87.IBEditorWindowLastContentRect</string>
+ <string>87.IBPluginDependency</string>
<string>88.IBPluginDependency</string>
+ <string>89.IBPluginDependency</string>
<string>9.IBPluginDependency</string>
<string>90.IBPluginDependency</string>
<string>91.IBPluginDependency</string>
- <string>92.IBPluginDependency</string>
- <string>93.IBPluginDependency</string>
+ <string>97.IBPluginDependency</string>
+ <string>98.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -1103,6 +1258,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>{{514, 459}, {106, 71}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -1133,13 +1290,15 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>{{474, 394}, {239, 54}}</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>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>{{474, 352}, {403, 116}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{211, 334}, {400, 74}}</string>
- <string>{{474, 394}, {239, 54}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -1168,7 +1327,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">101</int>
+ <int key="maxID">113</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
diff --git a/GitX.xcodeproj/project.pbxproj b/GitX.xcodeproj/project.pbxproj
index ec296ce..80f9df5 100644
--- a/GitX.xcodeproj/project.pbxproj
+++ b/GitX.xcodeproj/project.pbxproj
@@ -6,6 +6,20 @@
objectVersion = 45;
objects = {
+/* Begin PBXAggregateTarget section */
+ F56439F70F792B2100A579C2 /* Generate PList Prefix */ = {
+ isa = PBXAggregateTarget;
+ buildConfigurationList = F56439FD0F792B3600A579C2 /* Build configuration list for PBXAggregateTarget "Generate PList Prefix" */;
+ buildPhases = (
+ F56439F60F792B2100A579C2 /* ShellScript */,
+ );
+ dependencies = (
+ );
+ name = "Generate PList Prefix";
+ productName = "Generate PList Prefix";
+ };
+/* End PBXAggregateTarget section */
+
/* Begin PBXBuildFile section */
056438B70ED0C40B00985397 /* DetailViewTemplate.png in Resources */ = {isa = PBXBuildFile; fileRef = 056438B60ED0C40B00985397 /* DetailViewTemplate.png */; };
3BC07F4C0ED5A5C5009A7768 /* HistoryViewTemplate.png in Resources */ = {isa = PBXBuildFile; fileRef = 3BC07F4A0ED5A5C5009A7768 /* HistoryViewTemplate.png */; };
@@ -39,6 +53,8 @@
F523CEB60ED3399200DDD714 /* PBGitIndexController.m in Sources */ = {isa = PBXBuildFile; fileRef = F523CEB50ED3399200DDD714 /* PBGitIndexController.m */; };
F52BCE030E84208300AA3741 /* PBGitHistoryView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F52BCE020E84208300AA3741 /* PBGitHistoryView.xib */; };
F52BCE070E84211300AA3741 /* PBGitHistoryController.m in Sources */ = {isa = PBXBuildFile; fileRef = F52BCE060E84211300AA3741 /* PBGitHistoryController.m */; };
+ F53B61790F7FC9D3000E13FA /* PBGitRevPool.mm in Sources */ = {isa = PBXBuildFile; fileRef = F53B61780F7FC9D3000E13FA /* PBGitRevPool.mm */; };
+ F53B617A0F7FC9D3000E13FA /* PBGitRevPool.mm in Sources */ = {isa = PBXBuildFile; fileRef = F53B61780F7FC9D3000E13FA /* PBGitRevPool.mm */; };
F53C4DF70E97FC630022AD59 /* PBGitBinary.m in Sources */ = {isa = PBXBuildFile; fileRef = F53C4DF60E97FC630022AD59 /* PBGitBinary.m */; };
F53C4DF80E97FCA70022AD59 /* PBGitBinary.m in Sources */ = {isa = PBXBuildFile; fileRef = F53C4DF60E97FC630022AD59 /* PBGitBinary.m */; };
F53C4DF90E97FCAD0022AD59 /* PBEasyPipe.m in Sources */ = {isa = PBXBuildFile; fileRef = F57CC3900E05DDF2000472E2 /* PBEasyPipe.m */; };
@@ -113,6 +129,13 @@
remoteGlobalIDString = 913D5E480E55644600CECEA2;
remoteInfo = "cli tool";
};
+ F5643A010F792B4900A579C2 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = F56439F70F792B2100A579C2;
+ remoteInfo = "Generate PList Prefix";
+ };
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
@@ -183,6 +206,9 @@
F52BCE020E84208300AA3741 /* PBGitHistoryView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PBGitHistoryView.xib; sourceTree = "<group>"; };
F52BCE050E84211300AA3741 /* PBGitHistoryController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitHistoryController.h; sourceTree = "<group>"; };
F52BCE060E84211300AA3741 /* PBGitHistoryController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitHistoryController.m; sourceTree = "<group>"; };
+ F53B61770F7FC9D3000E13FA /* PBGitRevPool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitRevPool.h; sourceTree = "<group>"; };
+ F53B61780F7FC9D3000E13FA /* PBGitRevPool.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PBGitRevPool.mm; sourceTree = "<group>"; };
+ F53B64030F7FF5DC000E13FA /* PBRevPoolDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBRevPoolDelegate.h; sourceTree = "<group>"; };
F53C4DF50E97FC630022AD59 /* PBGitBinary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitBinary.h; sourceTree = "<group>"; };
F53C4DF60E97FC630022AD59 /* PBGitBinary.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitBinary.m; sourceTree = "<group>"; };
F53EE3590E06BBA00022B925 /* CWQuickLook.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CWQuickLook.h; sourceTree = "<group>"; };
@@ -437,9 +463,24 @@
name = Widgets;
sourceTree = "<group>";
};
+ F53B61750F7FC9B9000E13FA /* RevLoading */ = {
+ isa = PBXGroup;
+ children = (
+ F53FF2030E7ABB5300389171 /* PBGitRevSpecifier.h */,
+ F53FF2040E7ABB5300389171 /* PBGitRevSpecifier.m */,
+ F5FF4E160E0829C20006317A /* PBGitRevList.h */,
+ F5FF4E170E0829C20006317A /* PBGitRevList.mm */,
+ F53B61770F7FC9D3000E13FA /* PBGitRevPool.h */,
+ F53B61780F7FC9D3000E13FA /* PBGitRevPool.mm */,
+ F53B64030F7FF5DC000E13FA /* PBRevPoolDelegate.h */,
+ );
+ name = RevLoading;
+ sourceTree = "<group>";
+ };
F56174540E05887E001DCD79 /* Git */ = {
isa = PBXGroup;
children = (
+ F53B61750F7FC9B9000E13FA /* RevLoading */,
F5E927E30E883D6800056E75 /* Commit */,
F5E927E10E883D2E00056E75 /* History */,
F5945E150E02B0C200706420 /* PBGitRepository.h */,
@@ -555,10 +596,6 @@
F56524EF0E02D45200F03B52 /* PBGitCommit.m */,
F5C007730E731B48007B84B2 /* PBGitRef.h */,
F5C007740E731B48007B84B2 /* PBGitRef.m */,
- F5FF4E160E0829C20006317A /* PBGitRevList.h */,
- F5FF4E170E0829C20006317A /* PBGitRevList.mm */,
- F53FF2030E7ABB5300389171 /* PBGitRevSpecifier.h */,
- F53FF2040E7ABB5300389171 /* PBGitRevSpecifier.m */,
F56174550E058893001DCD79 /* PBGitTree.h */,
F56174560E058893001DCD79 /* PBGitTree.m */,
F5FC43C30EBD050800191D80 /* PBRefContextDelegate.h */,
@@ -614,7 +651,7 @@
isa = PBXNativeTarget;
buildConfigurationList = 26FC0A840875C7B200E6366F /* Build configuration list for PBXNativeTarget "GitX" */;
buildPhases = (
- F5792DFB0EDB570C001B0C31 /* Compilie libgit2 */,
+ F5792DFB0EDB570C001B0C31 /* Compile libgit2 */,
8D1107290486CEB800E47090 /* Resources */,
8D11072C0486CEB800E47090 /* Sources */,
8D11072E0486CEB800E47090 /* Frameworks */,
@@ -625,6 +662,7 @@
);
dependencies = (
913D5E5A0E5564F400CECEA2 /* PBXTargetDependency */,
+ F5643A020F792B4900A579C2 /* PBXTargetDependency */,
);
name = GitX;
productInstallPath = "$(HOME)/Applications";
@@ -680,6 +718,7 @@
8D1107260486CEB800E47090 /* GitX */,
913D5E480E55644600CECEA2 /* cli tool */,
F5886A0F0ED5D33D0066E74C /* SpeedTest */,
+ F56439F70F792B2100A579C2 /* Generate PList Prefix */,
);
};
/* End PBXProject section */
@@ -723,19 +762,32 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
- F5792DFB0EDB570C001B0C31 /* Compilie libgit2 */ = {
+ F56439F60F792B2100A579C2 /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "export PATH=$PATH:$HOME/bin:$HOME/local/bin:/sw/bin:/opt/local/bin:`$TARGET_BUILD_DIR/gitx --git-path`\nVERSION=$(git describe)\nLONG_VERSION=$(echo $VERSION | sed -e \"s/\\-/\\./\" -e \"s/^v//\" -e \"s/-.*//\")\nSHORT_VERSION=$(echo $VERSION | sed -e \"s/\\-.*//\" -e \"s/^v//\")\n\necho -n \"#define LONG_VERSION $LONG_VERSION\n#define SHORT_VERSION $SHORT_VERSION\" > build/revision\ntouch Info.plist";
+ };
+ F5792DFB0EDB570C001B0C31 /* Compile libgit2 */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
- name = "Compilie libgit2";
+ name = "Compile libgit2";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "git submodule init\ngit submodule update\ncd libgit2\nrm -f libgit2.a\nmake CFLAGS=\"-arch i386 -arch ppc\"\nranlib libgit2.a";
+ shellScript = "export PATH=$PATH:$HOME/bin:$HOME/local/bin:/sw/bin:/opt/local/bin:`$TARGET_BUILD_DIR/gitx --git-path`\ngit submodule init\ngit submodule update\ncd libgit2\nrm -f libgit2.a\nmake CFLAGS=\"-arch i386 -arch ppc\"\nranlib libgit2.a";
};
F5CF04A20EAE696C00D75C81 /* Copy HTML files */ = {
isa = PBXShellScriptBuildPhase;
@@ -806,6 +858,7 @@
47DBDB580E94EDE700671A1E /* DBPrefsWindowController.m in Sources */,
47DBDB670E94EE8B00671A1E /* PBPrefsWindowController.m in Sources */,
47DBDBCA0E95016F00671A1E /* PBNSURLPathUserDefaultsTransfomer.m in Sources */,
+ F53B61790F7FC9D3000E13FA /* PBGitRevPool.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -839,6 +892,7 @@
F5886A170ED5D34F0066E74C /* PBGitRepository.m in Sources */,
F5886A190ED5D3560066E74C /* PBGitRef.m in Sources */,
F5886A160ED5D3490066E74C /* speedtest.m in Sources */,
+ F53B617A0F7FC9D3000E13FA /* PBGitRevPool.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -850,6 +904,11 @@
target = 913D5E480E55644600CECEA2 /* cli tool */;
targetProxy = 913D5E590E5564F400CECEA2 /* PBXContainerItemProxy */;
};
+ F5643A020F792B4900A579C2 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = F56439F70F792B2100A579C2 /* Generate PList Prefix */;
+ targetProxy = F5643A010F792B4900A579C2 /* PBXContainerItemProxy */;
+ };
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
@@ -905,6 +964,9 @@
GCC_PREFIX_HEADER = GitX_Prefix.pch;
HEADER_SEARCH_PATHS = libgit2/src;
INFOPLIST_FILE = Info.plist;
+ INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-traditional";
+ INFOPLIST_PREFIX_HEADER = build/revision;
+ INFOPLIST_PREPROCESS = YES;
INSTALL_PATH = "$(HOME)/Applications";
LIBRARY_SEARCH_PATHS = libgit2;
PRODUCT_NAME = GitX;
@@ -916,7 +978,7 @@
26FC0A860875C7B200E6366F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ DEBUG_INFORMATION_FORMAT = dwarf;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)\"",
@@ -925,8 +987,12 @@
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = GitX_Prefix.pch;
+ GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = "";
HEADER_SEARCH_PATHS = libgit2/src;
INFOPLIST_FILE = Info.plist;
+ INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-traditional";
+ INFOPLIST_PREFIX_HEADER = build/revision;
+ INFOPLIST_PREPROCESS = YES;
INSTALL_PATH = "$(HOME)/Applications";
LIBRARY_SEARCH_PATHS = libgit2;
PRODUCT_NAME = GitX;
@@ -938,6 +1004,7 @@
isa = XCBuildConfiguration;
buildSettings = {
GCC_ENABLE_OBJC_GC = required;
+ GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = DEBUG_BUILD;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
@@ -1007,6 +1074,27 @@
};
name = Release;
};
+ F56439F80F792B2100A579C2 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ PRODUCT_NAME = "Generate PList Prefix";
+ };
+ name = Debug;
+ };
+ F56439F90F792B2100A579C2 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ PRODUCT_NAME = "Generate PList Prefix";
+ ZERO_LINK = NO;
+ };
+ name = Release;
+ };
F5886A130ED5D33E0066E74C /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@@ -1018,6 +1106,7 @@
GCC_OPTIMIZATION_LEVEL = 2;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = GitX_Prefix.pch;
+ GCC_VERSION = "";
HEADER_SEARCH_PATHS = libgit2/src;
INFOPLIST_FILE = "SpeedTest-Info.plist";
INSTALL_PATH = "$(HOME)/Applications";
@@ -1092,6 +1181,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
+ F56439FD0F792B3600A579C2 /* Build configuration list for PBXAggregateTarget "Generate PList Prefix" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ F56439F80F792B2100A579C2 /* Debug */,
+ F56439F90F792B2100A579C2 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
F5886A150ED5D33E0066E74C /* Build configuration list for PBXNativeTarget "SpeedTest" */ = {
isa = XCConfigurationList;
buildConfigurations = (
diff --git a/Info.plist b/Info.plist
index 5e6e411..9c50c45 100644
--- a/Info.plist
+++ b/Info.plist
@@ -11,6 +11,16 @@
<dict>
<key>CFBundleTypeExtensions</key>
<array>
+ <string>*</string>
+ </array>
+ <key>CFBundleTypeRole</key>
+ <string>None</string>
+ <key>CFBundleTypeName</key>
+ <string>Standard folder</string>
+ </dict>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
<string>git</string>
<string></string>
</array>
@@ -39,9 +49,9 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>0.6.1</string>
+ <string>LONG_VERSION</string>
<key>CFBundleShortVersionString</key>
- <string>0.6.1</string>
+ <string>SHORT_VERSION</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
diff --git a/PBGitCommit.h b/PBGitCommit.h
index 70a6001..461f01f 100644
--- a/PBGitCommit.h
+++ b/PBGitCommit.h
@@ -12,8 +12,8 @@
#include "git/oid.h"
@interface PBGitCommit : NSObject {
- git_oid sha;
- git_oid *parentShas;
+ git_oid *sha;
+ git_oid **parentShas;
int nParents;
NSString* subject;
@@ -25,12 +25,12 @@
int timestamp;
char sign;
id lineInfo;
- PBGitRepository* repository;
+ PBGitRepository *repository;
}
-- initWithRepository:(PBGitRepository *)repo andSha:(git_oid)sha;
+- initWithRepository:(PBGitRepository *)repo andSha:(git_oid *)sha;
-- (void)addRef:(id)ref;
+- (void)addRef:(PBGitRef *)ref;
- (void)removeRef:(id)ref;
- (NSString *)realSha;
@@ -40,7 +40,7 @@
@property (copy) NSString* author;
@property (readonly) NSArray* parents; // TODO: remove this and its uses
-@property (assign) git_oid *parentShas;
+@property (assign) git_oid **parentShas;
@property (assign) int nParents, timestamp;
@property (retain) NSMutableArray* refs;
diff --git a/PBGitCommit.m b/PBGitCommit.m
index 37dc312..51b9feb 100644
--- a/PBGitCommit.m
+++ b/PBGitCommit.m
@@ -22,7 +22,7 @@ - (NSArray *) parents
NSMutableArray *p = [NSMutableArray arrayWithCapacity:nParents];
for (i = 0; i < nParents; ++i)
{
- char *s = git_oid_mkhex(parentShas + i);
+ char *s = git_oid_mkhex(parentShas[i]);
[p addObject:[NSString stringWithUTF8String:s]];
free(s);
}
@@ -47,10 +47,10 @@ - (NSArray*) treeContents
- (git_oid *)sha
{
- return &sha;
+ return sha;
}
-- initWithRepository:(PBGitRepository*) repo andSha:(git_oid)newSha
+- initWithRepository:(PBGitRepository*) repo andSha:(git_oid *)newSha
{
details = nil;
repository = repo;
@@ -60,7 +60,7 @@ - (git_oid *)sha
- (NSString *)realSha
{
- char *hex = git_oid_mkhex(&sha);
+ char *hex = git_oid_mkhex(sha);
NSString *str = [NSString stringWithUTF8String:hex];
free(hex);
return str;
@@ -94,7 +94,7 @@ - (PBGitTree*) tree
return [PBGitTree rootForCommit: self];
}
-- (void)addRef:(id)ref
+- (void)addRef:(PBGitRef *)ref
{
if (!self.refs)
self.refs = [NSMutableArray arrayWithObject:ref];
@@ -108,8 +108,6 @@ - (void)removeRef:(id)ref
return;
[self.refs removeObject:ref];
- if ([self.refs count] == 0)
- self.refs = NULL;
}
- (NSMutableArray *)refs
@@ -119,7 +117,7 @@ - (NSMutableArray *)refs
- (void) setRefs:(NSMutableArray *)refs
{
- [[repository refs] setObject:[self realSha] forKey:[self realSha]];
+ [[repository refs] setObject:refs forKey:[self realSha]];
}
- (void)finalize
diff --git a/PBGitCommitController.m b/PBGitCommitController.m
index 22e995e..03b6a76 100644
--- a/PBGitCommitController.m
+++ b/PBGitCommitController.m
@@ -85,6 +85,11 @@ - (void) refresh:(id) sender
file.shouldBeDeleted = YES;
self.status = @"Refreshing indexÄ";
+ if (![repository workingDirectory]) {
+ //if ([[repository outputForCommand:@"rev-parse --is-inside-work-tree"] isEqualToString:@"false"]) {
+ return;
+ }
+
self.busy++;
[repository outputInWorkdirForArguments:[NSArray arrayWithObjects:@"update-index", @"-q", @"--unmerged", @"--ignore-missing", @"--refresh", nil]];
@@ -134,6 +139,7 @@ - (void) doneProcessingIndex
- (void) readOtherFiles:(NSNotification *)notification;
{
+ [unstagedFilesController setAutomaticallyRearrangesObjects:NO];
NSArray *lines = [self linesFromNotification:notification];
for (NSString *line in lines) {
if ([line length] == 0)
@@ -148,7 +154,7 @@ - (void) readOtherFiles:(NSNotification *)notification;
file.status = NEW;
file.hasCachedChanges = NO;
file.hasUnstagedChanges = YES;
- continue;
+ break;
}
}
@@ -162,7 +168,8 @@ - (void) readOtherFiles:(NSNotification *)notification;
file.hasUnstagedChanges = YES;
[files addObject: file];
}
-
+ [unstagedFilesController setAutomaticallyRearrangesObjects:YES];
+ [unstagedFilesController rearrangeObjects];
[self doneProcessingIndex];
}
@@ -186,17 +193,17 @@ - (void) addFilesFromLines:(NSArray *)lines cached:(BOOL) cached
// but rather update it to incorporate our changes
for (PBChangedFile *file in files) {
if ([file.path isEqualToString:line]) {
- file.shouldBeDeleted = NO;
- if (cached) {
- file.commitBlobSHA = sha;
+ if (cached && file.hasCachedChanges) { // if we're listing cached files
+ file.shouldBeDeleted = NO; // and the matching file in files had cached changes
+ file.commitBlobSHA = sha; // we don't delete it
file.commitBlobMode = mode;
- file.hasCachedChanges = YES;
+ isNew = NO;
+ break;
+ } else if ((!cached) && file.hasUnstagedChanges) { // if we're listing unstaged files and the
+ file.shouldBeDeleted = NO; // matching file in files had unstaged changes
+ isNew = NO; // we don't delete it
+ break;
}
- else
- file.hasUnstagedChanges = YES;
-
- isNew = NO;
- break;
}
}
diff --git a/PBGitConfig.h b/PBGitConfig.h
index 9875a3c..1645819 100644
--- a/PBGitConfig.h
+++ b/PBGitConfig.h
@@ -15,5 +15,5 @@
}
- init;
-- initWithRepository:(NSString *)path;
+- initWithRepositoryPath:(NSString *)path;
@end
diff --git a/PBGitConfig.m b/PBGitConfig.m
index 3d4f156..31ea6f5 100644
--- a/PBGitConfig.m
+++ b/PBGitConfig.m
@@ -17,7 +17,7 @@ @implementation PBGitConfig
return self;
}
-- initWithRepository:(NSString *)path
+- initWithRepositoryPath:(NSString *)path
{
repositoryPath = path;
return self;
diff --git a/PBGitDefaults.h b/PBGitDefaults.h
index 84f7a18..2e2444b 100644
--- a/PBGitDefaults.h
+++ b/PBGitDefaults.h
@@ -14,5 +14,7 @@
+ (int) commitMessageViewVerticalLineLength;
+ (BOOL) isGistEnabled;
+ (BOOL) isGravatarEnabled;
++ (BOOL) confirmPublicGists;
++ (BOOL) isGistPublic;
@end
diff --git a/PBGitDefaults.m b/PBGitDefaults.m
index 6b08695..676fa72 100644
--- a/PBGitDefaults.m
+++ b/PBGitDefaults.m
@@ -12,6 +12,8 @@
#define kCommitMessageViewVerticalLineLength @"PBCommitMessageViewVerticalLineLength"
#define kEnableGist @"PBEnableGist"
#define kEnableGravatar @"PBEnableGravatar"
+#define kConfirmPublicGists @"PBConfirmPublicGists"
+#define kPublicGist @"PBGistPublic"
@implementation PBGitDefaults
@@ -24,6 +26,10 @@ + (void)initialize
forKey:kEnableGist];
[defaultValues setObject:[NSNumber numberWithBool:YES]
forKey:kEnableGravatar];
+ [defaultValues setObject:[NSNumber numberWithBool:YES]
+ forKey:kConfirmPublicGists];
+ [defaultValues setObject:[NSNumber numberWithBool:NO]
+ forKey:kPublicGist];
[[NSUserDefaults standardUserDefaults] registerDefaults:defaultValues];
}
@@ -42,4 +48,13 @@ + (BOOL) isGravatarEnabled
return [[NSUserDefaults standardUserDefaults] boolForKey:kEnableGravatar];
}
++ (BOOL) confirmPublicGists
+{
+ return [[NSUserDefaults standardUserDefaults] boolForKey:kConfirmPublicGists];
+}
+
++ (BOOL) isGistPublic
+{
+ return [[NSUserDefaults standardUserDefaults] boolForKey:kPublicGist];
+}
@end
diff --git a/PBGitGrapher.h b/PBGitGrapher.h
index d17f3bd..76be163 100644
--- a/PBGitGrapher.h
+++ b/PBGitGrapher.h
@@ -7,16 +7,19 @@
//
#import <Cocoa/Cocoa.h>
+
#import "PBGitCommit.h"
#import "PBGitGraphLine.h"
#import "PBGraphCellInfo.h"
+@class PBGitRepository;
+
@interface PBGitGrapher : NSObject {
PBGraphCellInfo *previous;
void *pl;
int curLane;
}
-- (id) initWithRepository:(PBGitRepository *)repo;
-- (void) decorateCommit:(PBGitCommit *)commit;
+- initWithRepository:(PBGitRepository *)repo;
+- (void)decorateCommit:(PBGitCommit *)commit;
@end
diff --git a/PBGitGrapher.mm b/PBGitGrapher.mm
index f9daf84..3864c87 100644
--- a/PBGitGrapher.mm
+++ b/PBGitGrapher.mm
@@ -10,6 +10,7 @@
#import "PBGitCommit.h"
#import "PBGitLane.h"
#import "PBGitGraphLine.h"
+#import "PBGitRepository.h"
#import <list>
#import "git/oid.h"
@@ -19,7 +20,7 @@ @implementation PBGitGrapher
#define MAX_LANES 32
-- (id) initWithRepository: (PBGitRepository*) repo
+- initWithRepository:(PBGitRepository *)repo
{
pl = new std::list<PBGitLane *>;
@@ -85,7 +86,7 @@ - (void) decorateCommit: (PBGitCommit *) commit
// If we already did the first parent, don't do so again
if (!didFirst && currentLanes->size() < MAX_LANES && commit.nParents) {
- PBGitLane *newLane = new PBGitLane(commit.parentShas);
+ PBGitLane *newLane = new PBGitLane(*commit.parentShas);
currentLanes->push_back(newLane);
newPos = currentLanes->size();
add_line(lines, &currentLine, 0, newPos, newPos, newLane->index());
@@ -99,7 +100,7 @@ - (void) decorateCommit: (PBGitCommit *) commit
int parentIndex;
for (parentIndex = 1; parentIndex < commit.nParents; ++parentIndex) {
- git_oid *parent = commit.parentShas + parentIndex;
+ git_oid *parent = commit.parentShas[parentIndex];
int i = 0;
BOOL was_displayed = NO;
std::list<PBGitLane *>::iterator it = currentLanes->begin();
@@ -139,7 +140,7 @@ - (void) decorateCommit: (PBGitCommit *) commit
// Update the current lane to point to the new parent
if (currentLane && commit.nParents > 0)
- currentLane->setSha(commit.parentShas[0]);
+ currentLane->setSha(*commit.parentShas[0]);
else
currentLanes->remove(currentLane);
diff --git a/PBGitHistoryController.m b/PBGitHistoryController.m
index 69a79f7..b193028 100644
--- a/PBGitHistoryController.m
+++ b/PBGitHistoryController.m
@@ -9,6 +9,7 @@
#import "PBGitHistoryController.h"
#import "CWQuickLook.h"
#import "PBGitGrapher.h"
+#import "PBGitRevList.h"
#import "PBGitRevisionCell.h"
#import "PBCommitList.h"
#define QLPreviewPanel NSClassFromString(@"QLPreviewPanel")
diff --git a/PBGitIndexController.m b/PBGitIndexController.m
index d5dbb91..a89d70f 100644
--- a/PBGitIndexController.m
+++ b/PBGitIndexController.m
@@ -145,7 +145,7 @@ - (NSString *)unstagedChangesForFile:(PBChangedFile *)file
return contents;
}
- return [commitController.repository outputInWorkdirForArguments:[NSArray arrayWithObjects:@"diff", [self contextParameter], @"--", file.path, nil]];
+ return [commitController.repository outputInWorkdirForArguments:[NSArray arrayWithObjects:@"diff-files", [self contextParameter], @"--", file.path, nil]];
}
- (void) forceRevertChangesForFiles:(NSArray *)files
diff --git a/PBGitLane.h b/PBGitLane.h
index 2a1dcd9..57d59c8 100644
--- a/PBGitLane.h
+++ b/PBGitLane.h
@@ -33,7 +33,7 @@ public:
d_index = s_colorIndex++;
}
- bool PBGitLane::isCommit(git_oid *sha) const
+ bool isCommit(git_oid *sha) const
{
return !git_oid_cmp(&d_sha, sha);
}
diff --git a/PBGitRepository.h b/PBGitRepository.h
index d3be759..75cb4f1 100644
--- a/PBGitRepository.h
+++ b/PBGitRepository.h
@@ -7,14 +7,16 @@
//
#import <Cocoa/Cocoa.h>
-#import "PBGitRevList.h"
-#import "PBGitRevSpecifier.h"
-#import "PBGitConfig.h"
+
+@class PBGitConfig;
+@class PBGitRevList;
+@class PBGitRevSpecifier;
+@class PBGitRef;
extern NSString* PBGitRepositoryErrorDomain;
@interface PBGitRepository : NSDocument {
- PBGitRevList* revisionList;
+ PBGitRevList *revisionList;
PBGitConfig *config;
BOOL hasChanged;
@@ -38,6 +40,7 @@ extern NSString* PBGitRepositoryErrorDomain;
- (NSString *)workingDirectory;
- (NSString *)gitIgnoreFilename;
+- (BOOL)isBareRepository;
- (BOOL) reloadRefs;
- (void) addRef:(PBGitRef *)ref fromParameters:(NSArray *)params;
@@ -59,8 +62,8 @@ extern NSString* PBGitRepositoryErrorDomain;
@property (assign) BOOL hasChanged;
@property (readonly) NSWindowController *windowController;
@property (readonly) PBGitConfig *config;
-@property (retain) PBGitRevList* revisionList;
-@property (assign) NSMutableArray* branches;
+@property (retain) PBGitRevList *revisionList;
+@property (assign) NSMutableArray *branches;
@property (assign) PBGitRevSpecifier *currentBranch;
-@property (retain) NSMutableDictionary* refs;
+@property (retain) NSMutableDictionary *refs;
@end
diff --git a/PBGitRepository.m b/PBGitRepository.m
index 72326ca..8637f20 100644
--- a/PBGitRepository.m
+++ b/PBGitRepository.m
@@ -10,12 +10,15 @@
#import "PBGitCommit.h"
#import "PBGitWindowController.h"
#import "PBGitBinary.h"
-
+#import "PBGitRevSpecifier.h"
#import "NSFileHandleExt.h"
#import "PBEasyPipe.h"
#import "PBGitRef.h"
#import "PBGitRevSpecifier.h"
+#import "PBGitConfig.h"
+#import "PBGitRevList.h"
+
NSString* PBGitRepositoryErrorDomain = @"GitXErrorDomain";
@implementation PBGitRepository
@@ -114,7 +117,7 @@ - (BOOL)readFromFileWrapper:(NSFileWrapper *)fileWrapper ofType:(NSString *)type
- (void) setup
{
- config = [[PBGitConfig alloc] initWithRepository:self.fileURL.path];
+ config = [[PBGitConfig alloc] initWithRepositoryPath:self.fileURL.path];
self.branches = [NSMutableArray array];
[self reloadRefs];
revisionList = [[PBGitRevList alloc] initWithRepository:self];
@@ -161,6 +164,11 @@ - (NSString*)gitIgnoreFilename
return [[self workingDirectory] stringByAppendingPathComponent:@".gitignore"];
}
+- (BOOL)isBareRepository
+{
+ return [PBGitRepository isBareRepository:[self fileURL].path];
+}
+
// Overridden to create our custom window controller
- (void)makeWindowControllers
{
diff --git a/PBGitRevList.h b/PBGitRevList.h
index 2f71c3f..4d274ff 100644
--- a/PBGitRevList.h
+++ b/PBGitRevList.h
@@ -8,17 +8,20 @@
#import <Cocoa/Cocoa.h>
+@class PBGitRepository;
+@class PBGitGrapher;
@interface PBGitRevList : NSObject {
- NSArray* commits;
- id repository;
+ NSMutableArray *commits;
+ PBGitRepository *repository;
+ PBGitGrapher *grapher;
NSString* lastSha;
}
-- initWithRepository:(id)repo;
-- (void) readCommitsForce: (BOOL) force;
-- (void) reload;
+- initWithRepository:(PBGitRepository *)repo;
+- (void)readCommitsForce:(BOOL)force;
+- (void)reload;
-@property(retain) NSArray* commits;
+@property (retain) NSMutableArray *commits;
@end
diff --git a/PBGitRevList.mm b/PBGitRevList.mm
index ba39a3a..987173a 100644
--- a/PBGitRevList.mm
+++ b/PBGitRevList.mm
@@ -7,22 +7,26 @@
//
#import "PBGitRevList.h"
+#import "PBGitGrapher.h"
+
+#import "PBRevPoolDelegate.h"
+
#import "PBGitRepository.h"
#import "PBGitCommit.h"
-#import "PBGitGrapher.h"
#import "PBGitRevSpecifier.h"
+#import "PBGitRevPool.h"
+#import "PBGitRepository.h"
#include "git/oid.h"
#include <ext/stdio_filebuf.h>
#include <iostream>
#include <string>
-
using namespace std;
@implementation PBGitRevList
@synthesize commits;
-- initWithRepository: (id) repo
+- initWithRepository:(PBGitRepository *)repo
{
repository = repo;
[repository addObserver:self forKeyPath:@"currentBranch" options:0 context:nil];
@@ -66,119 +70,21 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object
[self readCommitsForce: NO];
}
-- (void) walkRevisionListWithSpecifier: (PBGitRevSpecifier*) rev
+- (void) walkRevisionListWithSpecifier:(PBGitRevSpecifier *)rev
{
- NSDate *start = [NSDate date];
- NSMutableArray* revisions = [NSMutableArray array];
- PBGitGrapher* g = [[PBGitGrapher alloc] initWithRepository: repository];
-
- NSMutableArray* arguments;
- BOOL showSign = [rev hasLeftRight];
-
- if (showSign)
- arguments = [NSMutableArray arrayWithObjects:@"log", @"-z", @"--early-output", @"--topo-order", @"--pretty=format:%H\01%an\01%s\01%P\01%at\01%m", nil];
- else
- arguments = [NSMutableArray arrayWithObjects:@"log", @"-z", @"--early-output", @"--topo-order", @"--pretty=format:%H\01%an\01%s\01%P\01%at", nil];
-
- if (!rev)
- [arguments addObject:@"HEAD"];
- else
- [arguments addObjectsFromArray:[rev parameters]];
-
- if ([rev hasPathLimiter])
- [arguments insertObject:@"--children" atIndex:1];
-
- NSTask *task = [PBEasyPipe taskForCommand:[PBGitBinary path] withArgs:arguments inDir:[repository fileURL].path];
- [task launch];
- NSFileHandle* handle = [task.standardOutput fileHandleForReading];
-
- int fd = [handle fileDescriptor];
- __gnu_cxx::stdio_filebuf<char> buf(fd, std::ios::in);
- std::istream stream(&buf);
-
- int num = 0;
- while (true) {
- string sha;
- if (!getline(stream, sha, '\1'))
- break;
-
- // We reached the end of some temporary output. Show what we have
- // until now, and then start again. The sha of the next thing is still
- // in this buffer. So, we use a substring of current input.
- if (sha[1] == 'i') // Matches 'Final output'
- {
- num = 0;
- [self performSelectorOnMainThread:@selector(setCommits:) withObject:revisions waitUntilDone:NO];
- g = [[PBGitGrapher alloc] initWithRepository: repository];
- revisions = [NSMutableArray array];
-
- sha = sha.substr(sha.length() - 40, 40);
- }
-
- // From now on, 1.2 seconds
- git_oid oid;
- git_oid_mkstr(&oid, sha.c_str());
- PBGitCommit* newCommit = [[PBGitCommit alloc] initWithRepository:repository andSha:oid];
-
- string author;
- getline(stream, author, '\1');
-
- string subject;
- getline(stream, subject, '\1');
-
- string parentString;
- getline(stream, parentString, '\1');
- if (parentString.size() != 0)
- {
- if (((parentString.size() + 1) % 41) != 0) {
- NSLog(@"invalid parents: %i", parentString.size());
- continue;
- }
- int nParents = (parentString.size() + 1) / 41;
- git_oid *parents = (git_oid *)malloc(sizeof(git_oid) * nParents);
- int parentIndex;
- for (parentIndex = 0; parentIndex < nParents; ++parentIndex)
- git_oid_mkstr(parents + parentIndex, parentString.substr(parentIndex * 41, 40).c_str());
-
- newCommit.parentShas = parents;
- newCommit.nParents = nParents;
- }
-
- int time;
- stream >> time;
-
-
- [newCommit setSubject:[NSString stringWithUTF8String:subject.c_str()]];
- [newCommit setAuthor:[NSString stringWithUTF8String:author.c_str()]];
- [newCommit setTimestamp:time];
-
- if (showSign)
- {
- char c;
- stream >> c; // Remove separator
- stream >> c;
- if (c != '>' && c != '<' && c != '^' && c != '-')
- NSLog(@"Error loading commits: sign not correct");
- [newCommit setSign: c];
- }
-
- char c;
- stream >> c;
- if (c != '\0')
- cout << "Error" << endl;
-
- [revisions addObject: newCommit];
- [g decorateCommit: newCommit];
-
- if (++num % 1000 == 0)
- [self performSelectorOnMainThread:@selector(setCommits:) withObject:revisions waitUntilDone:NO];
- }
-
- NSTimeInterval duration = [[NSDate date] timeIntervalSinceDate:start];
- NSLog(@"Loaded %i commits in %f seconds", num, duration);
- // Make sure the commits are stored before exiting.
- [self performSelectorOnMainThread:@selector(setCommits:) withObject:revisions waitUntilDone:YES];
- [task waitUntilExit];
+ commits = [NSMutableArray array];
+ grapher = [[PBGitGrapher alloc] initWithRepository:repository];
+ PBGitRevPool *pool = [[PBGitRevPool alloc] initWithRepository:repository];
+ pool.delegate = self;
+ [pool loadRevisions:rev];
+ [self performSelectorOnMainThread:@selector(setCommits:) withObject:commits waitUntilDone:YES];
+}
+
+
+- (void)revPool:(PBGitRevPool *)pool encounteredCommit:(PBGitCommit *)commit
+{
+ [commits addObject: commit];
+ [grapher decorateCommit: commit];
}
@end
diff --git a/PBGitRevPool.h b/PBGitRevPool.h
new file mode 100644
index 0000000..7c834eb
--- /dev/null
+++ b/PBGitRevPool.h
@@ -0,0 +1,35 @@
+//
+// PBGitRevPool.h
+// GitX
+//
+// Created by Pieter de Bie on 29-03-09.
+// Copyright 2009 Pieter de Bie. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+#include "git/oid.h"
+
+@class PBGitRepository;
+@class PBGitCommit;
+@class PBGitRevSpecifier;
+
+@interface PBGitRevPool : NSObject {
+ PBGitRepository *repository;
+ __weak id delegate;
+ NSMapTable *revisions;
+}
+
+@property (assign) __weak id delegate;
+
+- initWithRepository:(PBGitRepository *)repo;
+- (void)loadRevisions:(PBGitRevSpecifier *)revisions;
+
+- (PBGitCommit *)commitWithSha:(NSString *)sha;
+- (PBGitCommit *)commitWithOid:(git_oid *)oid;
+@end
+
+@interface NSObject(PBRevPoolDelegate)
+
+- (void)revPool:(PBGitRevPool *)pool encounteredCommit:(PBGitCommit *)commit;
+
+@end
diff --git a/PBGitRevPool.mm b/PBGitRevPool.mm
new file mode 100644
index 0000000..1a3bc3e
--- /dev/null
+++ b/PBGitRevPool.mm
@@ -0,0 +1,165 @@
+//
+// PBGitRevPool.m
+// GitX
+//
+// Created by Pieter de Bie on 29-03-09.
+// Copyright 2009 Pieter de Bie. All rights reserved.
+//
+
+#import "PBGitRevSpecifier.h"
+#import "PBGitRevPool.h"
+#import "PBGitCommit.h"
+#import "PBGitRepository.h"
+#import "PBEasyPipe.h"
+#import "PBGitBinary.h"
+#import "PBRevPoolDelegate.h"
+
+#include "git/oid.h"
+#include <ext/stdio_filebuf.h>
+#include <iostream>
+#include <string>
+
+using namespace std;
+
+@implementation PBGitRevPool
+
+@synthesize delegate;
+
+NSUInteger git_oid_size(const void *item)
+{
+ git_oid *oid = (git_oid *)item;
+ return sizeof(*oid);
+}
+
+- initWithRepository:(PBGitRepository *)repo
+{
+ if (![super init])
+ return nil;
+
+ repository = repo;
+ NSPointerFunctions *keyFunctions = [NSPointerFunctions pointerFunctionsWithOptions:NSPointerFunctionsOpaqueMemory|NSPointerFunctionsStructPersonality];
+ keyFunctions.sizeFunction = git_oid_size;
+ NSPointerFunctions *valueFunction = [NSPointerFunctions pointerFunctionsWithOptions:NSPointerFunctionsStrongMemory|NSPointerFunctionsObjectPersonality];
+ revisions = [[NSMapTable alloc] initWithKeyPointerFunctions:keyFunctions valuePointerFunctions:valueFunction capacity:100];
+ return self;
+}
+
+- (void)loadRevisions:(PBGitRevSpecifier *)rev
+{
+ NSDate *start = [NSDate date];
+
+ NSMutableArray* arguments = [NSMutableArray arrayWithObjects:@"log", @"-z", @"--pretty=format:%H\01%an\01%s\01%P\01%at", nil];
+
+ if (!rev)
+ [arguments addObject:@"HEAD"];
+ else
+ [arguments addObjectsFromArray:[rev parameters]];
+
+ NSTask *task = [PBEasyPipe taskForCommand:[PBGitBinary path] withArgs:arguments inDir:[repository fileURL].path];
+ [task launch];
+ NSFileHandle *handle = [task.standardOutput fileHandleForReading];
+ int fd = [handle fileDescriptor];
+ __gnu_cxx::stdio_filebuf<char> buf(fd, std::ios::in);
+ std::istream stream(&buf);
+
+ int num = 0;
+ while (true) {
+ string sha;
+ if (!getline(stream, sha, '\1'))
+ break;
+
+ // From now on, 1.2 seconds
+ git_oid *oid = (git_oid *)malloc(sizeof(git_oid));
+ CFRetain(oid);
+ git_oid_mkstr(oid, sha.c_str());
+ PBGitCommit *newCommit = [[PBGitCommit alloc] initWithRepository:repository andSha:oid];
+
+ string author;
+ getline(stream, author, '\1');
+
+ string subject;
+ getline(stream, subject, '\1');
+
+ string parentString;
+ getline(stream, parentString, '\1');
+ if (parentString.size() != 0)
+ {
+ if (((parentString.size() + 1) % 41) != 0) {
+ NSLog(@"invalid parents: %i", parentString.size());
+ continue;
+ }
+ int nParents = (parentString.size() + 1) / 41;
+ git_oid **parents = (git_oid **)malloc(sizeof(git_oid *) * nParents);
+ int parentIndex;
+ for (parentIndex = 0; parentIndex < nParents; ++parentIndex) {
+ git_oid *p_id = (git_oid *)malloc(sizeof(git_oid));
+ git_oid_mkstr(p_id, parentString.substr(parentIndex * 41, 40).c_str());
+ git_oid *existingKey;
+ void *a;
+ if (NSMapMember(revisions, p_id, (void **)&existingKey, &a))
+ {
+ parents[parentIndex] = existingKey;
+ free(p_id);
+ } else {
+ NSMapInsertKnownAbsent(revisions, p_id, NULL);
+ parents[parentIndex] = p_id;
+ }
+
+ //NSLog(@"Parent: %i", parents[parentIndex]);
+
+ }
+
+ newCommit.parentShas = parents;
+ newCommit.nParents = nParents;
+ }
+
+ int time;
+ stream >> time;
+
+
+ [newCommit setSubject:[NSString stringWithUTF8String:subject.c_str()]];
+ [newCommit setAuthor:[NSString stringWithUTF8String:author.c_str()]];
+ [newCommit setTimestamp:time];
+
+ char c;
+ stream >> c;
+ if (c != '\0')
+ cout << "Error" << endl;
+
+ ++num;
+ NSMapInsert(revisions, oid, newCommit);
+ if (delegate)
+ [delegate revPool:self encounteredCommit:newCommit];
+ }
+
+ NSTimeInterval duration = [[NSDate date] timeIntervalSinceDate:start];
+ NSLog(@"Loaded %i commits in %f seconds", num, duration);
+
+ [task waitUntilExit];
+}
+
+- (void)listCommits
+{
+ NSEnumerator *enumerator = [revisions objectEnumerator];
+ id value;
+ int i = 0;
+ while ((value = [enumerator nextObject])) {
+ i++;
+ NSLog(@"Commit: %@", [value realSha]);
+ }
+}
+
+- (PBGitCommit *)commitWithSha:(NSString *)sha
+{
+ git_oid oid;
+ git_oid_mkstr(&oid, [sha UTF8String]);
+ return (PBGitCommit *)NSMapGet(revisions, &oid);
+}
+
+- (PBGitCommit *)commitWithOid:(git_oid *)oid
+{
+ NSAssert(oid, @"We need a parent");
+
+ return (PBGitCommit *)NSMapGet(revisions, oid);
+}
+@end
diff --git a/PBGitRevisionCell.m b/PBGitRevisionCell.m
index 83bf906..c50760e 100644
--- a/PBGitRevisionCell.m
+++ b/PBGitRevisionCell.m
@@ -7,6 +7,7 @@
//
#import "PBGitRevisionCell.h"
+#import "PBGitRevSpecifier.h"
#import "PBGitRef.h"
#import "RoundedRectangle.h"
@@ -229,7 +230,7 @@ - (void) drawWithFrame: (NSRect) rect inView:(NSView *)view
}
- if ([self.objectValue refs])
+ if ([self.objectValue refs] && [[self.objectValue refs] count])
[self drawRefsInRect:&rect];
// Still use this superclass because of hilighting differences
diff --git a/PBGitTree.m b/PBGitTree.m
index be0011e..d871d55 100644
--- a/PBGitTree.m
+++ b/PBGitTree.m
@@ -94,7 +94,7 @@ - (void) saveToFolder: (NSString *) dir
[data writeToFile:newName atomically:YES];
} else { // Directory
[[NSFileManager defaultManager] createDirectoryAtPath:newName attributes:nil];
- for (PBGitTree* child in children)
+ for (PBGitTree* child in [self children])
[child saveToFolder: newName];
}
}
diff --git a/PBGitWindowController.m b/PBGitWindowController.m
index 8314feb..9f1a93e 100644
--- a/PBGitWindowController.m
+++ b/PBGitWindowController.m
@@ -41,10 +41,16 @@ - (void)windowWillClose:(NSNotification *)notification
[commitViewController removeView];
}
+- (BOOL)validateMenuItem:(NSMenuItem *)menuItem
+{
+ if ([menuItem action] == @selector(showCommitView:) || [menuItem action] == @selector(showHistoryView:)) {
+ return ![repository isBareRepository];
+ }
+ return YES;
+}
+
- (void) setSelectedViewIndex: (int) i
{
- selectedViewIndex = i;
- [[NSUserDefaults standardUserDefaults] setInteger:i forKey:@"selectedViewIndex"];
[self changeViewController: i];
}
@@ -55,6 +61,14 @@ - (void)changeViewController:(NSInteger)whichViewTag
if (viewController != nil)
[[viewController view] removeFromSuperview];
+ if ([repository isBareRepository]) { // in bare repository we don't want to view commit
+ whichViewTag = 0; // even if it was selected by default
+ }
+
+ // Set our default here because we might have changed it (based on bare repo) before
+ selectedViewIndex = whichViewTag;
+ [[NSUserDefaults standardUserDefaults] setInteger:whichViewTag forKey:@"selectedViewIndex"];
+
switch (whichViewTag)
{
case 0: // swap in the "CustomImageViewController - NSImageView"
@@ -85,6 +99,7 @@ - (void)changeViewController:(NSInteger)whichViewTag
// Allow the viewcontroller to catch actions
[self setNextResponder: viewController];
[self didChangeValueForKey:@"viewController"]; // this will trigger the NSTextField's value binding to change
+
}
- (void)awakeFromNib
@@ -112,8 +127,15 @@ - (void) showHistoryView:(id)sender
- (void) useToolbar:(NSToolbar *)toolbar
{
- NSSegmentedControl *item = (NSSegmentedControl *)[[[toolbar items] objectAtIndex:0] view];
+ NSSegmentedControl *item = nil;
+ for (NSToolbarItem *toolbarItem in [toolbar items]) {
+ if ([[toolbarItem view] isKindOfClass:[NSSegmentedControl class]]) {
+ item = (NSSegmentedControl *)[toolbarItem view];
+ break;
+ }
+ }
[item bind:@"selectedIndex" toObject:self withKeyPath:@"selectedViewIndex" options:0];
+ [item setEnabled: ![repository isBareRepository]];
[self.window setToolbar:toolbar];
}
diff --git a/PBRefController.m b/PBRefController.m
index 0e1bfce..1d90c53 100644
--- a/PBRefController.m
+++ b/PBRefController.m
@@ -9,6 +9,7 @@
#import "PBRefController.h"
#import "PBGitRevisionCell.h"
#import "PBRefMenuItem.h"
+#import "PBGitRevSpecifier.h"
@implementation PBRefController
@@ -37,15 +38,22 @@ - (void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(
- (void) removeRef:(PBRefMenuItem *) sender
{
- int ret = 1;
- [historyController.repository outputForArguments:[NSArray arrayWithObjects:@"update-ref", @"-d", [[sender ref] ref], nil] retValue: &ret];
- if (ret) {
- NSLog(@"Removing ref failed!");
- return;
- }
+ NSString *ref_desc = [NSString stringWithFormat:@"%@ %@", [[sender ref] type], [[sender ref] shortName]];
+ NSString *question = [NSString stringWithFormat:@"Are you sure you want to remove the %@?", ref_desc];
+ int choice = NSRunAlertPanel([NSString stringWithFormat:@"Delete %@?", ref_desc], question, @"Delete", @"Cancel", nil);
+ // TODO: Use a non-modal alert here, so we don't block all the GitX windows
+
+ if(choice) {
+ int ret = 1;
+ [historyController.repository outputForArguments:[NSArray arrayWithObjects:@"update-ref", @"-d", [[sender ref] ref], nil] retValue: &ret];
+ if (ret) {
+ NSLog(@"Removing ref failed!");
+ return;
+ }
- [[sender commit] removeRef:[sender ref]];
- [commitController rearrangeObjects];
+ [[sender commit] removeRef:[sender ref]];
+ [commitController rearrangeObjects];
+ }
}
- (void) checkoutRef:(PBRefMenuItem *)sender
diff --git a/PBRepositoryDocumentController.m b/PBRepositoryDocumentController.m
index 4b7519c..1adb8e0 100644
--- a/PBRepositoryDocumentController.m
+++ b/PBRepositoryDocumentController.m
@@ -9,6 +9,8 @@
#import "PBRepositoryDocumentController.h"
#import "PBGitRepository.h"
#import "PBGitRevList.h"
+#import "PBEasyPipe.h"
+#import "PBGitBinary.h"
@implementation PBRepositoryDocumentController
// This method is overridden to configure the open panel to only allow
@@ -46,4 +48,36 @@ - (id) documentForLocation:(NSURL*) url
return document;
}
+
+
+- (IBAction)newDocument:(id)sender
+{
+ NSOpenPanel *op = [NSOpenPanel openPanel];
+
+ [op setCanChooseFiles:NO];
+ [op setCanChooseDirectories:YES];
+ [op setAllowsMultipleSelection:NO];
+ [op setMessage:@"Initialize a repository here:"];
+ [op setTitle:@"New Repository"];
+ if ([op runModal] == NSFileHandlingPanelOKButton)
+ {
+ NSString *path = [op filename];
+ NSInteger terminationStatus;
+ NSString *result = [PBEasyPipe outputForCommand:[PBGitBinary path] withArgs:[NSArray arrayWithObjects:@"init", @"-q", nil] inDir:path inputString:nil retValue:&terminationStatus];
+
+ if (terminationStatus == 0)
+ [self openDocumentWithContentsOfURL:[op URL] display:YES error:NULL];
+ else
+ NSRunAlertPanel(@"Failed to create new Git repository", @"Git returned the following error when trying to create the repository: %@", nil, nil, nil, result);
+ }
+}
+
+
+- (BOOL)validateMenuItem:(NSMenuItem *)item
+{
+ if ([item action] == @selector(newDocument:))
+ return ([PBGitBinary path] != nil);
+ return [super validateMenuItem:item];
+}
+
@end
diff --git a/PBWebController.m b/PBWebController.m
index b9d472d..d185593 100644
--- a/PBWebController.m
+++ b/PBWebController.m
@@ -127,6 +127,10 @@ - (BOOL) isFeatureEnabled:(NSString *)feature
return [PBGitDefaults isGravatarEnabled];
else if([feature isEqualToString:@"gist"])
return [PBGitDefaults isGistEnabled];
+ else if([feature isEqualToString:@"confirmGist"])
+ return [PBGitDefaults confirmPublicGists];
+ else if([feature isEqualToString:@"publicGist"])
+ return [PBGitDefaults isGistPublic];
else
return YES;
}
diff --git a/PBWebHistoryController.m b/PBWebHistoryController.m
index 616655c..d1d70a9 100644
--- a/PBWebHistoryController.m
+++ b/PBWebHistoryController.m
@@ -7,6 +7,7 @@
//
#import "PBWebHistoryController.h"
+#import "PBGitRevSpecifier.h"
@implementation PBWebHistoryController
diff --git a/Site/Rakefile b/Site/Rakefile
index cbad8c3..b225469 100644
--- a/Site/Rakefile
+++ b/Site/Rakefile
@@ -3,14 +3,16 @@ require 'erb'
task :generate => [:generate_usermanual] do
require 'rdiscount'
+ require 'lib/release_notes'
+
`rm -rf output`
FileUtils.mkdir("output")
`cat text/*.markdown > output/UserManual.markdown`
`cp -r assets/* output`
- template = ERB.new(File.read("template.html"))
+ template = ERB.new(File.read("templates/site.html"))
- source = Dir.glob("text/*.markdown").each do |file|
+ Dir.glob("text/*.markdown").each do |file|
contents = File.read(file)
@body = Markdown.new(ERB.new(contents).result(binding)).to_html
@filename = File.basename(file).gsub(/markdown$/,"html")
@@ -48,6 +50,18 @@ task :generate_usermanual do
end
end
+task :generate_appcast do
+ require 'lib/release_notes.rb'
+ require 'rdiscount'
+ FileUtils.mkdir_p("output/Downloads")
+ template = ERB.new(File.read("templates/sparkle.xml"))
+
+ filename = ENV["STABLE"] ? "appcast.xml" : "appcast_DEBUG.xml"
+ File.open("output/Downloads/#{filename}", "w") do |f|
+ f.puts template.result(binding)
+ end
+end
+
task :upload do
`rsync -a output/ sydney:public_html/gitx/`
end
\ No newline at end of file
diff --git a/Site/UserManual/text/03 - Committing.markdown b/Site/UserManual/text/03 - Committing.markdown
index 4ff6fab..67534c3 100644
--- a/Site/UserManual/text/03 - Committing.markdown
+++ b/Site/UserManual/text/03 - Committing.markdown
@@ -30,3 +30,4 @@ If the hunk isn't specific enough, you can decrease the context size by manipula
#### Committing
Once you have staged all your changes, you can commit them. Enter a commit message in the center pane, but remember to use proper commit messages: your first line should be a short description of what you have changed, on which you can elaborate below that. Make sure the subject of your commit is short enough to fit in GitX's history view! Pressing the commit button will hopefully convey to you that the commit was successful, and also give you the commit hash.
+The 'Amend' checkbox does what `git commit --amend` does: It enables you to amend the commit on the tip of the current branch. Checking 'Amend' will give you the commit-message of mentioned commit and also will display all of the changes the commit introduced as staged in the right-hand pane. You may then stage/unstage further changes, change the commit-message and hit 'Commit'.
diff --git a/Site/assets/Downloads/appcast.xml b/Site/assets/Downloads/appcast.xml
deleted file mode 100644
index 66caa12..0000000
--- a/Site/assets/Downloads/appcast.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" version="2.0">
- <channel>
- <title>GitX</title>
- <link>http://github.com/pieter/gitx/wikis</link>
- <description>A more native clone of Gitk for OS X</description>
-
-
- <item>
- <title>GitX 0.6.1</title>
- <pubDate>Thu, 29 Jan 2009 23:54:01 GMT</pubDate>
- <enclosure url="http://frim.frim.nl/GitXStable.app.zip" length="1531595" type="application/octet-stream" sparkle:version="0.6.1"/>
- <description>
- <![CDATA[
- <h1>GitX 0.6.1</h1>
- <div style='font-size: 70%'>
- <p>This is a bugfix release. The following bugs have been fixed:</p>
-
- <ul>
- <li>The commit view shows new files with linebreaks</li>
- <li>The history view works with Git >= 1.5.4 again</li>
- <li>Reloading the detailed view in the History no longer causes an empty page</li>
- </ul>
-
- <p>Version 0.6 has the following new features and enhancements:</p>
-
- <ul>
- <li>The diff display now looks much nicer, using boxes to segment files</li>
- <li>The toolbar can now me customized</li>
- <li>Images that have been changed or added in a commit can now be viewed
- inline in GitX</li>
- <li>GitX has gained a preference pane which allows you to specify a git path
- and disable the Gist and Gravatar integration</li>
- <li>The commit interface is now more intuitive. Particularly, you can now
- select multiple files and use drag and drop to stage / unstage files</li>
- <li>You can now drag and drop files out of the commit view</li>
- <li>The files in the commit view have gained a context menu that allows you
- to revert changes / open the file / ignore the file</li>
- <li>It is now possible to adjust the amount of context lines in the commit view.
- Using a smaller context size allows you to do more fine-grained commits</li>
- <li>The branch menu is now organized in branches/remotes/tags</li>
- <li>The view switch button now uses icons rather than words</li>
- <li>The view shortcuts have changed to use command 1/2 for the history/commit
- view. The history&#8217;s subviews can now be changed using command-option-1/2/3</li>
- <li>Listing commits has become much faster</li>
- <li>GitX no longer spawns zombie processes</li>
- <li>GitX now shows a list of files that have been changed in a commit</li>
- <li>GitX now uses libgit2 to store object id&#8217;s, reducing it&#8217;s memory footprint</li>
- </ul>
-
- <p>In addition many bugs were fixed, including the correct calculation of a
- gravatar MD5 hash.</p>
- </div>
- ]]>
- </description>
- </item>
-
- </channel>
-</rss>
diff --git a/Site/lib/release_notes.rb b/Site/lib/release_notes.rb
new file mode 100644
index 0000000..8ff598b
--- /dev/null
+++ b/Site/lib/release_notes.rb
@@ -0,0 +1,50 @@
+#!/usr/bin/ruby
+
+RELEASE_NOTES_PATH = File.join(File.dirname(__FILE__), "..", "..", "Documentation", "ReleaseNotes")
+
+module ReleaseNotes
+
+ VERSION_MATCH = /v([0-9.]*).txt$/
+
+ # Find all release not files
+ def self.release_files
+ notes = Dir.glob(File.join(RELEASE_NOTES_PATH, "v*.txt"))
+
+ # Sort files by version number
+ notes.sort do |x,y|
+ x = x.match VERSION_MATCH
+ y = y.match VERSION_MATCH
+ # Puts nonmatching files at the bottom
+ if !x && y
+ 1
+ elsif !y && x
+ -1
+ else
+ # compare version strings, newest at the top
+ y[1].split(".").map { |a| a.to_i } <=> x[1].split(".").map { |a| a.to_i }
+ end
+ end
+ end
+
+ # Aggregate all release notes in a string
+ def self.aggregate_notes
+ file = ""
+ release_files.each do |x|
+ file << File.read(x)
+ file << "\n"
+ end
+ file
+ end
+
+ def self.last_version
+ last_file = release_files.first
+ if last_file =~ VERSION_MATCH
+ return $1
+ end
+ nil
+ end
+
+ def self.last_notes
+ File.read(release_files.first)
+ end
+end
\ No newline at end of file
diff --git a/Site/template.html b/Site/template.html
deleted file mode 100644
index c1001b6..0000000
--- a/Site/template.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<%
-def create_link(name, description)
- "<a href='#{name}.html' class='#{name == @filename.gsub(".html", "") ? 'here' : ''}'>#{description}</a>"
-end
- %>
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
-<html>
- <head>
- <title>
- GitX - <%= @title %>
- </title>
- <link rel="stylesheet" href="css/master.css" type="text/css" media="screen" title="Main Style" charset="utf-8" />
- <link rel="shortcut icon" href="images/favicon.png" type="image/x-icon">
- <link href="http://gitx.frim.nl/Downloads/appcast.xml" rel="alternate" type="application/rss+xml" title="GitX Application Update Feed" />
-
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- </head>
- <body>
- <div id="container">
- <div id="header">
- GitX
- </div>
- <div id="nav">
- <%= create_link("index", "Home") %>
- <%= create_link "seeit", "See it" %>
- <%= create_link "contribute", "Contribute" %>
- <%= create_link 'release_history', "Release History" %>
- <%= create_link 'user_manual', "User Manual" %>
- <%= create_link 'links', "Links" %>
- <%= create_link 'contact', "Contact" %>
- </div>
- <!-- <div id="subnav">
- <a href="#">Home</a>
- <a href="#">Screenshots</a>
- <a href="#">Movies</a>
- <a href="#">Open Source</a>
- <a href="#">About</a>
- </div> -->
- <div id="content">
- <%= @body %>
- </div>
- <div id="footer">
- © Some rights reserved. <a href="http://github.com/pieter/gitx/tree/master/COPYING" title="GPL">GPL v2</a>. <a href="mailto:frimmirf+gitx@gmail.com">Pieter de Bie</a> is the GitX maintainer. Website design by <a href="http://www.ai.rug.nl/~kdoes/index.php?id=webdesign">Kim Does</a>.
- </div>
- </div>
- <script type="text/javascript">
- var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
- document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
- </script>
- <script type="text/javascript">
- var pageTracker = _gat._getTracker("UA-4534244-3");
- pageTracker._trackPageview();
- </script>
- </body>
-</html>
diff --git a/Site/templates/site.html b/Site/templates/site.html
new file mode 100644
index 0000000..c1001b6
--- /dev/null
+++ b/Site/templates/site.html
@@ -0,0 +1,55 @@
+<%
+def create_link(name, description)
+ "<a href='#{name}.html' class='#{name == @filename.gsub(".html", "") ? 'here' : ''}'>#{description}</a>"
+end
+ %>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+ <head>
+ <title>
+ GitX - <%= @title %>
+ </title>
+ <link rel="stylesheet" href="css/master.css" type="text/css" media="screen" title="Main Style" charset="utf-8" />
+ <link rel="shortcut icon" href="images/favicon.png" type="image/x-icon">
+ <link href="http://gitx.frim.nl/Downloads/appcast.xml" rel="alternate" type="application/rss+xml" title="GitX Application Update Feed" />
+
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ </head>
+ <body>
+ <div id="container">
+ <div id="header">
+ GitX
+ </div>
+ <div id="nav">
+ <%= create_link("index", "Home") %>
+ <%= create_link "seeit", "See it" %>
+ <%= create_link "contribute", "Contribute" %>
+ <%= create_link 'release_history', "Release History" %>
+ <%= create_link 'user_manual', "User Manual" %>
+ <%= create_link 'links', "Links" %>
+ <%= create_link 'contact', "Contact" %>
+ </div>
+ <!-- <div id="subnav">
+ <a href="#">Home</a>
+ <a href="#">Screenshots</a>
+ <a href="#">Movies</a>
+ <a href="#">Open Source</a>
+ <a href="#">About</a>
+ </div> -->
+ <div id="content">
+ <%= @body %>
+ </div>
+ <div id="footer">
+ © Some rights reserved. <a href="http://github.com/pieter/gitx/tree/master/COPYING" title="GPL">GPL v2</a>. <a href="mailto:frimmirf+gitx@gmail.com">Pieter de Bie</a> is the GitX maintainer. Website design by <a href="http://www.ai.rug.nl/~kdoes/index.php?id=webdesign">Kim Does</a>.
+ </div>
+ </div>
+ <script type="text/javascript">
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+ </script>
+ <script type="text/javascript">
+ var pageTracker = _gat._getTracker("UA-4534244-3");
+ pageTracker._trackPageview();
+ </script>
+ </body>
+</html>
diff --git a/Site/templates/sparkle.xml b/Site/templates/sparkle.xml
new file mode 100644
index 0000000..0f44e31
--- /dev/null
+++ b/Site/templates/sparkle.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" version="2.0">
+ <channel>
+ <title>GitX</title>
+ <link>http://github.com/pieter/gitx/wikis</link>
+ <description>A more native clone of Gitk for OS X</description>
+
+
+ <item>
+ <title>GitX <%= ReleaseNotes::last_version %></title>
+ <pubDate>Thu, 29 Jan 2009 23:54:01 GMT</pubDate>
+ <enclosure url="http://frim.frim.nl/GitXStable.app.zip" length="1531595" type="application/octet-stream" sparkle:version="<%= ReleaseNotes::last_version %>"/>
+ <description>
+ <![CDATA[
+ <style>
+ body {
+ font-size: 70%;
+ }
+ h1 {
+ font-size: 160%;
+ }
+ </style>
+ <%= Markdown.new(ReleaseNotes::last_notes).to_html %>
+ ]]>
+ </description>
+ </item>
+
+ </channel>
+</rss>
diff --git a/Site/text/index.markdown b/Site/text/index.markdown
index cd56c8b..c8bea36 100644
--- a/Site/text/index.markdown
+++ b/Site/text/index.markdown
@@ -2,7 +2,7 @@
<div class="nohover" id="download">
<a href="http://frim.frim.nl/GitXStable.app.zip" title="Latest GitX download" id="download_link" class="nohover">
Download GitX
- <div id="version">Version 0.6.1</div>
+ <div id="version">Version <%= ReleaseNotes::last_version %></div>
</a>
<p id="donate_link">(you can help GitX by <a href="http://www.pledgie.com/campaigns/1816">donating</a>)</p>
</div>
@@ -37,7 +37,7 @@ then in silky smooth OS X style!</p>
Download
</h3>
<p>
- The newest version of GitX is 0.6.1. This version can be downloaded from <a href="http://frim.frim.nl/GitXStable.app.zip">here</a>. To see what has changed, read the <a href="release_history.html">Release History</a>.
+ The newest version of GitX is <%= ReleaseNotes::last_version %>. This version can be downloaded from <a href="http://frim.frim.nl/GitXStable.app.zip">here</a>. To see what has changed, read the <a href="release_history.html">Release History</a>.
</p>
<p>
After you have started it once, you can install the command-line tool through the menu (GitX-&gt;Enable Terminal Usage…). This will install a “gitx” binary in /usr/local/bin.
diff --git a/Site/text/release_history.markdown b/Site/text/release_history.markdown
index 9b95961..1909539 100644
--- a/Site/text/release_history.markdown
+++ b/Site/text/release_history.markdown
@@ -3,105 +3,4 @@
Release history
</h2>
-### Changes in v0.6.1:
-
-This is a bugfix release. The following bugs have been fixed:
-
-* The commit view shows new files with linebreaks
-* The history view works with Git >= 1.5.4 again
-* Reloading the detailed view in the History no longer causes an empty page
-
-### Changes in v0.6
-
-This release has the following new features and enhancements:
-
-* The diff display now looks much nicer, using boxes to segment files
-* The toolbar can now me customized
-* Images that have been changed or added in a commit can now be viewed
- inline in GitX
-* GitX has gained a preference pane which allows you to specify a git path
- and disable the Gist and Gravatar integration
-* The commit interface is now more intuitive. Particularly, you can now
- select multiple files and use drag and drop to stage / unstage files
-* You can now drag and drop files out of the commit view
-* The files in the commit view have gained a context menu that allows you
- to revert changes / open the file / ignore the file
-* It is now possible to adjust the amount of context lines in the commit view.
- Using a smaller context size allows you to do more fine-grained commits
-* The branch menu is now organized in branches/remotes/tags
-* The view switch button now uses icons rather than words
-* The view shortcuts have changed to use command 1/2 for the history/commit
- view. The history's subviews can now be changed using command-option-1/2/3
-* Listing commits has become much faster
-* GitX no longer spawns zombie processes
-* GitX now shows a list of files that have been changed in a commit
-* GitX now uses libgit2 to store object id's, reducing it's memory footprint
-
-In addition many bugs were fixed, including the correct calculation of a
-gravatar MD5 hash.
-
-### Changes in v0.5
-
-This feature release has several new smaller or larger features:
-
-* The current branch is now highlighted
-* In the commit view, there is an option to amend commits
-* The "Gist it" button now respects github.user/token
-* Display a gravatar of the committer
-* The commit message view now displays a vertical line at 50 characters
-* It is now possible to revert changes by using the context menu in the
- commit view
-* You can now stage only parts of a file by using the "Stage Hunk" buttons
- in the commit view
-* You can now use GitX to show a diff of anything, for example by using
- 'gitx --diff HEAD^^' or 'git diff HEAD~3 | gitx --diff'
-* You can now drag and drop refs to move them and also create branches
-
-In addition, the following bugs have been fixed:
-
-* Better detection of git version
-* Branch lines are no longer interspersed with half a pixel of whitespace
-* The toolbar keeps its state when switching views
-
-<h3>Changes in v0.4.1:</h3>
-<ul>
-<li>The diff display is now much faster</li>
- <li>More locations are now searched for a default git</li>
- <li>Code pasted online is now private</li>
-
-</ul>
-<h3>Changes in v0.4:</h3>
-<ul>
-<li>A new commitview, allowing you to selectively add changes and commit them.</li>
- <li>You can now upload a commit as a patch to gist.github.com</li>
-
- <li>GitX now searches for your git binary in more directories and is smarter
- about reporting errors regarding git paths.</li>
- <li>You can now remove branches by right-clicking on them in the detailed view</li>
- <li>GitX now comes with a spicy new icon</li>
- <li>The diff view has become prettier and now also highlights trailing
- whitespace.</li>
- <li>Various little changes and stability improvement</li>
-</ul>
-<h3>Changes in v0.3:</h3>
-<ul>
-<li>You can now pass on command-line arguments just like you can with ‘git log’</li>
- <li>The program has an icon</li>
- <li>Also displays remote branches in the branch list</li>
-
- <li>Is better in determining if a directory is a bare git repository</li>
- <li>Support for—left-right: use ‘gitx—left-right <span class="caps">HEAD</span>..origin/master’
- to see which commits are only on your branch or on their branch</li>
- <li>Navigate through changed hunks by using j/k keys</li>
- <li>Scroll down in webview by using space / shift-space</li>
-</ul>
-
-<h3>Changes in v0.2.1:</h3>
-<ul>
-<li>Added supercool auto-update feature (Sparkle)</li>
-</ul>
-<h3>Changes in v0.2</h3>
-<ul>
-<li>Branch lines now have colors</li>
-<li>Ref labels added to commits</li>
-</ul>
+<%= ReleaseNotes::aggregate_notes %>
\ No newline at end of file
diff --git a/gitx.mm b/gitx.mm
index 65829e0..fbd5411 100644
--- a/gitx.mm
+++ b/gitx.mm
@@ -74,6 +74,16 @@ void version_info()
exit(1);
}
+void git_path()
+{
+ if (![PBGitBinary path])
+ exit(101);
+
+ NSString *path = [[PBGitBinary path] stringByDeletingLastPathComponent];
+ printf("%s", [path UTF8String]);
+ exit(0);
+}
+
void handleSTDINDiff(id<GitXCliToolProtocol> proxy)
{
NSFileHandle *handle = [NSFileHandle fileHandleWithStandardInput];
@@ -106,6 +116,8 @@ int main(int argc, const char** argv)
usage(argv[0]);
if (argc >= 2 && (!strcmp(argv[1], "--version") || !strcmp(argv[1], "-v")))
version_info();
+ if (argc >= 2 && !strcmp(argv[1], "--git-path"))
+ git_path();
if (![PBGitBinary path]) {
printf("%s\n", [[PBGitBinary notFoundError] cStringUsingEncoding:NSUTF8StringEncoding]);
diff --git a/html/lib/diffHighlighter.js b/html/lib/diffHighlighter.js
index 8f51c5d..1a7663e 100644
--- a/html/lib/diffHighlighter.js
+++ b/html/lib/diffHighlighter.js
@@ -67,10 +67,12 @@ var highlightDiff = function(diff, element, callbacks) {
return; // so printing the filename in the file-list is enough
}
- finalContent += '<div class="file" id="file_index_' + (file_index - 1) + '">' +
- '<div class="fileHeader">' + title + '</div>';
+ if (diffContent != "" || binary) {
+ finalContent += '<div class="file" id="file_index_' + (file_index - 1) + '">' +
+ '<div class="fileHeader">' + title + '</div>';
+ }
- if (!binary) {
+ if (!binary && (diffContent != "")) {
finalContent += '<div class="diffContent">' +
'<div class="lineno">' + line1 + "</div>" +
'<div class="lineno">' + line2 + "</div>" +
@@ -86,7 +88,8 @@ var highlightDiff = function(diff, element, callbacks) {
}
}
- finalContent += '</div>';
+ if (diffContent != "" || binary)
+ finalContent += '</div>';
line1 = "";
line2 = "";
@@ -117,6 +120,29 @@ var highlightDiff = function(diff, element, callbacks) {
}
if (header) {
+ if (firstChar == "n") {
+ if (l.match(/^new file mode .*$/))
+ startname = "/dev/null";
+
+ if (match = l.match(/^new mode (.*)$/)) {
+ mode_change = true;
+ new_mode = match[1];
+ }
+ continue;
+ }
+ if (firstChar == "o") {
+ if (match = l.match(/^old mode (.*)$/)) {
+ mode_change = true;
+ old_mode = match[1];
+ }
+ continue;
+ }
+
+ if (firstChar == "d") {
+ if (l.match(/^deleted file mode .*$/))
+ endname = "/dev/null";
+ continue;
+ }
if (firstChar == "-") {
if (match = l.match(/^--- (a\/)?(.*)$/))
startname = match[2];
@@ -153,17 +179,6 @@ var highlightDiff = function(diff, element, callbacks) {
}
}
- if (match = l.match(/^old mode (.*)$/)) {
- mode_change = true;
- old_mode = match[1];
- }
-
- if (match = l.match(/^new mode (.*)$/)) {
- mode_change = true;
- new_mode = match[1];
- }
-
-
// Finish the header
if (firstChar == "@")
header = false;
@@ -188,7 +203,7 @@ var highlightDiff = function(diff, element, callbacks) {
header = false;
}
- if (m = l.match(/@@ \-([0-9]+),\d+ \+(\d+),\d+ @@/))
+ if (m = l.match(/@@ \-([0-9]+),?\d* \+(\d+),?\d* @@/))
{
hunk_start_line_1 = parseInt(m[1]) - 1;
hunk_start_line_2 = parseInt(m[2]) - 1;
@@ -199,14 +214,14 @@ var highlightDiff = function(diff, element, callbacks) {
} else if (firstChar == " ") {
line1 += ++hunk_start_line_1 + "\n";
line2 += ++hunk_start_line_2 + "\n";
- diffContent += l + "\n";
+ diffContent += "<div class='noopline'>" + l + "</div>";
}
}
finishContent();
// This takes about 7ms
- element.innerHTML = finalContent;
+ // element.innerHTML = finalContent;
// TODO: Replace this with a performance pref call
if (false)
diff --git a/html/test.html b/html/test.html
index 795c686..8919193 100644
--- a/html/test.html
+++ b/html/test.html
@@ -13,10 +13,13 @@
}
var doeHet = function() {
+ var start = Date.now();
highlightDiff($("orig_diff").value,
$("diff"),
{ "newfile" : newFile }
);
+ var end = Date.now();
+ console.debug("Parsing took: " + (end - start) + " ms");
}
</script>
</head>
diff --git a/html/views/commit/commit.css b/html/views/commit/commit.css
index 18d6a2e..268109d 100644
--- a/html/views/commit/commit.css
+++ b/html/views/commit/commit.css
@@ -61,7 +61,6 @@ table.diff {
}
.diff a.stagebutton {
- display: block;
width: 40px;
padding: 0 2px 0 2px;
margin-bottom: 4px;
@@ -77,7 +76,6 @@ table.diff {
text-align: center;
-webkit-border-radius: 2px;
- float: left;
}
#multiselect {
@@ -94,4 +92,4 @@ table.diff {
border: 5px solid #EEE;
margin: -5px;
padding-left: 20px;
-}
\ No newline at end of file
+}
diff --git a/html/views/history/history.css b/html/views/history/history.css
index 7c1aaf8..ff505aa 100644
--- a/html/views/history/history.css
+++ b/html/views/history/history.css
@@ -48,7 +48,7 @@ a.servicebutton{
}
.property_name {
- width: 50px;
+ width: 6em;
color:#7F7F7F;
text-align: right;
font-weight: bold;
diff --git a/html/views/history/history.js b/html/views/history/history.js
index 258310c..ee94436 100644
--- a/html/views/history/history.js
+++ b/html/views/history/history.js
@@ -40,11 +40,34 @@ var Commit = function(obj) {
}
this.reloadRefs = function() {
- this.refs = this.object.refs;
+ this.refs = this.object.refs();
}
};
+
+var confirm_gist = function(confirmation_message) {
+ if (!Controller.isFeatureEnabled_("confirmGist")) {
+ gistie();
+ return;
+ }
+
+ // Set optional confirmation_message
+ confirmation_message = confirmation_message || "Yes. Paste this commit.";
+ var deleteMessage = Controller.getConfig_("github.token") ? " " : "You might not be able to delete it after posting.<br>";
+ var publicMessage = Controller.isFeatureEnabled_("publicGist") ? "<b>public</b>" : "private";
+ // Insert the verification links into div#notification_message
+ var notification_text = 'This will create a ' + publicMessage + ' paste of your commit to <a href="http://gist.github.com/">http://gist.github.com/</a><br>' +
+ deleteMessage +
+ 'Are you sure you want to continue?<br/><br/>' +
+ '<a href="#" onClick="hideNotification();return false;" style="color: red;">No. Cancel.</a> | ' +
+ '<a href="#" onClick="gistie();return false;" style="color: green;">' + confirmation_message + '</a>';
+
+ notify(notification_text, 0);
+ // Hide img#spinner, since it?s visible by default
+ $("spinner").style.display = "none";
+}
+
var gistie = function() {
notify("Uploading code to Gistie..", 0);
@@ -60,9 +83,9 @@ var gistie = function() {
if (token && login) {
parameters.login = login;
parameters.token = token;
- } else {
- parameters.private = true;
}
+ if (!Controller.isFeatureEnabled_("publicGist"))
+ parameters.private = true;
var params = [];
for (var name in parameters)
@@ -223,8 +246,22 @@ var enableFeatures = function()
var loadExtendedCommit = function(commit)
{
- if (commit.author_email)
- $("authorID").innerHTML = commit.author_name + " &lt;<a href='mailto:" + commit.author_email + "'>" + commit.author_email + "</a>&gt;";
+ var formatEmail = function(name, email) {
+ return email ? name + " &lt;<a href='mailto:" + email + "'>" + email + "</a>&gt;" : name;
+ }
+
+ $("authorID").innerHTML = formatEmail(commit.author_name, commit.author_email);
+
+ if (commit.committer_name != commit.author_name) {
+ $("committerID").parentNode.style.display = "";
+ $("committerID").innerHTML = formatEmail(commit.committer_name, commit.committer_email);
+
+ $("committerDate").parentNode.style.display = "";
+ $("committerDate").innerHTML = commit.committer_date;
+ } else {
+ $("committerID").parentNode.style.display = "none";
+ $("committerDate").parentNode.style.display = "none";
+ }
$("date").innerHTML = commit.author_date;
$("message").innerHTML = commit.message.replace(/\n/g,"<br>");
diff --git a/html/views/history/index.html b/html/views/history/index.html
index c120e01..65117c3 100644
--- a/html/views/history/index.html
+++ b/html/views/history/index.html
@@ -14,7 +14,7 @@
<body style="padding: 0px; border: 0px">
<div id="rightcontent">
<div id="buttons">
- <a class="servicebutton" id="gist" onClick="gistie();return false" href='#'>
+ <a class="servicebutton" id="gist" onClick="confirm_gist();return false" href='#'>
Gist&nbsp;it
</a>
</div>
@@ -33,6 +33,14 @@
<td class="property_name">Date:</td>
<td id="date">Pieter de Bie</td>
</tr>
+ <tr style="display:none">
+ <td class="property_name">Committer:</td>
+ <td id="committerID">Pieter de Bie</td>
+ </tr>
+ <tr style="display:none">
+ <td class="property_name">Commit Date:</td>
+ <td id="committerDate">Pieter de Bie</td>
+ </tr>
<tr>
<td class="property_name">Subject:</td>
<td id="subjectID" style="font-weight:bold">Pieter de Bie</td>
@@ -48,7 +56,7 @@
</div>
<hr>
<div id="message_files">
- <div id="message"></div>
+ <pre id="message"></pre>
<div id="files"></div>
</div>
diff --git a/speedtest.m b/speedtest.m
index 2d96213..18173bb 100644
--- a/speedtest.m
+++ b/speedtest.m
@@ -6,18 +6,36 @@
// Copyright 2008 Pieter de Bie. All rights reserved.
//
-#import "speedtest.h"
#import "PBGitRepository.h"
-#import "PBGitRevList.h"
+#import "PBGitRevSpecifier.h"
+#import "PBGitCommit.h"
+#import "PBGitRevPool.h"
int main()
{
- PBGitRepository *repo = [[PBGitRepository alloc] initWithURL:[NSURL URLWithString:@"file:///Users/pieter/projects/git"]];
- PBGitRevList *revList = [[PBGitRevList alloc] initWithRepository:repo];
- PBGitRevSpecifier *revSpecifier = [[PBGitRevSpecifier alloc] initWithParameters:[NSArray arrayWithObject:@"master"]];
+ PBGitRepository *repo = [[PBGitRepository alloc] initWithURL:[NSURL URLWithString:@"file:///Users/pieter/projects/External/git"]];
+ //PBGitRevList *revList = [[PBGitRevList alloc] initWithRepository:repo];
+ PBGitRevSpecifier *revSpecifier = [[PBGitRevSpecifier alloc] initWithParameters:[NSArray arrayWithObject:@"HEAD"]];
+ PBGitRevPool *revPool = [[PBGitRevPool alloc] initWithRepository:repo];
//[repo reloadRefs];
- [revList walkRevisionListWithSpecifier:revSpecifier];
-
+ [revPool loadRevisions:revSpecifier];
+// [revPool listCommits];
+
+ NSDate *start = [NSDate date];
+ PBGitCommit *commit = [revPool commitWithSha:@"6270bae2fe7b13a0809061760ddb2b03ce2ca33a"];
+ NSMutableArray *array = [NSMutableArray array];
+ while (commit)
+ {
+ [array addObject:[commit realSha]];
+ if (commit.nParents)
+ commit = [revPool commitWithOid:commit.parentShas[0]];
+ else
+ commit = NULL;
+ }
+ NSTimeInterval duration = [[NSDate date] timeIntervalSinceDate:start];
+
+ NSLog(@"Walked all refs in %f seconds", duration);
+ NSLog(@"%@", [array componentsJoinedByString:@"\n"]);
return 0;
}
\ No newline at end of file
</textarea>
<div id='diff'></div>
</body>