3 <title>Details for commit
</title>
4 <link rel=
"stylesheet" href=
"css/GitX.css" type=
"text/css" media=
"screen" title=
"no title" charset=
"utf-8">
5 <link rel=
"stylesheet" href=
"css/diff.css" type=
"text/css" media=
"screen" title=
"no title" charset=
"utf-8">
6 <script src=
"lib/GitX.js" type=
"text/javascript" charset=
"utf-8"></script>
7 <script src=
"lib/diffHighlighter.js" type=
"text/javascript" charset=
"utf-8"></script>
9 <script type=
"text/javascript" charset=
"utf-8">
11 var newFile = function(name, id) {
12 var link = document.createElement(
"a");
13 link.setAttribute(
"href",
"#" + id);
14 link.appendChild(document.createTextNode(name));
15 $(
"filelist").appendChild(link);
16 $(
"filelist").appendChild(document.createElement(
"br"));
18 newFile.displayName =
"newFileCallback";
20 var doeHet = function() {
21 var start = Date.now();
23 highlightDiff($(
"orig_diff").value,
25 {
"newfile" : newFile }
30 console.debug(
"Parsing took: " + (end - start) +
" ms");
34 <body style=
"padding: 0px; border: 0px; font-size:60%" onLoad=
"doeHet()">
35 <div id=
"title"></div>
36 <div id=
"filelist"></div>
37 <textarea style='display:none'
id=
"orig_diff" rows=
"8" cols=
"40">
38 diff --git a/.gitignore b/.gitignore
39 index b89b7b7.
.3367a4e
100644
46 *.xcodeproj/*.perspectivev3
48 diff --git a/ApplicationController.m b/ApplicationController.m
49 index
86252cd.
.3a86d38
100644
50 --- a/ApplicationController.m
51 +++ b/ApplicationController.m
52 @@ -
21,
7 +
21,
7 @@ @implementation ApplicationController
54 - (ApplicationController*)init
58 [NSApp activateIgnoringOtherApps:YES];
61 @@ -
92,
12 +
92,
16 @@ - (IBAction)openPreferencesWindow:(id)sender
62 - (IBAction)installCliTool:(id)sender;
65 - NSString* installationPath = @
"/usr/local/bin/gitx";
66 + NSString* installationPath = @
"/usr/local/bin/";
67 + NSString* installationName = @
"gitx";
68 NSString* toolPath = [[NSBundle mainBundle] pathForResource:@
"gitx" ofType:@
""];
70 AuthorizationRef auth;
71 if (AuthorizationCreate(NULL, kAuthorizationEmptyEnvironment, kAuthorizationFlagDefaults, &auth) == errAuthorizationSuccess) {
72 - char const* arguments[] = {
"-f",
"-s", [toolPath UTF8String], [installationPath UTF8String], NULL };
73 + char const* mkdir_arg[] = {
"-p", [installationPath UTF8String], NULL};
74 + char const* mkdir =
"/bin/mkdir";
75 + AuthorizationExecuteWithPrivileges(auth, mkdir, kAuthorizationFlagDefaults, (char**)mkdir_arg, NULL);
76 + char const* arguments[] = {
"-f",
"-s", [toolPath UTF8String], [[installationPath stringByAppendingString: installationName] UTF8String], NULL };
77 char const* helperTool =
"/bin/ln";
78 if (AuthorizationExecuteWithPrivileges(auth, helperTool, kAuthorizationFlagDefaults, (char**)arguments, NULL) == errAuthorizationSuccess) {
80 diff --git a/Documentation/ReleaseNotes.txt b/Documentation/ReleaseNotes.txt
81 deleted file mode
100644
82 index
21ddcf1.
.0000000
83 --- a/Documentation/ReleaseNotes.txt
91 -This is a bugfix release. The following bugs have been fixed:
93 -* The commit view shows new files with linebreaks
94 -* The history view works with Git
>=
1.5.4 again
95 -* Reloading the detailed view in the History no longer causes an empty page
100 -This release has the following new features and enhancements:
101 -* The diff display now looks much nicer, using boxes to segment files
102 -* The toolbar can now me customized
103 -* Images that have been changed or added in a commit can now be viewed
105 -* GitX has gained a preference pane which allows you to specify a git path
106 - and disable the Gist and Gravatar integration
107 -* The commit interface is now more intuitive. Particularly, you can now
108 - select multiple files and use drag and drop to stage / unstage files
109 -* You can now drag and drop files out of the commit view
110 -* The files in the commit view have gained a context menu that allows you
111 - to revert changes / open the file / ignore the file
112 -* It is now possible to adjust the amount of context lines in the commit view.
113 - Using a smaller context size allows you to do more fine-grained commits
114 -* The branch menu is now organized in branches/remotes/tags
115 -* The view switch button now uses icons rather than words
116 -* The view shortcuts have changed to use command
1/
2 for the history/commit
117 - view. The history's subviews can now be changed using command-option-
1/
2/
3
118 -* Listing commits has become much faster
119 -* GitX no longer spawns zombie processes
120 -* GitX now shows a list of files that have been changed in a commit
122 -* GitX now uses libgit2 to store object id's, reducing it's memory footprint
124 -In addition many bugs were fixed, including the correct calculation of a
131 -This feature release has several new smaller or larger features:
132 -* The current branch is now highlighted
133 -* In the commit view, there is an option to amend commits
134 -* The
"Gist it" button now respects github.user/token
135 -* Display a gravatar of the committer
136 -* The commit message view now displays a vertical line at
50 characters
137 -* It is now possible to revert changes by using the context menu in the
139 -* You can now stage only parts of a file by using the
"Stage Hunk" buttons
141 -* You can now use GitX to show a diff of anything, for example by using
142 - 'gitx --diff HEAD^^' or 'git diff HEAD~
3 | gitx --diff'
143 -* You can now drag and drop refs to move them and also create branches
145 -In addition, the following bugs have been fixed:
146 -* Better detection of git version
147 -* Branch lines are no longer interspersed with half a pixel of whitespace
148 -* The toolbar keeps its state when switching views
153 -This is a maintenance release. Most important fixes:
155 -* The diff display is now much faster
156 -* More locations are now searched for a default git
157 -* Code pasted online is now private
159 -v0.4: Changes since v0.3
.1
161 -* A new commitview, allowing you to selectively add changes and commit them.
162 -* You can now upload a commit as a patch to gist.github.com
163 -* GitX now searches for your git binary in more directories and is smarter
164 - about reporting errors regarding git paths.
165 -* You can now remove branches by right-clicking on them in the detailed view
166 -* GitX now comes with a spicy new icon
167 -* The diff view has become prettier and now also highlights trailing
169 -* Various little changes and stability improvement
173 -* Fixed a serious crasher
175 -V0.3: Changes since v0.2
.1
177 -* You can now pass on command-line arguments just like you can with 'git log'
178 -* The program has an icon
179 -* Also displays remote branches in the branch list
180 -* Is better in determining if a directory is a bare git repository
181 -* Support for --left-right: use 'gitx --left-right HEAD..origin/master'
182 - to see which commits are only on your branch or on their branch
183 -* Navigate through changed hunks by using j/k keys
184 -* Scroll down in webview by using space / shift-space
188 -* Added Sparkle update system
190 -V0.2: Changes since v0.1
192 -* The graph now has colors
193 -* There are now lables attached to commits
194 \ No newline at end of file
195 diff --git a/Documentation/ReleaseNotes/v0.2
.1.txt b/Documentation/ReleaseNotes/v0.2
.1.txt
197 index
0000000.
.8ed0e9f
199 +++ b/Documentation/ReleaseNotes/v0.2
.1.txt
203 +* Added Sparkle update system
204 diff --git a/Documentation/ReleaseNotes/v0.2.txt b/Documentation/ReleaseNotes/v0.2.txt
206 index
0000000.
.29ab6a3
208 +++ b/Documentation/ReleaseNotes/v0.2.txt
210 +V0.2: Changes since v0.1
212 +* The graph now has colors
213 +* There are now lables attached to commits
214 \ No newline at end of file
215 diff --git a/Documentation/ReleaseNotes/v0.3
.1.txt b/Documentation/ReleaseNotes/v0.3
.1.txt
217 index
0000000.
.05d8d00
219 +++ b/Documentation/ReleaseNotes/v0.3
.1.txt
223 +* Fixed a serious crasher
224 diff --git a/Documentation/ReleaseNotes/v0.3.txt b/Documentation/ReleaseNotes/v0.3.txt
226 index
0000000..d46ea1d
228 +++ b/Documentation/ReleaseNotes/v0.3.txt
230 +V0.3: Changes since v0.2
.1
232 +* You can now pass on command-line arguments just like you can with 'git log'
233 +* The program has an icon
234 +* Also displays remote branches in the branch list
235 +* Is better in determining if a directory is a bare git repository
236 +* Support for --left-right: use 'gitx --left-right HEAD..origin/master'
237 + to see which commits are only on your branch or on their branch
238 +* Navigate through changed hunks by using j/k keys
239 +* Scroll down in webview by using space / shift-space
240 diff --git a/Documentation/ReleaseNotes/v0.4
.1.txt b/Documentation/ReleaseNotes/v0.4
.1.txt
242 index
0000000..b8e6a93
244 +++ b/Documentation/ReleaseNotes/v0.4
.1.txt
249 +This is a maintenance release. Most important fixes:
251 +* The diff display is now much faster
252 +* More locations are now searched for a default git
253 +* Code pasted online is now private
254 diff --git a/Documentation/ReleaseNotes/v0.4.txt b/Documentation/ReleaseNotes/v0.4.txt
256 index
0000000.
.2a4efd0
258 +++ b/Documentation/ReleaseNotes/v0.4.txt
260 +v0.4: Changes since v0.3
.1
262 +* A new commitview, allowing you to selectively add changes and commit them.
263 +* You can now upload a commit as a patch to gist.github.com
264 +* GitX now searches for your git binary in more directories and is smarter
265 + about reporting errors regarding git paths.
266 +* You can now remove branches by right-clicking on them in the detailed view
267 +* GitX now comes with a spicy new icon
268 +* The diff view has become prettier and now also highlights trailing
270 +* Various little changes and stability improvement
271 diff --git a/Documentation/ReleaseNotes/v0.5.txt b/Documentation/ReleaseNotes/v0.5.txt
273 index
0000000.
.3cfcc8a
275 +++ b/Documentation/ReleaseNotes/v0.5.txt
280 +This feature release has several new smaller or larger features:
282 +* The current branch is now highlighted
283 +* In the commit view, there is an option to amend commits
284 +* The
"Gist it" button now respects github.user/token
285 +* Display a gravatar of the committer
286 +* The commit message view now displays a vertical line at
50 characters
287 +* It is now possible to revert changes by using the context menu in the
289 +* You can now stage only parts of a file by using the
"Stage Hunk" buttons
291 +* You can now use GitX to show a diff of anything, for example by using
292 + 'gitx --diff HEAD^^' or 'git diff HEAD~
3 | gitx --diff'
293 +* You can now drag and drop refs to move them and also create branches
295 +In addition, the following bugs have been fixed:
297 +* Better detection of git version
298 +* Branch lines are no longer interspersed with half a pixel of whitespace
299 +* The toolbar keeps its state when switching views
300 diff --git a/Documentation/ReleaseNotes/v0.6
.1.txt b/Documentation/ReleaseNotes/v0.6
.1.txt
302 index
0000000..c77a31b
304 +++ b/Documentation/ReleaseNotes/v0.6
.1.txt
309 +This is a bugfix release. The following bugs have been fixed:
311 +* The commit view shows new files with linebreaks
312 +* The history view works with Git
>=
1.5.4 again
313 +* Reloading the detailed view in the History no longer causes an empty page
314 diff --git a/Documentation/ReleaseNotes/v0.6
.2.txt b/Documentation/ReleaseNotes/v0.6
.2.txt
316 index
0000000.
.37303d7
318 +++ b/Documentation/ReleaseNotes/v0.6
.2.txt
323 +This is a maintenance release. The following bugs have been fixed:
325 +* Fix many display bugs in the history view (Thanks to Johannes Gilger)
326 +* Fix moving of refs
327 +* GitX no longer stalls if you have a large amount of untracked files
328 +* GitX now asks for confirmation before deleting a branch
329 +* GitX no longer shows ghost files after staging a hunk
330 +* Dragging and dropping a tree now correctly copies all files
332 +In addition, the following features have been added:
334 +* There is now a 'New…' option to create a new repository
335 +* The 'Gist It' feature now asks for confirmation by default. This can be changed in the preferences
336 +* GitX can now open any directory by dragging it on the icon
337 +* GitX now asks for confirmation before deleting a branch
338 \ No newline at end of file
339 diff --git a/Documentation/ReleaseNotes/v0.6.txt b/Documentation/ReleaseNotes/v0.6.txt
341 index
0000000..d152d89
343 +++ b/Documentation/ReleaseNotes/v0.6.txt
348 +This release has the following new features and enhancements:
350 +* The diff display now looks much nicer, using boxes to segment files
351 +* The toolbar can now me customized
352 +* Images that have been changed or added in a commit can now be viewed
354 +* GitX has gained a preference pane which allows you to specify a git path
355 + and disable the Gist and Gravatar integration
356 +* The commit interface is now more intuitive. Particularly, you can now
357 + select multiple files and use drag and drop to stage / unstage files
358 +* You can now drag and drop files out of the commit view
359 +* The files in the commit view have gained a context menu that allows you
360 + to revert changes / open the file / ignore the file
361 +* It is now possible to adjust the amount of context lines in the commit view.
362 + Using a smaller context size allows you to do more fine-grained commits
363 +* The branch menu is now organized in branches/remotes/tags
364 +* The view switch button now uses icons rather than words
365 +* The view shortcuts have changed to use command
1/
2 for the history/commit
366 + view. The history's subviews can now be changed using command-option-
1/
2/
3
367 +* Listing commits has become much faster
368 +* GitX no longer spawns zombie processes
369 +* GitX now shows a list of files that have been changed in a commit
370 +* GitX now uses libgit2 to store object id's, reducing it's memory footprint
372 +In addition many bugs were fixed, including the correct calculation of a
374 diff --git a/English.lproj/MainMenu.xib b/English.lproj/MainMenu.xib
375 index
1e9e26d.
.3e4d678
100644
376 --- a/English.lproj/MainMenu.xib
377 +++ b/English.lproj/MainMenu.xib
379 <string key=
"IBDocument.HIToolboxVersion">353.00</string>
380 <object class=
"NSMutableArray" key=
"IBDocument.EditedObjectIDs">
381 <bool key=
"EncodedWithXMLCoder">YES
</bool>
382 -
<integer value=
"57"/>
383 +
<integer value=
"81"/>
385 <object class=
"NSArray" key=
"IBDocument.PluginDependencies">
386 <bool key=
"EncodedWithXMLCoder">YES
</bool>
388 <bool key=
"EncodedWithXMLCoder">YES
</bool>
389 <object class=
"NSMenuItem" id=
"968526216">
390 <reference key=
"NSMenu" ref=
"310195297"/>
391 -
<string key=
"NSTitle">New
</string>
392 +
<string type=
"base64-UTF8" key=
"NSTitle">TmV34oCmA
</string>
393 <string key=
"NSKeyEquiv">n
</string>
394 <int key=
"NSKeyEquivModMask">1048576</int>
395 <int key=
"NSMnemonicLoc">2147483647</int>
398 <object class=
"NSMenuItem" id=
"432647792">
399 <reference key=
"NSMenu" ref=
"310195297"/>
400 -
<string key=
"NSTitle">Open...
</string>
401 +
<string type=
"base64-UTF8" key=
"NSTitle">T3BlbuKApg
</string>
402 <string key=
"NSKeyEquiv">o
</string>
403 <int key=
"NSKeyEquivModMask">1048576</int>
404 <int key=
"NSMnemonicLoc">2147483647</int>
405 @@ -
1212,
6 +
1212,
14 @@
407 <int key=
"connectionID">933</int>
409 +
<object class=
"IBConnectionRecord">
410 +
<object class=
"IBActionConnection" key=
"connection">
411 +
<string key=
"label">newDocument:
</string>
412 +
<reference key=
"source" ref=
"954860085"/>
413 +
<reference key=
"destination" ref=
"968526216"/>
415 +
<int key=
"connectionID">934</int>
418 <object class=
"IBMutableOrderedSet" key=
"objectRecords">
419 <object class=
"NSArray" key=
"orderedObjects">
420 @@ -
2256,
7 +
2264,
7 @@
423 <nil key=
"sourceID"/>
424 -
<int key=
"maxID">933</int>
425 +
<int key=
"maxID">934</int>
427 <object class=
"IBClassDescriber" key=
"IBDocument.Classes">
428 <object class=
"NSMutableArray" key=
"referencedPartialClassDescriptions">
429 diff --git a/English.lproj/Preferences.xib b/English.lproj/Preferences.xib
430 index d7477bf.
.44d184f
100644
431 --- a/English.lproj/Preferences.xib
432 +++ b/English.lproj/Preferences.xib
434 <?xml version=
"1.0" encoding=
"UTF-8"?>
435 -
<archive type=
"com.apple.InterfaceBuilder3.Cocoa.XIB" version=
"7.02">
436 +
<archive type=
"com.apple.InterfaceBuilder3.Cocoa.XIB" version=
"7.03">
438 <int key=
"IBDocument.SystemTarget">1050</int>
439 -
<string key=
"IBDocument.SystemVersion">9F33
</string>
440 -
<string key=
"IBDocument.InterfaceBuilderVersion">670</string>
441 -
<string key=
"IBDocument.AppKitVersion">949.34</string>
442 -
<string key=
"IBDocument.HIToolboxVersion">352.00</string>
443 +
<string key=
"IBDocument.SystemVersion">9G55
</string>
444 +
<string key=
"IBDocument.InterfaceBuilderVersion">677</string>
445 +
<string key=
"IBDocument.AppKitVersion">949.43</string>
446 +
<string key=
"IBDocument.HIToolboxVersion">353.00</string>
447 <object class=
"NSMutableArray" key=
"IBDocument.EditedObjectIDs">
448 <bool key=
"EncodedWithXMLCoder">YES
</bool>
449 -
<integer value=
"62"/>
451 +
<integer value=
"62"/>
452 +
<integer value=
"87"/>
453 <integer value=
"4" id=
"12"/>
455 <object class=
"NSArray" key=
"IBDocument.PluginDependencies">
457 <string>com.apple.InterfaceBuilderKit
</string>
458 <string>com.apple.InterfaceBuilder.CocoaPlugin
</string>
460 +
<object class=
"NSMutableDictionary" key=
"IBDocument.Metadata">
461 +
<bool key=
"EncodedWithXMLCoder">YES
</bool>
462 +
<object class=
"NSArray" key=
"dict.sortedKeys">
463 +
<bool key=
"EncodedWithXMLCoder">YES
</bool>
465 +
<object class=
"NSMutableArray" key=
"dict.values">
466 +
<bool key=
"EncodedWithXMLCoder">YES
</bool>
469 <object class=
"NSMutableArray" key=
"IBDocument.RootObjects" id=
"1000">
470 <bool key=
"EncodedWithXMLCoder">YES
</bool>
471 <object class=
"NSCustomObject" id=
"1001">
472 @@ -
396,
27 +
406,
30 @@
473 <object class=
"NSUserDefaultsController" id=
"557723770">
474 <object class=
"NSMutableArray" key=
"NSDeclaredKeys">
475 <bool key=
"EncodedWithXMLCoder">YES
</bool>
476 -
<string>gitExecutable
</string>
477 +
<string>PBConfirmPublicGists
</string>
478 +
<string>PBGitGist
</string>
479 +
<string>PBEnableGist
</string>
480 +
<string>PBGistPublic
</string>
482 <bool key=
"NSSharedInstance">YES
</bool>
484 -
<object class=
"NSCustomView" id=
"1012601198">
485 +
<object class=
"NSCustomView" id=
"263788152">
486 <reference key=
"NSNextResponder"/>
487 <int key=
"NSvFlags">268</int>
488 <object class=
"NSMutableArray" key=
"NSSubviews">
489 <bool key=
"EncodedWithXMLCoder">YES
</bool>
490 -
<object class=
"NSButton" id=
"978972354">
491 -
<reference key=
"NSNextResponder" ref=
"1012601198"/>
492 +
<object class=
"NSButton" id=
"237556568">
493 +
<reference key=
"NSNextResponder" ref=
"263788152"/>
494 <int key=
"NSvFlags">268</int>
495 -
<string key=
"NSFrame">{{
18,
38}, {
111,
18}}
</string>
496 -
<reference key=
"NSSuperview" ref=
"1012601198"/>
497 +
<string key=
"NSFrame">{{
18,
80}, {
111,
18}}
</string>
498 +
<reference key=
"NSSuperview" ref=
"263788152"/>
499 <bool key=
"NSEnabled">YES
</bool>
500 -
<object class=
"NSButtonCell" key=
"NSCell" id=
"469684733">
501 +
<object class=
"NSButtonCell" key=
"NSCell" id=
"973971251">
502 <int key=
"NSCellFlags">-
2080244224</int>
503 <int key=
"NSCellFlags2">0</int>
504 <string type=
"base64-UTF8" key=
"NSContents">RW5hYmxlICdHaXN0IGl0Jw
</string>
505 <reference key=
"NSSupport" ref=
"734450335"/>
506 -
<reference key=
"NSControlView" ref=
"978972354"/>
507 +
<reference key=
"NSControlView" ref=
"237556568"/>
508 <int key=
"NSButtonFlags">1211912703</int>
509 <int key=
"NSButtonFlags2">130</int>
510 <reference key=
"NSNormalImage" ref=
"294005107"/>
511 @@ -
427,
18 +
440,
62 @@
512 <int key=
"NSPeriodicInterval">25</int>
515 -
<object class=
"NSButton" id=
"740198534">
516 -
<reference key=
"NSNextResponder" ref=
"1012601198"/>
517 +
<object class=
"NSButton" id=
"485413225">
518 +
<reference key=
"NSNextResponder" ref=
"263788152"/>
519 <int key=
"NSvFlags">268</int>
520 <string key=
"NSFrame">{{
18,
18}, {
121,
18}}
</string>
521 -
<reference key=
"NSSuperview" ref=
"1012601198"/>
522 +
<reference key=
"NSSuperview" ref=
"263788152"/>
523 <bool key=
"NSEnabled">YES
</bool>
524 -
<object class=
"NSButtonCell" key=
"NSCell" id=
"18634163">
525 +
<object class=
"NSButtonCell" key=
"NSCell" id=
"12685338">
526 <int key=
"NSCellFlags">-
2080244224</int>
527 <int key=
"NSCellFlags2">0</int>
528 <string key=
"NSContents">Enable Gravatar
</string>
529 <reference key=
"NSSupport" ref=
"734450335"/>
530 -
<reference key=
"NSControlView" ref=
"740198534"/>
531 +
<reference key=
"NSControlView" ref=
"485413225"/>
532 +
<int key=
"NSButtonFlags">1211912703</int>
533 +
<int key=
"NSButtonFlags2">130</int>
534 +
<reference key=
"NSNormalImage" ref=
"294005107"/>
535 +
<reference key=
"NSAlternateImage" ref=
"690089052"/>
536 +
<string key=
"NSAlternateContents"/>
537 +
<string key=
"NSKeyEquivalent"/>
538 +
<int key=
"NSPeriodicDelay">200</int>
539 +
<int key=
"NSPeriodicInterval">25</int>
542 +
<object class=
"NSButton" id=
"933582906">
543 +
<reference key=
"NSNextResponder" ref=
"263788152"/>
544 +
<int key=
"NSvFlags">268</int>
545 +
<string key=
"NSFrame">{{
38,
60}, {
181,
18}}
</string>
546 +
<reference key=
"NSSuperview" ref=
"263788152"/>
547 +
<bool key=
"NSEnabled">YES
</bool>
548 +
<object class=
"NSButtonCell" key=
"NSCell" id=
"601773126">
549 +
<int key=
"NSCellFlags">-
2080244224</int>
550 +
<int key=
"NSCellFlags2">0</int>
551 +
<string key=
"NSContents">Confirm creation of Gists
</string>
552 +
<reference key=
"NSSupport" ref=
"734450335"/>
553 +
<reference key=
"NSControlView" ref=
"933582906"/>
554 +
<int key=
"NSButtonFlags">1211912703</int>
555 +
<int key=
"NSButtonFlags2">130</int>
556 +
<reference key=
"NSNormalImage" ref=
"294005107"/>
557 +
<reference key=
"NSAlternateImage" ref=
"690089052"/>
558 +
<string key=
"NSAlternateContents"/>
559 +
<string key=
"NSKeyEquivalent"/>
560 +
<int key=
"NSPeriodicDelay">200</int>
561 +
<int key=
"NSPeriodicInterval">25</int>
564 +
<object class=
"NSButton" id=
"766070942">
565 +
<reference key=
"NSNextResponder" ref=
"263788152"/>
566 +
<int key=
"NSvFlags">268</int>
567 +
<string key=
"NSFrame">{{
38,
38}, {
179,
18}}
</string>
568 +
<reference key=
"NSSuperview" ref=
"263788152"/>
569 +
<bool key=
"NSEnabled">YES
</bool>
570 +
<object class=
"NSButtonCell" key=
"NSCell" id=
"817763751">
571 +
<int key=
"NSCellFlags">-
2080244224</int>
572 +
<int key=
"NSCellFlags2">0</int>
573 +
<string key=
"NSContents">Make Gists public
</string>
574 +
<reference key=
"NSSupport" ref=
"734450335"/>
575 +
<reference key=
"NSControlView" ref=
"766070942"/>
576 <int key=
"NSButtonFlags">1211912703</int>
577 <int key=
"NSButtonFlags2">130</int>
578 <reference key=
"NSNormalImage" ref=
"294005107"/>
583 -
<string key=
"NSFrameSize">{
400,
74}
</string>
584 +
<string key=
"NSFrameSize">{
403,
116}
</string>
585 <reference key=
"NSSuperview"/>
586 <string key=
"NSClassName">NSView
</string>
588 @@ -
673,
17 +
730,
17 @@
589 <object class=
"IBOutletConnection" key=
"connection">
590 <string key=
"label">integrationPrefsView
</string>
591 <reference key=
"source" ref=
"1001"/>
592 -
<reference key=
"destination" ref=
"1012601198"/>
593 +
<reference key=
"destination" ref=
"263788152"/>
595 -
<int key=
"connectionID">89</int>
596 +
<int key=
"connectionID">92</int>
598 <object class=
"IBConnectionRecord">
599 <object class=
"IBBindingConnection" key=
"connection">
600 <string key=
"label">value: values.PBEnableGist
</string>
601 -
<reference key=
"source" ref=
"978972354"/>
602 +
<reference key=
"source" ref=
"237556568"/>
603 <reference key=
"destination" ref=
"557723770"/>
604 <object class=
"NSNibBindingConnector" key=
"connector">
605 -
<reference key=
"NSSource" ref=
"978972354"/>
606 +
<reference key=
"NSSource" ref=
"237556568"/>
607 <reference key=
"NSDestination" ref=
"557723770"/>
608 <string key=
"NSLabel">value: values.PBEnableGist
</string>
609 <string key=
"NSBinding">value
</string>
610 @@ -
691,
15 +
748,
15 @@
611 <int key=
"NSNibBindingConnectorVersion">2</int>
614 -
<int key=
"connectionID">97</int>
615 +
<int key=
"connectionID">94</int>
617 <object class=
"IBConnectionRecord">
618 <object class=
"IBBindingConnection" key=
"connection">
619 <string key=
"label">value: values.PBEnableGravatar
</string>
620 -
<reference key=
"source" ref=
"740198534"/>
621 +
<reference key=
"source" ref=
"485413225"/>
622 <reference key=
"destination" ref=
"557723770"/>
623 <object class=
"NSNibBindingConnector" key=
"connector">
624 -
<reference key=
"NSSource" ref=
"740198534"/>
625 +
<reference key=
"NSSource" ref=
"485413225"/>
626 <reference key=
"NSDestination" ref=
"557723770"/>
627 <string key=
"NSLabel">value: values.PBEnableGravatar
</string>
628 <string key=
"NSBinding">value
</string>
630 <int key=
"NSNibBindingConnectorVersion">2</int>
633 -
<int key=
"connectionID">101</int>
634 +
<int key=
"connectionID">96</int>
636 +
<object class=
"IBConnectionRecord">
637 +
<object class=
"IBBindingConnection" key=
"connection">
638 +
<string key=
"label">value: values.PBConfirmPublicGists
</string>
639 +
<reference key=
"source" ref=
"933582906"/>
640 +
<reference key=
"destination" ref=
"557723770"/>
641 +
<object class=
"NSNibBindingConnector" key=
"connector">
642 +
<reference key=
"NSSource" ref=
"933582906"/>
643 +
<reference key=
"NSDestination" ref=
"557723770"/>
644 +
<string key=
"NSLabel">value: values.PBConfirmPublicGists
</string>
645 +
<string key=
"NSBinding">value
</string>
646 +
<string key=
"NSKeyPath">values.PBConfirmPublicGists
</string>
647 +
<int key=
"NSNibBindingConnectorVersion">2</int>
650 +
<int key=
"connectionID">104</int>
652 +
<object class=
"IBConnectionRecord">
653 +
<object class=
"IBBindingConnection" key=
"connection">
654 +
<string key=
"label">enabled: values.PBEnableGist
</string>
655 +
<reference key=
"source" ref=
"933582906"/>
656 +
<reference key=
"destination" ref=
"557723770"/>
657 +
<object class=
"NSNibBindingConnector" key=
"connector">
658 +
<reference key=
"NSSource" ref=
"933582906"/>
659 +
<reference key=
"NSDestination" ref=
"557723770"/>
660 +
<string key=
"NSLabel">enabled: values.PBEnableGist
</string>
661 +
<string key=
"NSBinding">enabled
</string>
662 +
<string key=
"NSKeyPath">values.PBEnableGist
</string>
663 +
<int key=
"NSNibBindingConnectorVersion">2</int>
666 +
<int key=
"connectionID">107</int>
668 +
<object class=
"IBConnectionRecord">
669 +
<object class=
"IBBindingConnection" key=
"connection">
670 +
<string key=
"label">enabled: values.PBEnableGist
</string>
671 +
<reference key=
"source" ref=
"766070942"/>
672 +
<reference key=
"destination" ref=
"557723770"/>
673 +
<object class=
"NSNibBindingConnector" key=
"connector">
674 +
<reference key=
"NSSource" ref=
"766070942"/>
675 +
<reference key=
"NSDestination" ref=
"557723770"/>
676 +
<string key=
"NSLabel">enabled: values.PBEnableGist
</string>
677 +
<string key=
"NSBinding">enabled
</string>
678 +
<string key=
"NSKeyPath">values.PBEnableGist
</string>
679 +
<int key=
"NSNibBindingConnectorVersion">2</int>
682 +
<int key=
"connectionID">111</int>
684 +
<object class=
"IBConnectionRecord">
685 +
<object class=
"IBBindingConnection" key=
"connection">
686 +
<string key=
"label">value: values.PBGistPublic
</string>
687 +
<reference key=
"source" ref=
"766070942"/>
688 +
<reference key=
"destination" ref=
"557723770"/>
689 +
<object class=
"NSNibBindingConnector" key=
"connector">
690 +
<reference key=
"NSSource" ref=
"766070942"/>
691 +
<reference key=
"NSDestination" ref=
"557723770"/>
692 +
<string key=
"NSLabel">value: values.PBGistPublic
</string>
693 +
<string key=
"NSBinding">value
</string>
694 +
<string key=
"NSKeyPath">values.PBGistPublic
</string>
695 +
<int key=
"NSNibBindingConnectorVersion">2</int>
698 +
<int key=
"connectionID">113</int>
701 <object class=
"IBMutableOrderedSet" key=
"objectRecords">
702 @@ -
987,
43 +
1108,
73 @@
703 <reference key=
"parent" ref=
"1032928366"/>
705 <object class=
"IBObjectRecord">
706 -
<int key=
"objectID">88</int>
707 -
<reference key=
"object" ref=
"1012601198"/>
708 +
<int key=
"objectID">87</int>
709 +
<reference key=
"object" ref=
"263788152"/>
710 <object class=
"NSMutableArray" key=
"children">
711 <bool key=
"EncodedWithXMLCoder">YES
</bool>
712 -
<reference ref=
"978972354"/>
713 -
<reference ref=
"740198534"/>
714 +
<reference ref=
"237556568"/>
715 +
<reference ref=
"933582906"/>
716 +
<reference ref=
"485413225"/>
717 +
<reference ref=
"766070942"/>
719 <reference key=
"parent" ref=
"1002"/>
720 <string key=
"objectName">Integration
</string>
722 <object class=
"IBObjectRecord">
723 -
<int key=
"objectID">90</int>
724 -
<reference key=
"object" ref=
"978972354"/>
725 +
<int key=
"objectID">88</int>
726 +
<reference key=
"object" ref=
"485413225"/>
727 <object class=
"NSMutableArray" key=
"children">
728 <bool key=
"EncodedWithXMLCoder">YES
</bool>
729 -
<reference ref=
"469684733"/>
730 +
<reference ref=
"12685338"/>
732 -
<reference key=
"parent" ref=
"1012601198"/>
733 +
<reference key=
"parent" ref=
"263788152"/>
735 +
<object class=
"IBObjectRecord">
736 +
<int key=
"objectID">89</int>
737 +
<reference key=
"object" ref=
"237556568"/>
738 +
<object class=
"NSMutableArray" key=
"children">
739 +
<bool key=
"EncodedWithXMLCoder">YES
</bool>
740 +
<reference ref=
"973971251"/>
742 +
<reference key=
"parent" ref=
"263788152"/>
744 +
<object class=
"IBObjectRecord">
745 +
<int key=
"objectID">90</int>
746 +
<reference key=
"object" ref=
"973971251"/>
747 +
<reference key=
"parent" ref=
"237556568"/>
749 <object class=
"IBObjectRecord">
750 <int key=
"objectID">91</int>
751 -
<reference key=
"object" ref=
"469684733"/>
752 -
<reference key=
"parent" ref=
"978972354"/>
753 +
<reference key=
"object" ref=
"12685338"/>
754 +
<reference key=
"parent" ref=
"485413225"/>
756 <object class=
"IBObjectRecord">
757 -
<int key=
"objectID">92</int>
758 -
<reference key=
"object" ref=
"740198534"/>
759 +
<int key=
"objectID">97</int>
760 +
<reference key=
"object" ref=
"933582906"/>
761 <object class=
"NSMutableArray" key=
"children">
762 <bool key=
"EncodedWithXMLCoder">YES
</bool>
763 -
<reference ref=
"18634163"/>
764 +
<reference ref=
"601773126"/>
766 -
<reference key=
"parent" ref=
"1012601198"/>
767 +
<reference key=
"parent" ref=
"263788152"/>
769 <object class=
"IBObjectRecord">
770 -
<int key=
"objectID">93</int>
771 -
<reference key=
"object" ref=
"18634163"/>
772 -
<reference key=
"parent" ref=
"740198534"/>
773 +
<int key=
"objectID">98</int>
774 +
<reference key=
"object" ref=
"601773126"/>
775 +
<reference key=
"parent" ref=
"933582906"/>
777 +
<object class=
"IBObjectRecord">
778 +
<int key=
"objectID">108</int>
779 +
<reference key=
"object" ref=
"766070942"/>
780 +
<object class=
"NSMutableArray" key=
"children">
781 +
<bool key=
"EncodedWithXMLCoder">YES
</bool>
782 +
<reference ref=
"817763751"/>
784 +
<reference key=
"parent" ref=
"263788152"/>
786 +
<object class=
"IBObjectRecord">
787 +
<int key=
"objectID">109</int>
788 +
<reference key=
"object" ref=
"817763751"/>
789 +
<reference key=
"parent" ref=
"766070942"/>
793 @@ -
1040,
6 +
1191,
8 @@
794 <string>1.WindowOrigin
</string>
795 <string>1.editorWindowContentRectSynchronizationRect
</string>
796 <string>10.IBPluginDependency
</string>
797 +
<string>108.IBPluginDependency
</string>
798 +
<string>109.IBPluginDependency
</string>
799 <string>11.IBPluginDependency
</string>
800 <string>12.IBPluginDependency
</string>
801 <string>13.IBPluginDependency
</string>
802 @@ -
1073,
13 +
1226,
15 @@
803 <string>64.IBPluginDependency
</string>
804 <string>77.IBPluginDependency
</string>
805 <string>78.IBPluginDependency
</string>
806 -
<string>88.IBEditorWindowLastContentRect
</string>
807 +
<string>87.IBEditorWindowLastContentRect
</string>
808 +
<string>87.IBPluginDependency
</string>
809 <string>88.IBPluginDependency
</string>
810 +
<string>89.IBPluginDependency
</string>
811 <string>9.IBPluginDependency
</string>
812 <string>90.IBPluginDependency
</string>
813 <string>91.IBPluginDependency
</string>
814 -
<string>92.IBPluginDependency
</string>
815 -
<string>93.IBPluginDependency
</string>
816 +
<string>97.IBPluginDependency
</string>
817 +
<string>98.IBPluginDependency
</string>
819 <object class=
"NSMutableArray" key=
"dict.values">
820 <bool key=
"EncodedWithXMLCoder">YES
</bool>
821 @@ -
1103,
6 +
1258,
8 @@
822 <string>com.apple.InterfaceBuilder.CocoaPlugin
</string>
823 <string>com.apple.InterfaceBuilder.CocoaPlugin
</string>
824 <string>com.apple.InterfaceBuilder.CocoaPlugin
</string>
825 +
<string>com.apple.InterfaceBuilder.CocoaPlugin
</string>
826 +
<string>com.apple.InterfaceBuilder.CocoaPlugin
</string>
827 <string>{{
514,
459}, {
106,
71}}
</string>
828 <string>com.apple.InterfaceBuilder.CocoaPlugin
</string>
829 <string>com.apple.InterfaceBuilder.CocoaPlugin
</string>
830 @@ -
1133,
13 +
1290,
15 @@
831 <string>com.apple.InterfaceBuilder.CocoaPlugin
</string>
832 <string>com.apple.InterfaceBuilder.CocoaPlugin
</string>
833 <string>com.apple.InterfaceBuilder.CocoaPlugin
</string>
834 +
<string>{{
474,
394}, {
239,
54}}
</string>
835 +
<string>com.apple.InterfaceBuilder.CocoaPlugin
</string>
836 <string>com.apple.InterfaceBuilder.CocoaPlugin
</string>
837 <string>com.apple.InterfaceBuilder.CocoaPlugin
</string>
838 <string>com.apple.InterfaceBuilder.CocoaPlugin
</string>
839 <string>com.apple.InterfaceBuilder.CocoaPlugin
</string>
840 +
<string>{{
474,
352}, {
403,
116}}
</string>
841 +
<string>com.apple.InterfaceBuilder.CocoaPlugin
</string>
842 <string>com.apple.InterfaceBuilder.CocoaPlugin
</string>
843 -
<string>{{
211,
334}, {
400,
74}}
</string>
844 -
<string>{{
474,
394}, {
239,
54}}
</string>
845 <string>com.apple.InterfaceBuilder.CocoaPlugin
</string>
846 <string>com.apple.InterfaceBuilder.CocoaPlugin
</string>
847 <string>com.apple.InterfaceBuilder.CocoaPlugin
</string>
848 @@ -
1168,
7 +
1327,
7 @@
851 <nil key=
"sourceID"/>
852 -
<int key=
"maxID">101</int>
853 +
<int key=
"maxID">113</int>
855 <object class=
"IBClassDescriber" key=
"IBDocument.Classes">
856 <object class=
"NSMutableArray" key=
"referencedPartialClassDescriptions">
857 diff --git a/GitX.xcodeproj/project.pbxproj b/GitX.xcodeproj/project.pbxproj
858 index ec296ce.
.80f9df5
100644
859 --- a/GitX.xcodeproj/project.pbxproj
860 +++ b/GitX.xcodeproj/project.pbxproj
865 +/* Begin PBXAggregateTarget section */
866 + F56439F70F792B2100A579C2 /* Generate PList Prefix */ = {
867 + isa = PBXAggregateTarget;
868 + buildConfigurationList = F56439FD0F792B3600A579C2 /* Build configuration list for PBXAggregateTarget
"Generate PList Prefix" */;
870 + F56439F60F792B2100A579C2 /* ShellScript */,
874 + name =
"Generate PList Prefix";
875 + productName =
"Generate PList Prefix";
877 +/* End PBXAggregateTarget section */
879 /* Begin PBXBuildFile section */
880 056438B70ED0C40B00985397 /* DetailViewTemplate.png in Resources */ = {isa = PBXBuildFile; fileRef =
056438B60ED0C40B00985397 /* DetailViewTemplate.png */; };
881 3BC07F4C0ED5A5C5009A7768 /* HistoryViewTemplate.png in Resources */ = {isa = PBXBuildFile; fileRef =
3BC07F4A0ED5A5C5009A7768 /* HistoryViewTemplate.png */; };
883 F523CEB60ED3399200DDD714 /* PBGitIndexController.m in Sources */ = {isa = PBXBuildFile; fileRef = F523CEB50ED3399200DDD714 /* PBGitIndexController.m */; };
884 F52BCE030E84208300AA3741 /* PBGitHistoryView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F52BCE020E84208300AA3741 /* PBGitHistoryView.xib */; };
885 F52BCE070E84211300AA3741 /* PBGitHistoryController.m in Sources */ = {isa = PBXBuildFile; fileRef = F52BCE060E84211300AA3741 /* PBGitHistoryController.m */; };
886 + F53B61790F7FC9D3000E13FA /* PBGitRevPool.mm in Sources */ = {isa = PBXBuildFile; fileRef = F53B61780F7FC9D3000E13FA /* PBGitRevPool.mm */; };
887 + F53B617A0F7FC9D3000E13FA /* PBGitRevPool.mm in Sources */ = {isa = PBXBuildFile; fileRef = F53B61780F7FC9D3000E13FA /* PBGitRevPool.mm */; };
888 F53C4DF70E97FC630022AD59 /* PBGitBinary.m in Sources */ = {isa = PBXBuildFile; fileRef = F53C4DF60E97FC630022AD59 /* PBGitBinary.m */; };
889 F53C4DF80E97FCA70022AD59 /* PBGitBinary.m in Sources */ = {isa = PBXBuildFile; fileRef = F53C4DF60E97FC630022AD59 /* PBGitBinary.m */; };
890 F53C4DF90E97FCAD0022AD59 /* PBEasyPipe.m in Sources */ = {isa = PBXBuildFile; fileRef = F57CC3900E05DDF2000472E2 /* PBEasyPipe.m */; };
892 remoteGlobalIDString =
913D5E480E55644600CECEA2;
893 remoteInfo =
"cli tool";
895 + F5643A010F792B4900A579C2 /* PBXContainerItemProxy */ = {
896 + isa = PBXContainerItemProxy;
897 + containerPortal =
29B97313FDCFA39411CA2CEA /* Project object */;
899 + remoteGlobalIDString = F56439F70F792B2100A579C2;
900 + remoteInfo =
"Generate PList Prefix";
902 /* End PBXContainerItemProxy section */
904 /* Begin PBXCopyFilesBuildPhase section */
906 F52BCE020E84208300AA3741 /* PBGitHistoryView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PBGitHistoryView.xib; sourceTree =
"<group>"; };
907 F52BCE050E84211300AA3741 /* PBGitHistoryController.h */ = {isa = PBXFileReference; fileEncoding =
4; lastKnownFileType = sourcecode.c.h; path = PBGitHistoryController.h; sourceTree =
"<group>"; };
908 F52BCE060E84211300AA3741 /* PBGitHistoryController.m */ = {isa = PBXFileReference; fileEncoding =
4; lastKnownFileType = sourcecode.c.objc; path = PBGitHistoryController.m; sourceTree =
"<group>"; };
909 + F53B61770F7FC9D3000E13FA /* PBGitRevPool.h */ = {isa = PBXFileReference; fileEncoding =
4; lastKnownFileType = sourcecode.c.h; path = PBGitRevPool.h; sourceTree =
"<group>"; };
910 + F53B61780F7FC9D3000E13FA /* PBGitRevPool.mm */ = {isa = PBXFileReference; fileEncoding =
4; lastKnownFileType = sourcecode.cpp.objcpp; path = PBGitRevPool.mm; sourceTree =
"<group>"; };
911 + F53B64030F7FF5DC000E13FA /* PBRevPoolDelegate.h */ = {isa = PBXFileReference; fileEncoding =
4; lastKnownFileType = sourcecode.c.h; path = PBRevPoolDelegate.h; sourceTree =
"<group>"; };
912 F53C4DF50E97FC630022AD59 /* PBGitBinary.h */ = {isa = PBXFileReference; fileEncoding =
4; lastKnownFileType = sourcecode.c.h; path = PBGitBinary.h; sourceTree =
"<group>"; };
913 F53C4DF60E97FC630022AD59 /* PBGitBinary.m */ = {isa = PBXFileReference; fileEncoding =
4; lastKnownFileType = sourcecode.c.objc; path = PBGitBinary.m; sourceTree =
"<group>"; };
914 F53EE3590E06BBA00022B925 /* CWQuickLook.h */ = {isa = PBXFileReference; fileEncoding =
4; lastKnownFileType = sourcecode.c.h; path = CWQuickLook.h; sourceTree =
"<group>"; };
917 sourceTree =
"<group>";
919 + F53B61750F7FC9B9000E13FA /* RevLoading */ = {
922 + F53FF2030E7ABB5300389171 /* PBGitRevSpecifier.h */,
923 + F53FF2040E7ABB5300389171 /* PBGitRevSpecifier.m */,
924 + F5FF4E160E0829C20006317A /* PBGitRevList.h */,
925 + F5FF4E170E0829C20006317A /* PBGitRevList.mm */,
926 + F53B61770F7FC9D3000E13FA /* PBGitRevPool.h */,
927 + F53B61780F7FC9D3000E13FA /* PBGitRevPool.mm */,
928 + F53B64030F7FF5DC000E13FA /* PBRevPoolDelegate.h */,
931 + sourceTree =
"<group>";
933 F56174540E05887E001DCD79 /* Git */ = {
936 + F53B61750F7FC9B9000E13FA /* RevLoading */,
937 F5E927E30E883D6800056E75 /* Commit */,
938 F5E927E10E883D2E00056E75 /* History */,
939 F5945E150E02B0C200706420 /* PBGitRepository.h */,
941 F56524EF0E02D45200F03B52 /* PBGitCommit.m */,
942 F5C007730E731B48007B84B2 /* PBGitRef.h */,
943 F5C007740E731B48007B84B2 /* PBGitRef.m */,
944 - F5FF4E160E0829C20006317A /* PBGitRevList.h */,
945 - F5FF4E170E0829C20006317A /* PBGitRevList.mm */,
946 - F53FF2030E7ABB5300389171 /* PBGitRevSpecifier.h */,
947 - F53FF2040E7ABB5300389171 /* PBGitRevSpecifier.m */,
948 F56174550E058893001DCD79 /* PBGitTree.h */,
949 F56174560E058893001DCD79 /* PBGitTree.m */,
950 F5FC43C30EBD050800191D80 /* PBRefContextDelegate.h */,
952 isa = PBXNativeTarget;
953 buildConfigurationList =
26FC0A840875C7B200E6366F /* Build configuration list for PBXNativeTarget
"GitX" */;
955 - F5792DFB0EDB570C001B0C31 /* Compilie libgit2 */,
956 + F5792DFB0EDB570C001B0C31 /* Compile libgit2 */,
957 8D1107290486CEB800E47090 /* Resources */,
958 8D11072C0486CEB800E47090 /* Sources */,
959 8D11072E0486CEB800E47090 /* Frameworks */,
963 913D5E5A0E5564F400CECEA2 /* PBXTargetDependency */,
964 + F5643A020F792B4900A579C2 /* PBXTargetDependency */,
967 productInstallPath =
"$(HOME)/Applications";
969 8D1107260486CEB800E47090 /* GitX */,
970 913D5E480E55644600CECEA2 /* cli tool */,
971 F5886A0F0ED5D33D0066E74C /* SpeedTest */,
972 + F56439F70F792B2100A579C2 /* Generate PList Prefix */,
975 /* End PBXProject section */
976 @@ -
723,
19 +
762,
32 @@
977 /* End PBXResourcesBuildPhase section */
979 /* Begin PBXShellScriptBuildPhase section */
980 - F5792DFB0EDB570C001B0C31 /* Compilie libgit2 */ = {
981 + F56439F60F792B2100A579C2 /* ShellScript */ = {
982 + isa = PBXShellScriptBuildPhase;
983 + buildActionMask =
2147483647;
990 + runOnlyForDeploymentPostprocessing =
0;
991 + shellPath = /bin/sh;
992 + 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";
994 + F5792DFB0EDB570C001B0C31 /* Compile libgit2 */ = {
995 isa = PBXShellScriptBuildPhase;
996 buildActionMask =
2147483647;
1001 - name =
"Compilie libgit2";
1002 + name =
"Compile libgit2";
1005 runOnlyForDeploymentPostprocessing =
0;
1006 shellPath = /bin/sh;
1007 - shellScript =
"git submodule init\ngit submodule update\ncd libgit2\nrm -f libgit2.a\nmake CFLAGS=\"-arch i386 -arch ppc\
"\nranlib libgit2.a";
1008 + 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";
1010 F5CF04A20EAE696C00D75C81 /* Copy HTML files */ = {
1011 isa = PBXShellScriptBuildPhase;
1013 47DBDB580E94EDE700671A1E /* DBPrefsWindowController.m in Sources */,
1014 47DBDB670E94EE8B00671A1E /* PBPrefsWindowController.m in Sources */,
1015 47DBDBCA0E95016F00671A1E /* PBNSURLPathUserDefaultsTransfomer.m in Sources */,
1016 + F53B61790F7FC9D3000E13FA /* PBGitRevPool.mm in Sources */,
1018 runOnlyForDeploymentPostprocessing =
0;
1021 F5886A170ED5D34F0066E74C /* PBGitRepository.m in Sources */,
1022 F5886A190ED5D3560066E74C /* PBGitRef.m in Sources */,
1023 F5886A160ED5D3490066E74C /* speedtest.m in Sources */,
1024 + F53B617A0F7FC9D3000E13FA /* PBGitRevPool.mm in Sources */,
1026 runOnlyForDeploymentPostprocessing =
0;
1028 @@ -
850,
6 +
904,
11 @@
1029 target =
913D5E480E55644600CECEA2 /* cli tool */;
1030 targetProxy =
913D5E590E5564F400CECEA2 /* PBXContainerItemProxy */;
1032 + F5643A020F792B4900A579C2 /* PBXTargetDependency */ = {
1033 + isa = PBXTargetDependency;
1034 + target = F56439F70F792B2100A579C2 /* Generate PList Prefix */;
1035 + targetProxy = F5643A010F792B4900A579C2 /* PBXContainerItemProxy */;
1037 /* End PBXTargetDependency section */
1039 /* Begin PBXVariantGroup section */
1041 GCC_PREFIX_HEADER = GitX_Prefix.pch;
1042 HEADER_SEARCH_PATHS = libgit2/src;
1043 INFOPLIST_FILE = Info.plist;
1044 + INFOPLIST_OTHER_PREPROCESSOR_FLAGS =
"-traditional";
1045 + INFOPLIST_PREFIX_HEADER = build/revision;
1046 + INFOPLIST_PREPROCESS = YES;
1047 INSTALL_PATH =
"$(HOME)/Applications";
1048 LIBRARY_SEARCH_PATHS = libgit2;
1049 PRODUCT_NAME = GitX;
1051 26FC0A860875C7B200E6366F /* Release */ = {
1052 isa = XCBuildConfiguration;
1054 - DEBUG_INFORMATION_FORMAT =
"dwarf-with-dsym";
1055 + DEBUG_INFORMATION_FORMAT = dwarf;
1056 FRAMEWORK_SEARCH_PATHS = (
1059 @@ -
925,
8 +
987,
12 @@
1060 GCC_MODEL_TUNING = G5;
1061 GCC_PRECOMPILE_PREFIX_HEADER = YES;
1062 GCC_PREFIX_HEADER = GitX_Prefix.pch;
1063 + GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS =
"";
1064 HEADER_SEARCH_PATHS = libgit2/src;
1065 INFOPLIST_FILE = Info.plist;
1066 + INFOPLIST_OTHER_PREPROCESSOR_FLAGS =
"-traditional";
1067 + INFOPLIST_PREFIX_HEADER = build/revision;
1068 + INFOPLIST_PREPROCESS = YES;
1069 INSTALL_PATH =
"$(HOME)/Applications";
1070 LIBRARY_SEARCH_PATHS = libgit2;
1071 PRODUCT_NAME = GitX;
1072 @@ -
938,
6 +
1004,
7 @@
1073 isa = XCBuildConfiguration;
1075 GCC_ENABLE_OBJC_GC = required;
1076 + GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = DEBUG_BUILD;
1077 GCC_WARN_ABOUT_RETURN_TYPE = YES;
1078 GCC_WARN_UNUSED_VARIABLE = YES;
1080 @@ -
1007,
6 +
1074,
27 @@
1084 + F56439F80F792B2100A579C2 /* Debug */ = {
1085 + isa = XCBuildConfiguration;
1087 + COPY_PHASE_STRIP = NO;
1088 + GCC_DYNAMIC_NO_PIC = NO;
1089 + GCC_OPTIMIZATION_LEVEL =
0;
1090 + PRODUCT_NAME =
"Generate PList Prefix";
1094 + F56439F90F792B2100A579C2 /* Release */ = {
1095 + isa = XCBuildConfiguration;
1097 + COPY_PHASE_STRIP = YES;
1098 + DEBUG_INFORMATION_FORMAT =
"dwarf-with-dsym";
1099 + GCC_ENABLE_FIX_AND_CONTINUE = NO;
1100 + PRODUCT_NAME =
"Generate PList Prefix";
1105 F5886A130ED5D33E0066E74C /* Debug */ = {
1106 isa = XCBuildConfiguration;
1108 @@ -
1018,
6 +
1106,
7 @@
1109 GCC_OPTIMIZATION_LEVEL =
2;
1110 GCC_PRECOMPILE_PREFIX_HEADER = YES;
1111 GCC_PREFIX_HEADER = GitX_Prefix.pch;
1113 HEADER_SEARCH_PATHS = libgit2/src;
1114 INFOPLIST_FILE =
"SpeedTest-Info.plist";
1115 INSTALL_PATH =
"$(HOME)/Applications";
1116 @@ -
1092,
6 +
1181,
15 @@
1117 defaultConfigurationIsVisible =
0;
1118 defaultConfigurationName = Release;
1120 + F56439FD0F792B3600A579C2 /* Build configuration list for PBXAggregateTarget
"Generate PList Prefix" */ = {
1121 + isa = XCConfigurationList;
1122 + buildConfigurations = (
1123 + F56439F80F792B2100A579C2 /* Debug */,
1124 + F56439F90F792B2100A579C2 /* Release */,
1126 + defaultConfigurationIsVisible =
0;
1127 + defaultConfigurationName = Release;
1129 F5886A150ED5D33E0066E74C /* Build configuration list for PBXNativeTarget
"SpeedTest" */ = {
1130 isa = XCConfigurationList;
1131 buildConfigurations = (
1132 diff --git a/Info.plist b/Info.plist
1133 index
5e6e411.
.9c50c45
100644
1138 <key>CFBundleTypeExtensions
</key>
1140 +
<string>*
</string>
1142 +
<key>CFBundleTypeRole
</key>
1143 +
<string>None
</string>
1144 +
<key>CFBundleTypeName
</key>
1145 +
<string>Standard folder
</string>
1148 +
<key>CFBundleTypeExtensions
</key>
1150 <string>git
</string>
1154 <key>CFBundleSignature
</key>
1155 <string>????
</string>
1156 <key>CFBundleVersion
</key>
1157 -
<string>0.6.1</string>
1158 +
<string>LONG_VERSION
</string>
1159 <key>CFBundleShortVersionString
</key>
1160 -
<string>0.6.1</string>
1161 +
<string>SHORT_VERSION
</string>
1162 <key>NSMainNibFile
</key>
1163 <string>MainMenu
</string>
1164 <key>NSPrincipalClass
</key>
1165 diff --git a/PBGitCommit.h b/PBGitCommit.h
1166 index
70a6001.
.461f01f
100644
1170 #include
"git/oid.h"
1172 @interface PBGitCommit : NSObject {
1174 - git_oid *parentShas;
1176 + git_oid **parentShas;
1184 - PBGitRepository* repository;
1185 + PBGitRepository *repository;
1188 -- initWithRepository:(PBGitRepository *)repo andSha:(git_oid)sha;
1189 +- initWithRepository:(PBGitRepository *)repo andSha:(git_oid *)sha;
1191 -- (void)addRef:(id)ref;
1192 +- (void)addRef:(PBGitRef *)ref;
1193 - (void)removeRef:(id)ref;
1195 - (NSString *)realSha;
1197 @property (copy) NSString* author;
1198 @property (readonly) NSArray* parents; // TODO: remove this and its uses
1200 -@property (assign) git_oid *parentShas;
1201 +@property (assign) git_oid **parentShas;
1202 @property (assign) int nParents, timestamp;
1204 @property (retain) NSMutableArray* refs;
1205 diff --git a/PBGitCommit.m b/PBGitCommit.m
1206 index
37dc312.
.51b9feb
100644
1209 @@ -
22,
7 +
22,
7 @@ - (NSArray *) parents
1210 NSMutableArray *p = [NSMutableArray arrayWithCapacity:nParents];
1211 for (i =
0; i < nParents; ++i)
1213 - char *s = git_oid_mkhex(parentShas + i);
1214 + char *s = git_oid_mkhex(parentShas[i]);
1215 [p addObject:[NSString stringWithUTF8String:s]];
1218 @@ -
47,
10 +
47,
10 @@ - (NSArray*) treeContents
1226 -- initWithRepository:(PBGitRepository*) repo andSha:(git_oid)newSha
1227 +- initWithRepository:(PBGitRepository*) repo andSha:(git_oid *)newSha
1231 @@ -
60,
7 +
60,
7 @@ - (git_oid *)sha
1233 - (NSString *)realSha
1235 - char *hex = git_oid_mkhex(&sha);
1236 + char *hex = git_oid_mkhex(sha);
1237 NSString *str = [NSString stringWithUTF8String:hex];
1240 @@ -
94,
7 +
94,
7 @@ - (PBGitTree*) tree
1241 return [PBGitTree rootForCommit: self];
1244 -- (void)addRef:(id)ref
1245 +- (void)addRef:(PBGitRef *)ref
1248 self.refs = [NSMutableArray arrayWithObject:ref];
1249 @@ -
108,
8 +
108,
6 @@ - (void)removeRef:(id)ref
1252 [self.refs removeObject:ref];
1253 - if ([self.refs count] ==
0)
1257 - (NSMutableArray *)refs
1258 @@ -
119,
7 +
117,
7 @@ - (NSMutableArray *)refs
1260 - (void) setRefs:(NSMutableArray *)refs
1262 - [[repository refs] setObject:[self realSha] forKey:[self realSha]];
1263 + [[repository refs] setObject:refs forKey:[self realSha]];
1267 diff --git a/PBGitCommitController.m b/PBGitCommitController.m
1268 index
22e995e.
.03b6a76
100644
1269 --- a/PBGitCommitController.m
1270 +++ b/PBGitCommitController.m
1271 @@ -
85,
6 +
85,
11 @@ - (void) refresh:(id) sender
1272 file.shouldBeDeleted = YES;
1274 self.status = @
"Refreshing index…";
1275 + if (![repository workingDirectory]) {
1276 + //if ([[repository outputForCommand:@
"rev-parse --is-inside-work-tree"] isEqualToString:@
"false"]) {
1282 [repository outputInWorkdirForArguments:[NSArray arrayWithObjects:@
"update-index", @
"-q", @
"--unmerged", @
"--ignore-missing", @
"--refresh", nil]];
1283 @@ -
134,
6 +
139,
7 @@ - (void) doneProcessingIndex
1285 - (void) readOtherFiles:(NSNotification *)notification;
1287 + [unstagedFilesController setAutomaticallyRearrangesObjects:NO];
1288 NSArray *lines = [self linesFromNotification:notification];
1289 for (NSString *line in lines) {
1290 if ([line length] ==
0)
1291 @@ -
148,
7 +
154,
7 @@ - (void) readOtherFiles:(NSNotification *)notification;
1293 file.hasCachedChanges = NO;
1294 file.hasUnstagedChanges = YES;
1300 @@ -
162,
7 +
168,
8 @@ - (void) readOtherFiles:(NSNotification *)notification;
1301 file.hasUnstagedChanges = YES;
1302 [files addObject: file];
1305 + [unstagedFilesController setAutomaticallyRearrangesObjects:YES];
1306 + [unstagedFilesController rearrangeObjects];
1307 [self doneProcessingIndex];
1310 @@ -
186,
17 +
193,
17 @@ - (void) addFilesFromLines:(NSArray *)lines cached:(BOOL) cached
1311 // but rather update it to incorporate our changes
1312 for (PBChangedFile *file in files) {
1313 if ([file.path isEqualToString:line]) {
1314 - file.shouldBeDeleted = NO;
1316 - file.commitBlobSHA = sha;
1317 + if (cached && file.hasCachedChanges) { // if we're listing cached files
1318 + file.shouldBeDeleted = NO; // and the matching file in files had cached changes
1319 + file.commitBlobSHA = sha; // we don't delete it
1320 file.commitBlobMode = mode;
1321 - file.hasCachedChanges = YES;
1324 + } else if ((!cached) && file.hasUnstagedChanges) { // if we're listing unstaged files and the
1325 + file.shouldBeDeleted = NO; // matching file in files had unstaged changes
1326 + isNew = NO; // we don't delete it
1330 - file.hasUnstagedChanges = YES;
1337 diff --git a/PBGitConfig.h b/PBGitConfig.h
1338 index
9875a3c.
.1645819 100644
1345 -- initWithRepository:(NSString *)path;
1346 +- initWithRepositoryPath:(NSString *)path;
1348 diff --git a/PBGitConfig.m b/PBGitConfig.m
1349 index
3d4f156.
.31ea6f5
100644
1352 @@ -
17,
7 +
17,
7 @@ @implementation PBGitConfig
1356 -- initWithRepository:(NSString *)path
1357 +- initWithRepositoryPath:(NSString *)path
1359 repositoryPath = path;
1361 diff --git a/PBGitDefaults.h b/PBGitDefaults.h
1362 index
84f7a18.
.2e2444b
100644
1363 --- a/PBGitDefaults.h
1364 +++ b/PBGitDefaults.h
1366 + (int) commitMessageViewVerticalLineLength;
1367 + (BOOL) isGistEnabled;
1368 + (BOOL) isGravatarEnabled;
1369 ++ (BOOL) confirmPublicGists;
1370 ++ (BOOL) isGistPublic;
1373 diff --git a/PBGitDefaults.m b/PBGitDefaults.m
1374 index
6b08695.
.676fa72
100644
1375 --- a/PBGitDefaults.m
1376 +++ b/PBGitDefaults.m
1378 #define kCommitMessageViewVerticalLineLength @
"PBCommitMessageViewVerticalLineLength"
1379 #define kEnableGist @
"PBEnableGist"
1380 #define kEnableGravatar @
"PBEnableGravatar"
1381 +#define kConfirmPublicGists @
"PBConfirmPublicGists"
1382 +#define kPublicGist @
"PBGistPublic"
1384 @implementation PBGitDefaults
1386 @@ -
24,
6 +
26,
10 @@ + (void)initialize
1387 forKey:kEnableGist];
1388 [defaultValues setObject:[NSNumber numberWithBool:YES]
1389 forKey:kEnableGravatar];
1390 + [defaultValues setObject:[NSNumber numberWithBool:YES]
1391 + forKey:kConfirmPublicGists];
1392 + [defaultValues setObject:[NSNumber numberWithBool:NO]
1393 + forKey:kPublicGist];
1394 [[NSUserDefaults standardUserDefaults] registerDefaults:defaultValues];
1397 @@ -
42,
4 +
48,
13 @@ + (BOOL) isGravatarEnabled
1398 return [[NSUserDefaults standardUserDefaults] boolForKey:kEnableGravatar];
1401 ++ (BOOL) confirmPublicGists
1403 + return [[NSUserDefaults standardUserDefaults] boolForKey:kConfirmPublicGists];
1406 ++ (BOOL) isGistPublic
1408 + return [[NSUserDefaults standardUserDefaults] boolForKey:kPublicGist];
1411 diff --git a/PBGitGrapher.h b/PBGitGrapher.h
1412 index d17f3bd.
.76be163
100644
1413 --- a/PBGitGrapher.h
1414 +++ b/PBGitGrapher.h
1418 #import
<Cocoa/Cocoa.h
>
1420 #import
"PBGitCommit.h"
1421 #import
"PBGitGraphLine.h"
1422 #import
"PBGraphCellInfo.h"
1424 +@class PBGitRepository;
1426 @interface PBGitGrapher : NSObject {
1427 PBGraphCellInfo *previous;
1432 -- (id) initWithRepository:(PBGitRepository *)repo;
1433 -- (void) decorateCommit:(PBGitCommit *)commit;
1434 +- initWithRepository:(PBGitRepository *)repo;
1435 +- (void)decorateCommit:(PBGitCommit *)commit;
1437 diff --git a/PBGitGrapher.mm b/PBGitGrapher.mm
1438 index f9daf84.
.3864c87
100644
1439 --- a/PBGitGrapher.mm
1440 +++ b/PBGitGrapher.mm
1442 #import
"PBGitCommit.h"
1443 #import
"PBGitLane.h"
1444 #import
"PBGitGraphLine.h"
1445 +#import
"PBGitRepository.h"
1449 @@ -
19,
7 +
20,
7 @@ @implementation PBGitGrapher
1451 #define MAX_LANES
32
1453 -- (id) initWithRepository: (PBGitRepository*) repo
1454 +- initWithRepository:(PBGitRepository *)repo
1456 pl = new std::list
<PBGitLane *
>;
1458 @@ -
85,
7 +
86,
7 @@ - (void) decorateCommit: (PBGitCommit *) commit
1460 // If we already did the first parent, don't do so again
1461 if (!didFirst && currentLanes-
>size() < MAX_LANES && commit.nParents) {
1462 - PBGitLane *newLane = new PBGitLane(commit.parentShas);
1463 + PBGitLane *newLane = new PBGitLane(*commit.parentShas);
1464 currentLanes-
>push_back(newLane);
1465 newPos = currentLanes-
>size();
1466 add_line(lines, ¤tLine,
0, newPos, newPos, newLane-
>index());
1467 @@ -
99,
7 +
100,
7 @@ - (void) decorateCommit: (PBGitCommit *) commit
1470 for (parentIndex =
1; parentIndex < commit.nParents; ++parentIndex) {
1471 - git_oid *parent = commit.parentShas + parentIndex;
1472 + git_oid *parent = commit.parentShas[parentIndex];
1474 BOOL was_displayed = NO;
1475 std::list
<PBGitLane *
>::iterator it = currentLanes-
>begin();
1476 @@ -
139,
7 +
140,
7 @@ - (void) decorateCommit: (PBGitCommit *) commit
1478 // Update the current lane to point to the new parent
1479 if (currentLane && commit.nParents
> 0)
1480 - currentLane-
>setSha(commit.parentShas[
0]);
1481 + currentLane-
>setSha(*commit.parentShas[
0]);
1483 currentLanes-
>remove(currentLane);
1485 diff --git a/PBGitHistoryController.m b/PBGitHistoryController.m
1486 index
69a79f7..b193028
100644
1487 --- a/PBGitHistoryController.m
1488 +++ b/PBGitHistoryController.m
1490 #import
"PBGitHistoryController.h"
1491 #import
"CWQuickLook.h"
1492 #import
"PBGitGrapher.h"
1493 +#import
"PBGitRevList.h"
1494 #import
"PBGitRevisionCell.h"
1495 #import
"PBCommitList.h"
1496 #define QLPreviewPanel NSClassFromString(@
"QLPreviewPanel")
1497 diff --git a/PBGitIndexController.m b/PBGitIndexController.m
1498 index d5dbb91..a89d70f
100644
1499 --- a/PBGitIndexController.m
1500 +++ b/PBGitIndexController.m
1501 @@ -
145,
7 +
145,
7 @@ - (NSString *)unstagedChangesForFile:(PBChangedFile *)file
1505 - return [commitController.repository outputInWorkdirForArguments:[NSArray arrayWithObjects:@
"diff", [self contextParameter], @
"--", file.path, nil]];
1506 + return [commitController.repository outputInWorkdirForArguments:[NSArray arrayWithObjects:@
"diff-files", [self contextParameter], @
"--", file.path, nil]];
1509 - (void) forceRevertChangesForFiles:(NSArray *)files
1510 diff --git a/PBGitLane.h b/PBGitLane.h
1511 index
2a1dcd9.
.57d59c8
100644
1514 @@ -
33,
7 +
33,
7 @@ public:
1515 d_index = s_colorIndex++;
1518 - bool PBGitLane::isCommit(git_oid *sha) const
1519 + bool isCommit(git_oid *sha) const
1521 return !git_oid_cmp(&d_sha, sha);
1523 diff --git a/PBGitRepository.h b/PBGitRepository.h
1524 index d3be759.
.75cb4f1
100644
1525 --- a/PBGitRepository.h
1526 +++ b/PBGitRepository.h
1530 #import
<Cocoa/Cocoa.h
>
1531 -#import
"PBGitRevList.h"
1532 -#import
"PBGitRevSpecifier.h"
1533 -#import
"PBGitConfig.h"
1535 +@class PBGitConfig;
1536 +@class PBGitRevList;
1537 +@class PBGitRevSpecifier;
1540 extern NSString* PBGitRepositoryErrorDomain;
1542 @interface PBGitRepository : NSDocument {
1543 - PBGitRevList* revisionList;
1544 + PBGitRevList *revisionList;
1545 PBGitConfig *config;
1548 @@ -
38,
6 +
40,
7 @@ extern NSString* PBGitRepositoryErrorDomain;
1550 - (NSString *)workingDirectory;
1551 - (NSString *)gitIgnoreFilename;
1552 +- (BOOL)isBareRepository;
1554 - (BOOL) reloadRefs;
1555 - (void) addRef:(PBGitRef *)ref fromParameters:(NSArray *)params;
1556 @@ -
59,
8 +
62,
8 @@ extern NSString* PBGitRepositoryErrorDomain;
1557 @property (assign) BOOL hasChanged;
1558 @property (readonly) NSWindowController *windowController;
1559 @property (readonly) PBGitConfig *config;
1560 -@property (retain) PBGitRevList* revisionList;
1561 -@property (assign) NSMutableArray* branches;
1562 +@property (retain) PBGitRevList *revisionList;
1563 +@property (assign) NSMutableArray *branches;
1564 @property (assign) PBGitRevSpecifier *currentBranch;
1565 -@property (retain) NSMutableDictionary* refs;
1566 +@property (retain) NSMutableDictionary *refs;
1568 diff --git a/PBGitRepository.m b/PBGitRepository.m
1569 index
72326ca.
.8637f20
100644
1570 --- a/PBGitRepository.m
1571 +++ b/PBGitRepository.m
1573 #import
"PBGitCommit.h"
1574 #import
"PBGitWindowController.h"
1575 #import
"PBGitBinary.h"
1577 +#import
"PBGitRevSpecifier.h"
1578 #import
"NSFileHandleExt.h"
1579 #import
"PBEasyPipe.h"
1580 #import
"PBGitRef.h"
1581 #import
"PBGitRevSpecifier.h"
1583 +#import
"PBGitConfig.h"
1584 +#import
"PBGitRevList.h"
1586 NSString* PBGitRepositoryErrorDomain = @
"GitXErrorDomain";
1588 @implementation PBGitRepository
1589 @@ -
114,
7 +
117,
7 @@ - (BOOL)readFromFileWrapper:(NSFileWrapper *)fileWrapper ofType:(NSString *)type
1593 - config = [[PBGitConfig alloc] initWithRepository:self.fileURL.path];
1594 + config = [[PBGitConfig alloc] initWithRepositoryPath:self.fileURL.path];
1595 self.branches = [NSMutableArray array];
1597 revisionList = [[PBGitRevList alloc] initWithRepository:self];
1598 @@ -
161,
6 +
164,
11 @@ - (NSString*)gitIgnoreFilename
1599 return [[self workingDirectory] stringByAppendingPathComponent:@
".gitignore"];
1602 +- (BOOL)isBareRepository
1604 + return [PBGitRepository isBareRepository:[self fileURL].path];
1607 // Overridden to create our custom window controller
1608 - (void)makeWindowControllers
1610 diff --git a/PBGitRevList.h b/PBGitRevList.h
1611 index
2f71c3f.
.4d274ff
100644
1612 --- a/PBGitRevList.h
1613 +++ b/PBGitRevList.h
1616 #import
<Cocoa/Cocoa.h
>
1618 +@class PBGitRepository;
1619 +@class PBGitGrapher;
1621 @interface PBGitRevList : NSObject {
1624 + NSMutableArray *commits;
1625 + PBGitRepository *repository;
1626 + PBGitGrapher *grapher;
1630 -- initWithRepository:(id)repo;
1631 -- (void) readCommitsForce: (BOOL) force;
1633 +- initWithRepository:(PBGitRepository *)repo;
1634 +- (void)readCommitsForce:(BOOL)force;
1637 -@property(retain) NSArray* commits;
1638 +@property (retain) NSMutableArray *commits;
1641 diff --git a/PBGitRevList.mm b/PBGitRevList.mm
1642 index ba39a3a.
.987173a
100644
1643 --- a/PBGitRevList.mm
1644 +++ b/PBGitRevList.mm
1648 #import
"PBGitRevList.h"
1649 +#import
"PBGitGrapher.h"
1651 +#import
"PBRevPoolDelegate.h"
1653 #import
"PBGitRepository.h"
1654 #import
"PBGitCommit.h"
1655 -#import
"PBGitGrapher.h"
1656 #import
"PBGitRevSpecifier.h"
1657 +#import
"PBGitRevPool.h"
1658 +#import
"PBGitRepository.h"
1660 #include
"git/oid.h"
1661 #include
<ext/stdio_filebuf.h
>
1665 using namespace std;
1667 @implementation PBGitRevList
1669 @synthesize commits;
1670 -- initWithRepository: (id) repo
1671 +- initWithRepository:(PBGitRepository *)repo
1674 [repository addObserver:self forKeyPath:@
"currentBranch" options:
0 context:nil];
1675 @@ -
66,
119 +
70,
21 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object
1676 [self readCommitsForce: NO];
1679 -- (void) walkRevisionListWithSpecifier: (PBGitRevSpecifier*) rev
1680 +- (void) walkRevisionListWithSpecifier:(PBGitRevSpecifier *)rev
1682 - NSDate *start = [NSDate date];
1683 - NSMutableArray* revisions = [NSMutableArray array];
1684 - PBGitGrapher* g = [[PBGitGrapher alloc] initWithRepository: repository];
1686 - NSMutableArray* arguments;
1687 - BOOL showSign = [rev hasLeftRight];
1690 - arguments = [NSMutableArray arrayWithObjects:@
"log", @
"-z", @
"--early-output", @
"--topo-order", @
"--pretty=format:%H\01%an\01%s\01%P\01%at\01%m", nil];
1692 - arguments = [NSMutableArray arrayWithObjects:@
"log", @
"-z", @
"--early-output", @
"--topo-order", @
"--pretty=format:%H\01%an\01%s\01%P\01%at", nil];
1695 - [arguments addObject:@
"HEAD"];
1697 - [arguments addObjectsFromArray:[rev parameters]];
1699 - if ([rev hasPathLimiter])
1700 - [arguments insertObject:@
"--children" atIndex:
1];
1702 - NSTask *task = [PBEasyPipe taskForCommand:[PBGitBinary path] withArgs:arguments inDir:[repository fileURL].path];
1704 - NSFileHandle* handle = [task.standardOutput fileHandleForReading];
1706 - int fd = [handle fileDescriptor];
1707 - __gnu_cxx::stdio_filebuf
<char> buf(fd, std::ios::in);
1708 - std::istream stream(&buf);
1713 - if (!getline(stream, sha, '\
1'))
1716 - // We reached the end of some temporary output. Show what we have
1717 - // until now, and then start again. The sha of the next thing is still
1718 - // in this buffer. So, we use a substring of current input.
1719 - if (sha[
1] == 'i') // Matches 'Final output'
1722 - [self performSelectorOnMainThread:@selector(setCommits:) withObject:revisions waitUntilDone:NO];
1723 - g = [[PBGitGrapher alloc] initWithRepository: repository];
1724 - revisions = [NSMutableArray array];
1726 - sha = sha.substr(sha.length() -
40,
40);
1729 - // From now on,
1.2 seconds
1731 - git_oid_mkstr(&oid, sha.c_str());
1732 - PBGitCommit* newCommit = [[PBGitCommit alloc] initWithRepository:repository andSha:oid];
1735 - getline(stream, author, '\
1');
1738 - getline(stream, subject, '\
1');
1740 - string parentString;
1741 - getline(stream, parentString, '\
1');
1742 - if (parentString.size() !=
0)
1744 - if (((parentString.size() +
1) %
41) !=
0) {
1745 - NSLog(@
"invalid parents: %i", parentString.size());
1748 - int nParents = (parentString.size() +
1) /
41;
1749 - git_oid *parents = (git_oid *)malloc(sizeof(git_oid) * nParents);
1751 - for (parentIndex =
0; parentIndex < nParents; ++parentIndex)
1752 - git_oid_mkstr(parents + parentIndex, parentString.substr(parentIndex *
41,
40).c_str());
1754 - newCommit.parentShas = parents;
1755 - newCommit.nParents = nParents;
1762 - [newCommit setSubject:[NSString stringWithUTF8String:subject.c_str()]];
1763 - [newCommit setAuthor:[NSString stringWithUTF8String:author.c_str()]];
1764 - [newCommit setTimestamp:time];
1769 - stream
>> c; // Remove separator
1771 - if (c != '
>' && c != '<' && c != '^' && c != '-')
1772 - NSLog(@
"Error loading commits: sign not correct");
1773 - [newCommit setSign: c];
1779 - cout <<
"Error" << endl;
1781 - [revisions addObject: newCommit];
1782 - [g decorateCommit: newCommit];
1784 - if (++num %
1000 ==
0)
1785 - [self performSelectorOnMainThread:@selector(setCommits:) withObject:revisions waitUntilDone:NO];
1788 - NSTimeInterval duration = [[NSDate date] timeIntervalSinceDate:start];
1789 - NSLog(@
"Loaded %i commits in %f seconds", num, duration);
1790 - // Make sure the commits are stored before exiting.
1791 - [self performSelectorOnMainThread:@selector(setCommits:) withObject:revisions waitUntilDone:YES];
1792 - [task waitUntilExit];
1793 + commits = [NSMutableArray array];
1794 + grapher = [[PBGitGrapher alloc] initWithRepository:repository];
1795 + PBGitRevPool *pool = [[PBGitRevPool alloc] initWithRepository:repository];
1796 + pool.delegate = self;
1797 + [pool loadRevisions:rev];
1798 + [self performSelectorOnMainThread:@selector(setCommits:) withObject:commits waitUntilDone:YES];
1802 +- (void)revPool:(PBGitRevPool *)pool encounteredCommit:(PBGitCommit *)commit
1804 + [commits addObject: commit];
1805 + [grapher decorateCommit: commit];
1809 diff --git a/PBGitRevPool.h b/PBGitRevPool.h
1810 new file mode
100644
1811 index
0000000.
.7c834eb
1813 +++ b/PBGitRevPool.h
1819 +// Created by Pieter de Bie on
29-
03-
09.
1820 +// Copyright
2009 Pieter de Bie. All rights reserved.
1823 +#import
<Cocoa/Cocoa.h
>
1824 +#include
"git/oid.h"
1826 +@class PBGitRepository;
1827 +@class PBGitCommit;
1828 +@class PBGitRevSpecifier;
1830 +@interface PBGitRevPool : NSObject {
1831 + PBGitRepository *repository;
1832 + __weak id delegate;
1833 + NSMapTable *revisions;
1836 +@property (assign) __weak id delegate;
1838 +- initWithRepository:(PBGitRepository *)repo;
1839 +- (void)loadRevisions:(PBGitRevSpecifier *)revisions;
1841 +- (PBGitCommit *)commitWithSha:(NSString *)sha;
1842 +- (PBGitCommit *)commitWithOid:(git_oid *)oid;
1845 +@interface NSObject(PBRevPoolDelegate)
1847 +- (void)revPool:(PBGitRevPool *)pool encounteredCommit:(PBGitCommit *)commit;
1850 diff --git a/PBGitRevPool.mm b/PBGitRevPool.mm
1851 new file mode
100644
1852 index
0000000.
.1a3bc3e
1854 +++ b/PBGitRevPool.mm
1860 +// Created by Pieter de Bie on
29-
03-
09.
1861 +// Copyright
2009 Pieter de Bie. All rights reserved.
1864 +#import
"PBGitRevSpecifier.h"
1865 +#import
"PBGitRevPool.h"
1866 +#import
"PBGitCommit.h"
1867 +#import
"PBGitRepository.h"
1868 +#import
"PBEasyPipe.h"
1869 +#import
"PBGitBinary.h"
1870 +#import
"PBRevPoolDelegate.h"
1872 +#include
"git/oid.h"
1873 +#include
<ext/stdio_filebuf.h
>
1874 +#include
<iostream>
1877 +using namespace std;
1879 +@implementation PBGitRevPool
1881 +@synthesize delegate;
1883 +NSUInteger git_oid_size(const void *item)
1885 + git_oid *oid = (git_oid *)item;
1886 + return sizeof(*oid);
1889 +- initWithRepository:(PBGitRepository *)repo
1891 + if (![super init])
1894 + repository = repo;
1895 + NSPointerFunctions *keyFunctions = [NSPointerFunctions pointerFunctionsWithOptions:NSPointerFunctionsOpaqueMemory|NSPointerFunctionsStructPersonality];
1896 + keyFunctions.sizeFunction = git_oid_size;
1897 + NSPointerFunctions *valueFunction = [NSPointerFunctions pointerFunctionsWithOptions:NSPointerFunctionsStrongMemory|NSPointerFunctionsObjectPersonality];
1898 + revisions = [[NSMapTable alloc] initWithKeyPointerFunctions:keyFunctions valuePointerFunctions:valueFunction capacity:
100];
1902 +- (void)loadRevisions:(PBGitRevSpecifier *)rev
1904 + NSDate *start = [NSDate date];
1906 + NSMutableArray* arguments = [NSMutableArray arrayWithObjects:@
"log", @
"-z", @
"--pretty=format:%H\01%an\01%s\01%P\01%at", nil];
1909 + [arguments addObject:@
"HEAD"];
1911 + [arguments addObjectsFromArray:[rev parameters]];
1913 + NSTask *task = [PBEasyPipe taskForCommand:[PBGitBinary path] withArgs:arguments inDir:[repository fileURL].path];
1915 + NSFileHandle *handle = [task.standardOutput fileHandleForReading];
1916 + int fd = [handle fileDescriptor];
1917 + __gnu_cxx::stdio_filebuf
<char> buf(fd, std::ios::in);
1918 + std::istream stream(&buf);
1923 + if (!getline(stream, sha, '\
1'))
1926 + // From now on,
1.2 seconds
1927 + git_oid *oid = (git_oid *)malloc(sizeof(git_oid));
1929 + git_oid_mkstr(oid, sha.c_str());
1930 + PBGitCommit *newCommit = [[PBGitCommit alloc] initWithRepository:repository andSha:oid];
1933 + getline(stream, author, '\
1');
1936 + getline(stream, subject, '\
1');
1938 + string parentString;
1939 + getline(stream, parentString, '\
1');
1940 + if (parentString.size() !=
0)
1942 + if (((parentString.size() +
1) %
41) !=
0) {
1943 + NSLog(@
"invalid parents: %i", parentString.size());
1946 + int nParents = (parentString.size() +
1) /
41;
1947 + git_oid **parents = (git_oid **)malloc(sizeof(git_oid *) * nParents);
1949 + for (parentIndex =
0; parentIndex < nParents; ++parentIndex) {
1950 + git_oid *p_id = (git_oid *)malloc(sizeof(git_oid));
1951 + git_oid_mkstr(p_id, parentString.substr(parentIndex *
41,
40).c_str());
1952 + git_oid *existingKey;
1954 + if (NSMapMember(revisions, p_id, (void **)&existingKey, &a))
1956 + parents[parentIndex] = existingKey;
1959 + NSMapInsertKnownAbsent(revisions, p_id, NULL);
1960 + parents[parentIndex] = p_id;
1963 + //NSLog(@
"Parent: %i", parents[parentIndex]);
1967 + newCommit.parentShas = parents;
1968 + newCommit.nParents = nParents;
1975 + [newCommit setSubject:[NSString stringWithUTF8String:subject.c_str()]];
1976 + [newCommit setAuthor:[NSString stringWithUTF8String:author.c_str()]];
1977 + [newCommit setTimestamp:time];
1982 + cout <<
"Error" << endl;
1985 + NSMapInsert(revisions, oid, newCommit);
1987 + [delegate revPool:self encounteredCommit:newCommit];
1990 + NSTimeInterval duration = [[NSDate date] timeIntervalSinceDate:start];
1991 + NSLog(@
"Loaded %i commits in %f seconds", num, duration);
1993 + [task waitUntilExit];
1996 +- (void)listCommits
1998 + NSEnumerator *enumerator = [revisions objectEnumerator];
2001 + while ((value = [enumerator nextObject])) {
2003 + NSLog(@
"Commit: %@", [value realSha]);
2007 +- (PBGitCommit *)commitWithSha:(NSString *)sha
2010 + git_oid_mkstr(&oid, [sha UTF8String]);
2011 + return (PBGitCommit *)NSMapGet(revisions, &oid);
2014 +- (PBGitCommit *)commitWithOid:(git_oid *)oid
2016 + NSAssert(oid, @
"We need a parent");
2018 + return (PBGitCommit *)NSMapGet(revisions, oid);
2021 diff --git a/PBGitRevisionCell.m b/PBGitRevisionCell.m
2022 index
83bf906..c50760e
100644
2023 --- a/PBGitRevisionCell.m
2024 +++ b/PBGitRevisionCell.m
2028 #import
"PBGitRevisionCell.h"
2029 +#import
"PBGitRevSpecifier.h"
2030 #import
"PBGitRef.h"
2031 #import
"RoundedRectangle.h"
2033 @@ -
229,
7 +
230,
7 @@ - (void) drawWithFrame: (NSRect) rect inView:(NSView *)view
2037 - if ([self.objectValue refs])
2038 + if ([self.objectValue refs] && [[self.objectValue refs] count])
2039 [self drawRefsInRect:&rect];
2041 // Still use this superclass because of hilighting differences
2042 diff --git a/PBGitTree.m b/PBGitTree.m
2043 index be0011e..d871d55
100644
2046 @@ -
94,
7 +
94,
7 @@ - (void) saveToFolder: (NSString *) dir
2047 [data writeToFile:newName atomically:YES];
2048 } else { // Directory
2049 [[NSFileManager defaultManager] createDirectoryAtPath:newName attributes:nil];
2050 - for (PBGitTree* child in children)
2051 + for (PBGitTree* child in [self children])
2052 [child saveToFolder: newName];
2055 diff --git a/PBGitWindowController.m b/PBGitWindowController.m
2056 index
8314feb.
.9f1a93e
100644
2057 --- a/PBGitWindowController.m
2058 +++ b/PBGitWindowController.m
2059 @@ -
41,
10 +
41,
16 @@ - (void)windowWillClose:(NSNotification *)notification
2060 [commitViewController removeView];
2063 +- (BOOL)validateMenuItem:(NSMenuItem *)menuItem
2065 + if ([menuItem action] == @selector(showCommitView:) || [menuItem action] == @selector(showHistoryView:)) {
2066 + return ![repository isBareRepository];
2071 - (void) setSelectedViewIndex: (int) i
2073 - selectedViewIndex = i;
2074 - [[NSUserDefaults standardUserDefaults] setInteger:i forKey:@
"selectedViewIndex"];
2075 [self changeViewController: i];
2078 @@ -
55,
6 +
61,
14 @@ - (void)changeViewController:(NSInteger)whichViewTag
2079 if (viewController != nil)
2080 [[viewController view] removeFromSuperview];
2082 + if ([repository isBareRepository]) { // in bare repository we don't want to view commit
2083 + whichViewTag =
0; // even if it was selected by default
2086 + // Set our default here because we might have changed it (based on bare repo) before
2087 + selectedViewIndex = whichViewTag;
2088 + [[NSUserDefaults standardUserDefaults] setInteger:whichViewTag forKey:@
"selectedViewIndex"];
2090 switch (whichViewTag)
2092 case
0: // swap in the
"CustomImageViewController - NSImageView"
2093 @@ -
85,
6 +
99,
7 @@ - (void)changeViewController:(NSInteger)whichViewTag
2094 // Allow the viewcontroller to catch actions
2095 [self setNextResponder: viewController];
2096 [self didChangeValueForKey:@
"viewController"]; // this will trigger the NSTextField's value binding to change
2100 - (void)awakeFromNib
2101 @@ -
112,
8 +
127,
15 @@ - (void) showHistoryView:(id)sender
2103 - (void) useToolbar:(NSToolbar *)toolbar
2105 - NSSegmentedControl *item = (NSSegmentedControl *)[[[toolbar items] objectAtIndex:
0] view];
2106 + NSSegmentedControl *item = nil;
2107 + for (NSToolbarItem *toolbarItem in [toolbar items]) {
2108 + if ([[toolbarItem view] isKindOfClass:[NSSegmentedControl class]]) {
2109 + item = (NSSegmentedControl *)[toolbarItem view];
2113 [item bind:@
"selectedIndex" toObject:self withKeyPath:@
"selectedViewIndex" options:
0];
2114 + [item setEnabled: ![repository isBareRepository]];
2116 [self.window setToolbar:toolbar];
2118 diff --git a/PBRefController.m b/PBRefController.m
2119 index
0e1bfce.
.1d90c53
100644
2120 --- a/PBRefController.m
2121 +++ b/PBRefController.m
2123 #import
"PBRefController.h"
2124 #import
"PBGitRevisionCell.h"
2125 #import
"PBRefMenuItem.h"
2126 +#import
"PBGitRevSpecifier.h"
2128 @implementation PBRefController
2130 @@ -
37,
15 +
38,
22 @@ - (void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(
2132 - (void) removeRef:(PBRefMenuItem *) sender
2135 - [historyController.repository outputForArguments:[NSArray arrayWithObjects:@
"update-ref", @
"-d", [[sender ref] ref], nil] retValue: &ret];
2137 - NSLog(@
"Removing ref failed!");
2140 + NSString *ref_desc = [NSString stringWithFormat:@
"%@ %@", [[sender ref] type], [[sender ref] shortName]];
2141 + NSString *question = [NSString stringWithFormat:@
"Are you sure you want to remove the %@?", ref_desc];
2142 + int choice = NSRunAlertPanel([NSString stringWithFormat:@
"Delete %@?", ref_desc], question, @
"Delete", @
"Cancel", nil);
2143 + // TODO: Use a non-modal alert here, so we don't block all the GitX windows
2147 + [historyController.repository outputForArguments:[NSArray arrayWithObjects:@
"update-ref", @
"-d", [[sender ref] ref], nil] retValue: &ret];
2149 + NSLog(@
"Removing ref failed!");
2153 - [[sender commit] removeRef:[sender ref]];
2154 - [commitController rearrangeObjects];
2155 + [[sender commit] removeRef:[sender ref]];
2156 + [commitController rearrangeObjects];
2160 - (void) checkoutRef:(PBRefMenuItem *)sender
2161 diff --git a/PBRepositoryDocumentController.m b/PBRepositoryDocumentController.m
2162 index
4b7519c.
.1adb8e0
100644
2163 --- a/PBRepositoryDocumentController.m
2164 +++ b/PBRepositoryDocumentController.m
2166 #import
"PBRepositoryDocumentController.h"
2167 #import
"PBGitRepository.h"
2168 #import
"PBGitRevList.h"
2169 +#import
"PBEasyPipe.h"
2170 +#import
"PBGitBinary.h"
2172 @implementation PBRepositoryDocumentController
2173 // This method is overridden to configure the open panel to only allow
2174 @@ -
46,
4 +
48,
36 @@ - (id) documentForLocation:(NSURL*) url
2180 +- (IBAction)newDocument:(id)sender
2182 + NSOpenPanel *op = [NSOpenPanel openPanel];
2184 + [op setCanChooseFiles:NO];
2185 + [op setCanChooseDirectories:YES];
2186 + [op setAllowsMultipleSelection:NO];
2187 + [op setMessage:@
"Initialize a repository here:"];
2188 + [op setTitle:@
"New Repository"];
2189 + if ([op runModal] == NSFileHandlingPanelOKButton)
2191 + NSString *path = [op filename];
2192 + NSInteger terminationStatus;
2193 + NSString *result = [PBEasyPipe outputForCommand:[PBGitBinary path] withArgs:[NSArray arrayWithObjects:@
"init", @
"-q", nil] inDir:path inputString:nil retValue:&terminationStatus];
2195 + if (terminationStatus ==
0)
2196 + [self openDocumentWithContentsOfURL:[op URL] display:YES error:NULL];
2198 + NSRunAlertPanel(@
"Failed to create new Git repository", @
"Git returned the following error when trying to create the repository: %@", nil, nil, nil, result);
2203 +- (BOOL)validateMenuItem:(NSMenuItem *)item
2205 + if ([item action] == @selector(newDocument:))
2206 + return ([PBGitBinary path] != nil);
2207 + return [super validateMenuItem:item];
2211 diff --git a/PBWebController.m b/PBWebController.m
2212 index b9d472d..d185593
100644
2213 --- a/PBWebController.m
2214 +++ b/PBWebController.m
2215 @@ -
127,
6 +
127,
10 @@ - (BOOL) isFeatureEnabled:(NSString *)feature
2216 return [PBGitDefaults isGravatarEnabled];
2217 else if([feature isEqualToString:@
"gist"])
2218 return [PBGitDefaults isGistEnabled];
2219 + else if([feature isEqualToString:@
"confirmGist"])
2220 + return [PBGitDefaults confirmPublicGists];
2221 + else if([feature isEqualToString:@
"publicGist"])
2222 + return [PBGitDefaults isGistPublic];
2226 diff --git a/PBWebHistoryController.m b/PBWebHistoryController.m
2227 index
616655c..d1d70a9
100644
2228 --- a/PBWebHistoryController.m
2229 +++ b/PBWebHistoryController.m
2233 #import
"PBWebHistoryController.h"
2234 +#import
"PBGitRevSpecifier.h"
2236 @implementation PBWebHistoryController
2238 diff --git a/Site/Rakefile b/Site/Rakefile
2239 index cbad8c3..b225469
100644
2242 @@ -
3,
14 +
3,
16 @@ require 'erb'
2244 task :generate =
> [:generate_usermanual] do
2246 + require 'lib/release_notes'
2249 FileUtils.mkdir(
"output")
2250 `cat text/*.markdown
> output/UserManual.markdown`
2251 `cp -r assets/* output`
2253 - template = ERB.new(File.read(
"template.html"))
2254 + template = ERB.new(File.read(
"templates/site.html"))
2256 - source = Dir.glob(
"text/*.markdown").each do |file|
2257 + Dir.glob(
"text/*.markdown").each do |file|
2258 contents = File.read(file)
2259 @body = Markdown.new(ERB.new(contents).result(binding)).to_html
2260 @filename = File.basename(file).gsub(/markdown$/,
"html")
2261 @@ -
48,
6 +
50,
18 @@ task :generate_usermanual do
2265 +task :generate_appcast do
2266 + require 'lib/release_notes.rb'
2267 + require 'rdiscount'
2268 + FileUtils.mkdir_p(
"output/Downloads")
2269 + template = ERB.new(File.read(
"templates/sparkle.xml"))
2271 + filename = ENV[
"STABLE"] ?
"appcast.xml" :
"appcast_DEBUG.xml"
2272 + File.open(
"output/Downloads/#{filename}",
"w") do |f|
2273 + f.puts template.result(binding)
2278 `rsync -a output/ sydney:public_html/gitx/`
2280 \ No newline at end of file
2281 diff --git a/Site/UserManual/text/
03 - Committing.markdown b/Site/UserManual/text/
03 - Committing.markdown
2282 index
4ff6fab.
.67534c3
100644
2283 --- a/Site/UserManual/text/
03 - Committing.markdown
2284 +++ b/Site/UserManual/text/
03 - Committing.markdown
2285 @@ -
30,
3 +
30,
4 @@ If the hunk isn't specific enough, you can decrease the context size by manipula
2288 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.
2289 +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'.
2290 diff --git a/Site/assets/Downloads/appcast.xml b/Site/assets/Downloads/appcast.xml
2291 deleted file mode
100644
2292 index
66caa12.
.0000000
2293 --- a/Site/assets/Downloads/appcast.xml
2296 -
<?xml version=
"1.0" encoding=
"utf-8"?>
2297 -
<rss xmlns:
atom=
"http://www.w3.org/2005/Atom" xmlns:
sparkle=
"http://www.andymatuschak.org/xml-namespaces/sparkle" version=
"2.0">
2299 -
<title>GitX
</title>
2300 -
<link>http://github.com/pieter/gitx/wikis
</link>
2301 -
<description>A more native clone of Gitk for OS X
</description>
2305 -
<title>GitX
0.6.1</title>
2306 -
<pubDate>Thu,
29 Jan
2009 23:
54:
01 GMT
</pubDate>
2307 -
<enclosure url=
"http://frim.frim.nl/GitXStable.app.zip" length=
"1531595" type=
"application/octet-stream" sparkle:
version=
"0.6.1"/>
2310 -
<h1>GitX
0.6.1</h1>
2311 -
<div style='font-size:
70%'
>
2312 -
<p>This is a bugfix release. The following bugs have been fixed:
</p>
2315 -
<li>The commit view shows new files with linebreaks
</li>
2316 -
<li>The history view works with Git
>=
1.5.4 again
</li>
2317 -
<li>Reloading the detailed view in the History no longer causes an empty page
</li>
2320 -
<p>Version
0.6 has the following new features and enhancements:
</p>
2323 -
<li>The diff display now looks much nicer, using boxes to segment files
</li>
2324 -
<li>The toolbar can now me customized
</li>
2325 -
<li>Images that have been changed or added in a commit can now be viewed
2326 - inline in GitX
</li>
2327 -
<li>GitX has gained a preference pane which allows you to specify a git path
2328 - and disable the Gist and Gravatar integration
</li>
2329 -
<li>The commit interface is now more intuitive. Particularly, you can now
2330 - select multiple files and use drag and drop to stage / unstage files
</li>
2331 -
<li>You can now drag and drop files out of the commit view
</li>
2332 -
<li>The files in the commit view have gained a context menu that allows you
2333 - to revert changes / open the file / ignore the file
</li>
2334 -
<li>It is now possible to adjust the amount of context lines in the commit view.
2335 - Using a smaller context size allows you to do more fine-grained commits
</li>
2336 -
<li>The branch menu is now organized in branches/remotes/tags
</li>
2337 -
<li>The view switch button now uses icons rather than words
</li>
2338 -
<li>The view shortcuts have changed to use command
1/
2 for the history/commit
2339 - view. The history
’s subviews can now be changed using command-option-
1/
2/
3</li>
2340 -
<li>Listing commits has become much faster
</li>
2341 -
<li>GitX no longer spawns zombie processes
</li>
2342 -
<li>GitX now shows a list of files that have been changed in a commit
</li>
2343 -
<li>GitX now uses libgit2 to store object id
’s, reducing it
’s memory footprint
</li>
2346 -
<p>In addition many bugs were fixed, including the correct calculation of a
2347 - gravatar MD5 hash.
</p>
2355 diff --git a/Site/lib/release_notes.rb b/Site/lib/release_notes.rb
2356 new file mode
100644
2357 index
0000000.
.8ff598b
2359 +++ b/Site/lib/release_notes.rb
2363 +RELEASE_NOTES_PATH = File.join(File.dirname(__FILE__),
"..",
"..",
"Documentation",
"ReleaseNotes")
2365 +module ReleaseNotes
2367 + VERSION_MATCH = /v([
0-
9.]*).txt$/
2369 + # Find all release not files
2370 + def self.release_files
2371 + notes = Dir.glob(File.join(RELEASE_NOTES_PATH,
"v*.txt"))
2373 + # Sort files by version number
2374 + notes.sort do |x,y|
2375 + x = x.match VERSION_MATCH
2376 + y = y.match VERSION_MATCH
2377 + # Puts nonmatching files at the bottom
2383 + # compare version strings, newest at the top
2384 + y[
1].split(
".").map { |a| a.to_i } <=
> x[
1].split(
".").map { |a| a.to_i }
2389 + # Aggregate all release notes in a string
2390 + def self.aggregate_notes
2392 + release_files.each do |x|
2393 + file << File.read(x)
2399 + def self.last_version
2400 + last_file = release_files.first
2401 + if last_file =~ VERSION_MATCH
2407 + def self.last_notes
2408 + File.read(release_files.first)
2411 \ No newline at end of file
2412 diff --git a/Site/template.html b/Site/template.html
2413 deleted file mode
100644
2414 index c1001b6.
.0000000
2415 --- a/Site/template.html
2419 -def create_link(name, description)
2420 -
"<a href='#{name}.html' class='#{name == @filename.gsub(".html
", "") ? 'here' : ''}'>#{description}</a>"
2423 -
<!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01//EN">
2427 - GitX - <%= @title
%>
2429 -
<link rel=
"stylesheet" href=
"css/master.css" type=
"text/css" media=
"screen" title=
"Main Style" charset=
"utf-8" />
2430 -
<link rel=
"shortcut icon" href=
"images/favicon.png" type=
"image/x-icon">
2431 -
<link href=
"http://gitx.frim.nl/Downloads/appcast.xml" rel=
"alternate" type=
"application/rss+xml" title=
"GitX Application Update Feed" />
2433 -
<meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8" />
2436 -
<div id=
"container">
2441 - <%= create_link(
"index",
"Home")
%>
2442 - <%= create_link
"seeit",
"See it" %>
2443 - <%= create_link
"contribute",
"Contribute" %>
2444 - <%= create_link 'release_history',
"Release History" %>
2445 - <%= create_link 'user_manual',
"User Manual" %>
2446 - <%= create_link 'links',
"Links" %>
2447 - <%= create_link 'contact',
"Contact" %>
2449 -
<!-- <div id="subnav">
2450 - <a href="#">Home</a>
2451 - <a href="#">Screenshots</a>
2452 - <a href="#">Movies</a>
2453 - <a href="#">Open Source</a>
2454 - <a href="#">About</a>
2456 -
<div id=
"content">
2460 - © 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>.
2463 -
<script type=
"text/javascript">
2464 - var gaJsHost
= (("https:" == document
.location
.protocol
) ? "https://ssl." : "http://www.");
2465 - document
.write(unescape("%3Cscript src='" + gaJsHost
+ "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
2467 -
<script type=
"text/javascript">
2468 - var pageTracker
= _gat
._getTracker("UA-4534244-3");
2469 - pageTracker
._trackPageview();
2473 diff --git a/Site/templates/site.html b/Site/templates/site.html
2474 new file mode
100644
2475 index
0000000..c1001b6
2477 +++ b/Site/templates/site.html
2480 +def create_link(name, description)
2481 +
"<a href='#{name}.html' class='#{name == @filename.gsub(".html
", "") ? 'here' : ''}'>#{description}</a>"
2484 +
<!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01//EN">
2488 + GitX - <%= @title
%>
2490 +
<link rel=
"stylesheet" href=
"css/master.css" type=
"text/css" media=
"screen" title=
"Main Style" charset=
"utf-8" />
2491 +
<link rel=
"shortcut icon" href=
"images/favicon.png" type=
"image/x-icon">
2492 +
<link href=
"http://gitx.frim.nl/Downloads/appcast.xml" rel=
"alternate" type=
"application/rss+xml" title=
"GitX Application Update Feed" />
2494 +
<meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8" />
2497 +
<div id=
"container">
2502 + <%= create_link(
"index",
"Home")
%>
2503 + <%= create_link
"seeit",
"See it" %>
2504 + <%= create_link
"contribute",
"Contribute" %>
2505 + <%= create_link 'release_history',
"Release History" %>
2506 + <%= create_link 'user_manual',
"User Manual" %>
2507 + <%= create_link 'links',
"Links" %>
2508 + <%= create_link 'contact',
"Contact" %>
2510 +
<!-- <div id="subnav">
2511 + <a href="#">Home</a>
2512 + <a href="#">Screenshots</a>
2513 + <a href="#">Movies</a>
2514 + <a href="#">Open Source</a>
2515 + <a href="#">About</a>
2517 +
<div id=
"content">
2521 + © 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>.
2524 +
<script type=
"text/javascript">
2525 + var gaJsHost
= (("https:" == document
.location
.protocol
) ? "https://ssl." : "http://www.");
2526 + document
.write(unescape("%3Cscript src='" + gaJsHost
+ "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
2528 +
<script type=
"text/javascript">
2529 + var pageTracker
= _gat
._getTracker("UA-4534244-3");
2530 + pageTracker
._trackPageview();
2534 diff --git a/Site/templates/sparkle.xml b/Site/templates/sparkle.xml
2535 new file mode
100644
2536 index
0000000.
.0f44e31
2538 +++ b/Site/templates/sparkle.xml
2540 +
<?xml version=
"1.0" encoding=
"utf-8"?>
2541 +
<rss xmlns:
atom=
"http://www.w3.org/2005/Atom" xmlns:
sparkle=
"http://www.andymatuschak.org/xml-namespaces/sparkle" version=
"2.0">
2543 +
<title>GitX
</title>
2544 +
<link>http://github.com/pieter/gitx/wikis
</link>
2545 +
<description>A more native clone of Gitk for OS X
</description>
2549 +
<title>GitX <%= ReleaseNotes::last_version
%></title>
2550 +
<pubDate>Thu,
29 Jan
2009 23:
54:
01 GMT
</pubDate>
2551 +
<enclosure url=
"http://frim.frim.nl/GitXStable.app.zip" length=
"1531595" type=
"application/octet-stream" sparkle:
version=
"<%= ReleaseNotes::last_version %>"/>
2562 + <%= Markdown
.new(ReleaseNotes
::last_notes
).to_html
%>
2569 diff --git a/Site/text/index.markdown b/Site/text/index.markdown
2570 index cd56c8b..c8bea36
100644
2571 --- a/Site/text/index.markdown
2572 +++ b/Site/text/index.markdown
2574 <div class=
"nohover" id=
"download">
2575 <a href=
"http://frim.frim.nl/GitXStable.app.zip" title=
"Latest GitX download" id=
"download_link" class=
"nohover">
2577 -
<div id=
"version">Version
0.6.1</div>
2578 +
<div id=
"version">Version <%= ReleaseNotes
::last_version
%></div>
2580 <p id=
"donate_link">(you can help GitX by
<a href=
"http://www.pledgie.com/campaigns/1816">donating
</a>)
</p>
2582 @@ -
37,
7 +
37,
7 @@ then in silky smooth OS X style!
</p>
2586 - 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>.
2587 + 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>.
2590 After you have started it once, you can install the command-line tool through the menu (GitX-
>Enable Terminal Usage…). This will install a “gitx” binary in /usr/local/bin.
2591 diff --git a/Site/text/release_history.markdown b/Site/text/release_history.markdown
2592 index
9b95961.
.1909539 100644
2593 --- a/Site/text/release_history.markdown
2594 +++ b/Site/text/release_history.markdown
2599 -### Changes in v0.6
.1:
2601 -This is a bugfix release. The following bugs have been fixed:
2603 -* The commit view shows new files with linebreaks
2604 -* The history view works with Git
>=
1.5.4 again
2605 -* Reloading the detailed view in the History no longer causes an empty page
2607 -### Changes in v0.6
2609 -This release has the following new features and enhancements:
2611 -* The diff display now looks much nicer, using boxes to segment files
2612 -* The toolbar can now me customized
2613 -* Images that have been changed or added in a commit can now be viewed
2615 -* GitX has gained a preference pane which allows you to specify a git path
2616 - and disable the Gist and Gravatar integration
2617 -* The commit interface is now more intuitive. Particularly, you can now
2618 - select multiple files and use drag and drop to stage / unstage files
2619 -* You can now drag and drop files out of the commit view
2620 -* The files in the commit view have gained a context menu that allows you
2621 - to revert changes / open the file / ignore the file
2622 -* It is now possible to adjust the amount of context lines in the commit view.
2623 - Using a smaller context size allows you to do more fine-grained commits
2624 -* The branch menu is now organized in branches/remotes/tags
2625 -* The view switch button now uses icons rather than words
2626 -* The view shortcuts have changed to use command
1/
2 for the history/commit
2627 - view. The history's subviews can now be changed using command-option-
1/
2/
3
2628 -* Listing commits has become much faster
2629 -* GitX no longer spawns zombie processes
2630 -* GitX now shows a list of files that have been changed in a commit
2631 -* GitX now uses libgit2 to store object id's, reducing it's memory footprint
2633 -In addition many bugs were fixed, including the correct calculation of a
2636 -### Changes in v0.5
2638 -This feature release has several new smaller or larger features:
2640 -* The current branch is now highlighted
2641 -* In the commit view, there is an option to amend commits
2642 -* The
"Gist it" button now respects github.user/token
2643 -* Display a gravatar of the committer
2644 -* The commit message view now displays a vertical line at
50 characters
2645 -* It is now possible to revert changes by using the context menu in the
2647 -* You can now stage only parts of a file by using the
"Stage Hunk" buttons
2648 - in the commit view
2649 -* You can now use GitX to show a diff of anything, for example by using
2650 - 'gitx --diff HEAD^^' or 'git diff HEAD~
3 | gitx --diff'
2651 -* You can now drag and drop refs to move them and also create branches
2653 -In addition, the following bugs have been fixed:
2655 -* Better detection of git version
2656 -* Branch lines are no longer interspersed with half a pixel of whitespace
2657 -* The toolbar keeps its state when switching views
2659 -
<h3>Changes in v0.4
.1:
</h3>
2661 -
<li>The diff display is now much faster
</li>
2662 -
<li>More locations are now searched for a default git
</li>
2663 -
<li>Code pasted online is now private
</li>
2666 -
<h3>Changes in v0.4:
</h3>
2668 -
<li>A new commitview, allowing you to selectively add changes and commit them.
</li>
2669 -
<li>You can now upload a commit as a patch to gist.github.com
</li>
2671 -
<li>GitX now searches for your git binary in more directories and is smarter
2672 - about reporting errors regarding git paths.
</li>
2673 -
<li>You can now remove branches by right-clicking on them in the detailed view
</li>
2674 -
<li>GitX now comes with a spicy new icon
</li>
2675 -
<li>The diff view has become prettier and now also highlights trailing
2677 -
<li>Various little changes and stability improvement
</li>
2679 -
<h3>Changes in v0.3:
</h3>
2681 -
<li>You can now pass on command-line arguments just like you can with ‘git log’
</li>
2682 -
<li>The program has an icon
</li>
2683 -
<li>Also displays remote branches in the branch list
</li>
2685 -
<li>Is better in determining if a directory is a bare git repository
</li>
2686 -
<li>Support for—left-right: use ‘gitx—left-right
<span class=
"caps">HEAD
</span>..origin/master’
2687 - to see which commits are only on your branch or on their branch
</li>
2688 -
<li>Navigate through changed hunks by using j/k keys
</li>
2689 -
<li>Scroll down in webview by using space / shift-space
</li>
2692 -
<h3>Changes in v0.2
.1:
</h3>
2694 -
<li>Added supercool auto-update feature (Sparkle)
</li>
2696 -
<h3>Changes in v0.2
</h3>
2698 -
<li>Branch lines now have colors
</li>
2699 -
<li>Ref labels added to commits
</li>
2701 +<%= ReleaseNotes
::aggregate_notes
%>
2702 \ No newline at end of file
2703 diff --git a/gitx.mm b/gitx.mm
2704 index
65829e0..fbd5411
100644
2707 @@ -
74,
6 +
74,
16 @@ void version_info()
2713 + if (![PBGitBinary path])
2716 + NSString *path = [[PBGitBinary path] stringByDeletingLastPathComponent];
2717 + printf(
"%s", [path UTF8String]);
2721 void handleSTDINDiff(id
<GitXCliToolProtocol> proxy)
2723 NSFileHandle *handle = [NSFileHandle fileHandleWithStandardInput];
2724 @@ -
106,
6 +
116,
8 @@ int main(int argc, const char** argv)
2726 if (argc
>=
2 && (!strcmp(argv[
1],
"--version") || !strcmp(argv[
1],
"-v")))
2728 + if (argc
>=
2 && !strcmp(argv[
1],
"--git-path"))
2731 if (![PBGitBinary path]) {
2732 printf(
"%s\n", [[PBGitBinary notFoundError] cStringUsingEncoding:NSUTF8StringEncoding]);
2733 diff --git a/html/lib/diffHighlighter.js b/html/lib/diffHighlighter.js
2734 index
8f51c5d.
.1a7663e
100644
2735 --- a/html/lib/diffHighlighter.js
2736 +++ b/html/lib/diffHighlighter.js
2737 @@ -
67,
10 +
67,
12 @@ var highlightDiff = function(diff, element, callbacks) {
2738 return; // so printing the filename in the file-list is enough
2741 - finalContent += '
<div class=
"file" id=
"file_index_' + (file_index - 1) + '">' +
2742 - '
<div class=
"fileHeader">' + title + '
</div>';
2743 + if (diffContent !=
"" || binary) {
2744 + finalContent += '
<div class=
"file" id=
"file_index_' + (file_index - 1) + '">' +
2745 + '
<div class=
"fileHeader">' + title + '
</div>';
2749 + if (!binary && (diffContent !=
"")) {
2750 finalContent += '
<div class=
"diffContent">' +
2751 '
<div class=
"lineno">' + line1 +
"</div>" +
2752 '
<div class=
"lineno">' + line2 +
"</div>" +
2753 @@ -
86,
7 +
88,
8 @@ var highlightDiff = function(diff, element, callbacks) {
2757 - finalContent += '
</div>';
2758 + if (diffContent !=
"" || binary)
2759 + finalContent += '
</div>';
2763 @@ -
117,
6 +
120,
29 @@ var highlightDiff = function(diff, element, callbacks) {
2767 + if (firstChar ==
"n") {
2768 + if (l.match(/^new file mode .*$/))
2769 + startname =
"/dev/null";
2771 + if (match = l.match(/^new mode (.*)$/)) {
2772 + mode_change = true;
2773 + new_mode = match[
1];
2777 + if (firstChar ==
"o") {
2778 + if (match = l.match(/^old mode (.*)$/)) {
2779 + mode_change = true;
2780 + old_mode = match[
1];
2785 + if (firstChar ==
"d") {
2786 + if (l.match(/^deleted file mode .*$/))
2787 + endname =
"/dev/null";
2790 if (firstChar ==
"-") {
2791 if (match = l.match(/^--- (a\/)?(.*)$/))
2792 startname = match[
2];
2793 @@ -
153,
17 +
179,
6 @@ var highlightDiff = function(diff, element, callbacks) {
2797 - if (match = l.match(/^old mode (.*)$/)) {
2798 - mode_change = true;
2799 - old_mode = match[
1];
2802 - if (match = l.match(/^new mode (.*)$/)) {
2803 - mode_change = true;
2804 - new_mode = match[
1];
2808 // Finish the header
2809 if (firstChar ==
"@")
2811 @@ -
188,
7 +
203,
7 @@ var highlightDiff = function(diff, element, callbacks) {
2815 - if (m = l.match(/@@ \-([
0-
9]+),\d+ \+(\d+),\d+ @@/))
2816 + if (m = l.match(/@@ \-([
0-
9]+),?\d* \+(\d+),?\d* @@/))
2818 hunk_start_line_1 = parseInt(m[
1]) -
1;
2819 hunk_start_line_2 = parseInt(m[
2]) -
1;
2820 @@ -
199,
14 +
214,
14 @@ var highlightDiff = function(diff, element, callbacks) {
2821 } else if (firstChar ==
" ") {
2822 line1 += ++hunk_start_line_1 +
"\n";
2823 line2 += ++hunk_start_line_2 +
"\n";
2824 - diffContent += l +
"\n";
2825 + diffContent +=
"<div class='noopline'>" + l +
"</div>";
2831 // This takes about
7ms
2832 - element.innerHTML = finalContent;
2833 + // element.innerHTML = finalContent;
2835 // TODO: Replace this with a performance pref call
2837 diff --git a/html/test.html b/html/test.html
2838 index
795c686.
.8919193 100644
2839 --- a/html/test.html
2840 +++ b/html/test.html
2844 var doeHet = function() {
2845 + var start = Date.now();
2846 highlightDiff($(
"orig_diff").value,
2848 {
"newfile" : newFile }
2850 + var end = Date.now();
2851 + console.debug(
"Parsing took: " + (end - start) +
" ms");
2855 diff --git a/html/views/commit/commit.css b/html/views/commit/commit.css
2856 index
18d6a2e.
.268109d
100644
2857 --- a/html/views/commit/commit.css
2858 +++ b/html/views/commit/commit.css
2859 @@ -
61,
7 +
61,
6 @@ table.diff {
2862 .diff a.stagebutton {
2865 padding:
0 2px
0 2px;
2867 @@ -
77,
7 +
76,
6 @@ table.diff {
2870 -webkit-border-radius:
2px;
2875 @@ -
94,
4 +
92,
4 @@ table.diff {
2876 border:
5px solid #EEE;
2880 \ No newline at end of file
2882 diff --git a/html/views/history/history.css b/html/views/history/history.css
2883 index
7c1aaf8..ff505aa
100644
2884 --- a/html/views/history/history.css
2885 +++ b/html/views/history/history.css
2886 @@ -
48,
7 +
48,
7 @@ a.servicebutton{
2895 diff --git a/html/views/history/history.js b/html/views/history/history.js
2896 index
258310c..ee94436
100644
2897 --- a/html/views/history/history.js
2898 +++ b/html/views/history/history.js
2899 @@ -
40,
11 +
40,
34 @@ var Commit = function(obj) {
2902 this.reloadRefs = function() {
2903 - this.refs = this.object.refs;
2904 + this.refs = this.object.refs();
2910 +var confirm_gist = function(confirmation_message) {
2911 + if (!Controller.isFeatureEnabled_(
"confirmGist")) {
2916 + // Set optional confirmation_message
2917 + confirmation_message = confirmation_message ||
"Yes. Paste this commit.";
2918 + var deleteMessage = Controller.getConfig_(
"github.token") ?
" " :
"You might not be able to delete it after posting.<br>";
2919 + var publicMessage = Controller.isFeatureEnabled_(
"publicGist") ?
"<b>public</b>" :
"private";
2920 + // Insert the verification links into div#notification_message
2921 + 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>' +
2923 + 'Are you sure you want to continue?
<br/><br/>' +
2924 + '
<a href=
"#" onClick=
"hideNotification();return false;" style=
"color: red;">No. Cancel.
</a> | ' +
2925 + '
<a href=
"#" onClick=
"gistie();return false;" style=
"color: green;">' + confirmation_message + '
</a>';
2927 + notify(notification_text,
0);
2928 + // Hide img#spinner, since it?s visible by default
2929 + $(
"spinner").style.display =
"none";
2932 var gistie = function() {
2933 notify(
"Uploading code to Gistie..",
0);
2935 @@ -
60,
9 +
83,
9 @@ var gistie = function() {
2936 if (token && login) {
2937 parameters.login = login;
2938 parameters.token = token;
2940 - parameters.private = true;
2942 + if (!Controller.isFeatureEnabled_(
"publicGist"))
2943 + parameters.private = true;
2946 for (var name in parameters)
2947 @@ -
223,
8 +
246,
22 @@ var enableFeatures = function()
2949 var loadExtendedCommit = function(commit)
2951 - if (commit.author_email)
2952 - $(
"authorID").innerHTML = commit.author_name +
" <<a href='mailto:" + commit.author_email +
"'>" + commit.author_email +
"</a>>";
2953 + var formatEmail = function(name, email) {
2954 + return email ? name +
" <<a href='mailto:" + email +
"'>" + email +
"</a>>" : name;
2957 + $(
"authorID").innerHTML = formatEmail(commit.author_name, commit.author_email);
2959 + if (commit.committer_name != commit.author_name) {
2960 + $(
"committerID").parentNode.style.display =
"";
2961 + $(
"committerID").innerHTML = formatEmail(commit.committer_name, commit.committer_email);
2963 + $(
"committerDate").parentNode.style.display =
"";
2964 + $(
"committerDate").innerHTML = commit.committer_date;
2966 + $(
"committerID").parentNode.style.display =
"none";
2967 + $(
"committerDate").parentNode.style.display =
"none";
2970 $(
"date").innerHTML = commit.author_date;
2971 $(
"message").innerHTML = commit.message.replace(/
\n/g,
"<br>");
2972 diff --git a/html/views/history/index.html b/html/views/history/index.html
2973 index c120e01.
.65117c3
100644
2974 --- a/html/views/history/index.html
2975 +++ b/html/views/history/index.html
2977 <body style=
"padding: 0px; border: 0px">
2978 <div id=
"rightcontent">
2980 -
<a class=
"servicebutton" id=
"gist" onClick=
"gistie();return false" href='#'
>
2981 +
<a class=
"servicebutton" id=
"gist" onClick=
"confirm_gist();return false" href='#'
>
2986 <td class=
"property_name">Date:
</td>
2987 <td id=
"date">Pieter de Bie
</td>
2989 +
<tr style=
"display:none">
2990 +
<td class=
"property_name">Committer:
</td>
2991 +
<td id=
"committerID">Pieter de Bie
</td>
2993 +
<tr style=
"display:none">
2994 +
<td class=
"property_name">Commit Date:
</td>
2995 +
<td id=
"committerDate">Pieter de Bie
</td>
2998 <td class=
"property_name">Subject:
</td>
2999 <td id=
"subjectID" style=
"font-weight:bold">Pieter de Bie
</td>
3003 <div id=
"message_files">
3004 -
<div id=
"message"></div>
3005 +
<pre id=
"message"></pre>
3006 <div id=
"files"></div>
3009 diff --git a/speedtest.m b/speedtest.m
3010 index
2d96213.
.18173bb
100644
3014 // Copyright
2008 Pieter de Bie. All rights reserved.
3017 -#import
"speedtest.h"
3018 #import
"PBGitRepository.h"
3019 -#import
"PBGitRevList.h"
3020 +#import
"PBGitRevSpecifier.h"
3021 +#import
"PBGitCommit.h"
3022 +#import
"PBGitRevPool.h"
3026 - PBGitRepository *repo = [[PBGitRepository alloc] initWithURL:[NSURL URLWithString:@
"file:///Users/pieter/projects/git"]];
3027 - PBGitRevList *revList = [[PBGitRevList alloc] initWithRepository:repo];
3028 - PBGitRevSpecifier *revSpecifier = [[PBGitRevSpecifier alloc] initWithParameters:[NSArray arrayWithObject:@
"master"]];
3029 + PBGitRepository *repo = [[PBGitRepository alloc] initWithURL:[NSURL URLWithString:@
"file:///Users/pieter/projects/External/git"]];
3030 + //PBGitRevList *revList = [[PBGitRevList alloc] initWithRepository:repo];
3031 + PBGitRevSpecifier *revSpecifier = [[PBGitRevSpecifier alloc] initWithParameters:[NSArray arrayWithObject:@
"HEAD"]];
3032 + PBGitRevPool *revPool = [[PBGitRevPool alloc] initWithRepository:repo];
3034 //[repo reloadRefs];
3035 - [revList walkRevisionListWithSpecifier:revSpecifier];
3037 + [revPool loadRevisions:revSpecifier];
3038 +// [revPool listCommits];
3040 + NSDate *start = [NSDate date];
3041 + PBGitCommit *commit = [revPool commitWithSha:@
"6270bae2fe7b13a0809061760ddb2b03ce2ca33a"];
3042 + NSMutableArray *array = [NSMutableArray array];
3045 + [array addObject:[commit realSha]];
3046 + if (commit.nParents)
3047 + commit = [revPool commitWithOid:commit.parentShas[
0]];
3051 + NSTimeInterval duration = [[NSDate date] timeIntervalSinceDate:start];
3053 + NSLog(@
"Walked all refs in %f seconds", duration);
3054 + NSLog(@
"%@", [array componentsJoinedByString:@
"\n"]);
3057 \ No newline at end of file
3060 <div id='diff'
></div>