mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
Merge branch 'stable'
* stable: Make confirmation of Gists optional Add more defaults for handling Gists HistoryView: Confirm paste to Gist if github.user is unset GitX: CFBuildVersion as x.x.x.xx UserManual: Explain the concept of the Amend-button
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<integer value="1"/>
|
||||
<integer value="62"/>
|
||||
<integer value="87"/>
|
||||
<integer value="4" id="12"/>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.PluginDependencies">
|
||||
@@ -405,20 +406,22 @@
|
||||
<object class="NSUserDefaultsController" id="557723770">
|
||||
<object class="NSMutableArray" key="NSDeclaredKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>PBConfirmPublicGists</string>
|
||||
<string>PBGitGist</string>
|
||||
<string>PBEnableGist</string>
|
||||
<string>PBEnableGravatar</string>
|
||||
<string>PBGistPublic</string>
|
||||
</object>
|
||||
<bool key="NSSharedInstance">YES</bool>
|
||||
</object>
|
||||
<object class="NSCustomView" id="263788152">
|
||||
<nil key="NSNextResponder"/>
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<object class="NSMutableArray" key="NSSubviews">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSButton" id="237556568">
|
||||
<reference key="NSNextResponder" ref="263788152"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{18, 38}, {111, 18}}</string>
|
||||
<string key="NSFrame">{{18, 80}, {111, 18}}</string>
|
||||
<reference key="NSSuperview" ref="263788152"/>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSButtonCell" key="NSCell" id="973971251">
|
||||
@@ -459,8 +462,53 @@
|
||||
<int key="NSPeriodicInterval">25</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSButton" id="933582906">
|
||||
<reference key="NSNextResponder" ref="263788152"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{38, 60}, {181, 18}}</string>
|
||||
<reference key="NSSuperview" ref="263788152"/>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSButtonCell" key="NSCell" id="601773126">
|
||||
<int key="NSCellFlags">-2080244224</int>
|
||||
<int key="NSCellFlags2">0</int>
|
||||
<string key="NSContents">Confirm creation of Gists</string>
|
||||
<reference key="NSSupport" ref="734450335"/>
|
||||
<reference key="NSControlView" ref="933582906"/>
|
||||
<int key="NSButtonFlags">1211912703</int>
|
||||
<int key="NSButtonFlags2">130</int>
|
||||
<reference key="NSNormalImage" ref="294005107"/>
|
||||
<reference key="NSAlternateImage" ref="690089052"/>
|
||||
<string key="NSAlternateContents"/>
|
||||
<string key="NSKeyEquivalent"/>
|
||||
<int key="NSPeriodicDelay">200</int>
|
||||
<int key="NSPeriodicInterval">25</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSButton" id="766070942">
|
||||
<reference key="NSNextResponder" ref="263788152"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{38, 38}, {179, 18}}</string>
|
||||
<reference key="NSSuperview" ref="263788152"/>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSButtonCell" key="NSCell" id="817763751">
|
||||
<int key="NSCellFlags">-2080244224</int>
|
||||
<int key="NSCellFlags2">0</int>
|
||||
<string key="NSContents">Make Gists public</string>
|
||||
<reference key="NSSupport" ref="734450335"/>
|
||||
<reference key="NSControlView" ref="766070942"/>
|
||||
<int key="NSButtonFlags">1211912703</int>
|
||||
<int key="NSButtonFlags2">130</int>
|
||||
<reference key="NSNormalImage" ref="294005107"/>
|
||||
<reference key="NSAlternateImage" ref="690089052"/>
|
||||
<string key="NSAlternateContents"/>
|
||||
<string key="NSKeyEquivalent"/>
|
||||
<int key="NSPeriodicDelay">200</int>
|
||||
<int key="NSPeriodicInterval">25</int>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrameSize">{400, 74}</string>
|
||||
<string key="NSFrameSize">{403, 116}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<string key="NSClassName">NSView</string>
|
||||
</object>
|
||||
</object>
|
||||
@@ -718,6 +766,70 @@
|
||||
</object>
|
||||
<int key="connectionID">96</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBBindingConnection" key="connection">
|
||||
<string key="label">value: values.PBConfirmPublicGists</string>
|
||||
<reference key="source" ref="933582906"/>
|
||||
<reference key="destination" ref="557723770"/>
|
||||
<object class="NSNibBindingConnector" key="connector">
|
||||
<reference key="NSSource" ref="933582906"/>
|
||||
<reference key="NSDestination" ref="557723770"/>
|
||||
<string key="NSLabel">value: values.PBConfirmPublicGists</string>
|
||||
<string key="NSBinding">value</string>
|
||||
<string key="NSKeyPath">values.PBConfirmPublicGists</string>
|
||||
<int key="NSNibBindingConnectorVersion">2</int>
|
||||
</object>
|
||||
</object>
|
||||
<int key="connectionID">104</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBBindingConnection" key="connection">
|
||||
<string key="label">enabled: values.PBEnableGist</string>
|
||||
<reference key="source" ref="933582906"/>
|
||||
<reference key="destination" ref="557723770"/>
|
||||
<object class="NSNibBindingConnector" key="connector">
|
||||
<reference key="NSSource" ref="933582906"/>
|
||||
<reference key="NSDestination" ref="557723770"/>
|
||||
<string key="NSLabel">enabled: values.PBEnableGist</string>
|
||||
<string key="NSBinding">enabled</string>
|
||||
<string key="NSKeyPath">values.PBEnableGist</string>
|
||||
<int key="NSNibBindingConnectorVersion">2</int>
|
||||
</object>
|
||||
</object>
|
||||
<int key="connectionID">107</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBBindingConnection" key="connection">
|
||||
<string key="label">enabled: values.PBEnableGist</string>
|
||||
<reference key="source" ref="766070942"/>
|
||||
<reference key="destination" ref="557723770"/>
|
||||
<object class="NSNibBindingConnector" key="connector">
|
||||
<reference key="NSSource" ref="766070942"/>
|
||||
<reference key="NSDestination" ref="557723770"/>
|
||||
<string key="NSLabel">enabled: values.PBEnableGist</string>
|
||||
<string key="NSBinding">enabled</string>
|
||||
<string key="NSKeyPath">values.PBEnableGist</string>
|
||||
<int key="NSNibBindingConnectorVersion">2</int>
|
||||
</object>
|
||||
</object>
|
||||
<int key="connectionID">111</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBBindingConnection" key="connection">
|
||||
<string key="label">value: values.PBGistPublic</string>
|
||||
<reference key="source" ref="766070942"/>
|
||||
<reference key="destination" ref="557723770"/>
|
||||
<object class="NSNibBindingConnector" key="connector">
|
||||
<reference key="NSSource" ref="766070942"/>
|
||||
<reference key="NSDestination" ref="557723770"/>
|
||||
<string key="NSLabel">value: values.PBGistPublic</string>
|
||||
<string key="NSBinding">value</string>
|
||||
<string key="NSKeyPath">values.PBGistPublic</string>
|
||||
<int key="NSNibBindingConnectorVersion">2</int>
|
||||
</object>
|
||||
</object>
|
||||
<int key="connectionID">113</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<object class="NSArray" key="orderedObjects">
|
||||
@@ -1000,8 +1112,10 @@
|
||||
<reference key="object" ref="263788152"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="485413225"/>
|
||||
<reference ref="237556568"/>
|
||||
<reference ref="933582906"/>
|
||||
<reference ref="485413225"/>
|
||||
<reference ref="766070942"/>
|
||||
</object>
|
||||
<reference key="parent" ref="1002"/>
|
||||
<string key="objectName">Integration</string>
|
||||
@@ -1034,6 +1148,34 @@
|
||||
<reference key="object" ref="12685338"/>
|
||||
<reference key="parent" ref="485413225"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">97</int>
|
||||
<reference key="object" ref="933582906"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="601773126"/>
|
||||
</object>
|
||||
<reference key="parent" ref="263788152"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">98</int>
|
||||
<reference key="object" ref="601773126"/>
|
||||
<reference key="parent" ref="933582906"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">108</int>
|
||||
<reference key="object" ref="766070942"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="817763751"/>
|
||||
</object>
|
||||
<reference key="parent" ref="263788152"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">109</int>
|
||||
<reference key="object" ref="817763751"/>
|
||||
<reference key="parent" ref="766070942"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="flattenedProperties">
|
||||
@@ -1049,6 +1191,8 @@
|
||||
<string>1.WindowOrigin</string>
|
||||
<string>1.editorWindowContentRectSynchronizationRect</string>
|
||||
<string>10.IBPluginDependency</string>
|
||||
<string>108.IBPluginDependency</string>
|
||||
<string>109.IBPluginDependency</string>
|
||||
<string>11.IBPluginDependency</string>
|
||||
<string>12.IBPluginDependency</string>
|
||||
<string>13.IBPluginDependency</string>
|
||||
@@ -1089,6 +1233,8 @@
|
||||
<string>9.IBPluginDependency</string>
|
||||
<string>90.IBPluginDependency</string>
|
||||
<string>91.IBPluginDependency</string>
|
||||
<string>97.IBPluginDependency</string>
|
||||
<string>98.IBPluginDependency</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
@@ -1112,6 +1258,8 @@
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>{{514, 459}, {106, 71}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
@@ -1148,7 +1296,9 @@
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>{{474, 394}, {239, 54}}</string>
|
||||
<string>{{474, 352}, {403, 116}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
@@ -1177,7 +1327,7 @@
|
||||
</object>
|
||||
</object>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">96</int>
|
||||
<int key="maxID">113</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
|
||||
@@ -757,7 +757,7 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "export PATH=$PATH:$HOME/bin:$HOME/local/bin:/sw/bin:/opt/local/bin:`$TARGET_BUILD_DIR/gitx --git-path`\n(echo -n \"#define BUILD_NUMBER \"; git describe) > build/revision\ntouch Info.plist";
|
||||
shellScript = "export PATH=$PATH:$HOME/bin:$HOME/local/bin:/sw/bin:/opt/local/bin:`$TARGET_BUILD_DIR/gitx --git-path`\n(echo -n \"#define BUILD_NUMBER \"; git describe|sed -e \"s/\\-/\\./\" -e \"s/v//\" -e \"s/-.*//\") > build/revision\ntouch Info.plist";
|
||||
};
|
||||
F5792DFB0EDB570C001B0C31 /* Compile libgit2 */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
|
||||
@@ -14,5 +14,7 @@
|
||||
+ (int) commitMessageViewVerticalLineLength;
|
||||
+ (BOOL) isGistEnabled;
|
||||
+ (BOOL) isGravatarEnabled;
|
||||
+ (BOOL) confirmPublicGists;
|
||||
+ (BOOL) isGistPublic;
|
||||
|
||||
@end
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
#define kCommitMessageViewVerticalLineLength @"PBCommitMessageViewVerticalLineLength"
|
||||
#define kEnableGist @"PBEnableGist"
|
||||
#define kEnableGravatar @"PBEnableGravatar"
|
||||
#define kConfirmPublicGists @"PBConfirmPublicGists"
|
||||
#define kPublicGist @"PBGistPublic"
|
||||
|
||||
@implementation PBGitDefaults
|
||||
|
||||
@@ -24,6 +26,10 @@
|
||||
forKey:kEnableGist];
|
||||
[defaultValues setObject:[NSNumber numberWithBool:YES]
|
||||
forKey:kEnableGravatar];
|
||||
[defaultValues setObject:[NSNumber numberWithBool:YES]
|
||||
forKey:kConfirmPublicGists];
|
||||
[defaultValues setObject:[NSNumber numberWithBool:NO]
|
||||
forKey:kPublicGist];
|
||||
[[NSUserDefaults standardUserDefaults] registerDefaults:defaultValues];
|
||||
}
|
||||
|
||||
@@ -42,4 +48,13 @@
|
||||
return [[NSUserDefaults standardUserDefaults] boolForKey:kEnableGravatar];
|
||||
}
|
||||
|
||||
+ (BOOL) confirmPublicGists
|
||||
{
|
||||
return [[NSUserDefaults standardUserDefaults] boolForKey:kConfirmPublicGists];
|
||||
}
|
||||
|
||||
+ (BOOL) isGistPublic
|
||||
{
|
||||
return [[NSUserDefaults standardUserDefaults] boolForKey:kPublicGist];
|
||||
}
|
||||
@end
|
||||
|
||||
@@ -127,6 +127,10 @@
|
||||
return [PBGitDefaults isGravatarEnabled];
|
||||
else if([feature isEqualToString:@"gist"])
|
||||
return [PBGitDefaults isGistEnabled];
|
||||
else if([feature isEqualToString:@"confirmGist"])
|
||||
return [PBGitDefaults confirmPublicGists];
|
||||
else if([feature isEqualToString:@"publicGist"])
|
||||
return [PBGitDefaults isGistPublic];
|
||||
else
|
||||
return YES;
|
||||
}
|
||||
|
||||
@@ -30,3 +30,4 @@ If the hunk isn't specific enough, you can decrease the context size by manipula
|
||||
#### Committing
|
||||
|
||||
Once you have staged all your changes, you can commit them. Enter a commit message in the center pane, but remember to use proper commit messages: your first line should be a short description of what you have changed, on which you can elaborate below that. Make sure the subject of your commit is short enough to fit in GitX's history view! Pressing the commit button will hopefully convey to you that the commit was successful, and also give you the commit hash.
|
||||
The 'Amend' checkbox does what `git commit --amend` does: It enables you to amend the commit on the tip of the current branch. Checking 'Amend' will give you the commit-message of mentioned commit and also will display all of the changes the commit introduced as staged in the right-hand pane. You may then stage/unstage further changes, change the commit-message and hit 'Commit'.
|
||||
|
||||
@@ -45,6 +45,29 @@ var Commit = function(obj) {
|
||||
|
||||
};
|
||||
|
||||
|
||||
var confirm_gist = function(confirmation_message) {
|
||||
if (!Controller.isFeatureEnabled_("confirmGist")) {
|
||||
gistie();
|
||||
return;
|
||||
}
|
||||
|
||||
// Set optional confirmation_message
|
||||
confirmation_message = confirmation_message || "Yes. Paste this commit.";
|
||||
var deleteMessage = Controller.getConfig_("github.token") ? " " : "You might not be able to delete it after posting.<br>";
|
||||
var publicMessage = Controller.isFeatureEnabled_("publicGist") ? "<b>public</b>" : "private";
|
||||
// Insert the verification links into div#notification_message
|
||||
var notification_text = 'This will create a ' + publicMessage + ' paste of your commit to <a href="http://gist.github.com/">http://gist.github.com/</a><br>' +
|
||||
deleteMessage +
|
||||
'Are you sure you want to continue?<br/><br/>' +
|
||||
'<a href="#" onClick="hideNotification();return false;" style="color: red;">No. Cancel.</a> | ' +
|
||||
'<a href="#" onClick="gistie();return false;" style="color: green;">' + confirmation_message + '</a>';
|
||||
|
||||
notify(notification_text, 0);
|
||||
// Hide img#spinner, since it?s visible by default
|
||||
$("spinner").style.display = "none";
|
||||
}
|
||||
|
||||
var gistie = function() {
|
||||
notify("Uploading code to Gistie..", 0);
|
||||
|
||||
@@ -60,9 +83,9 @@ var gistie = function() {
|
||||
if (token && login) {
|
||||
parameters.login = login;
|
||||
parameters.token = token;
|
||||
} else {
|
||||
parameters.private = true;
|
||||
}
|
||||
if (!Controller.isFeatureEnabled_("publicGist"))
|
||||
parameters.private = true;
|
||||
|
||||
var params = [];
|
||||
for (var name in parameters)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<body style="padding: 0px; border: 0px">
|
||||
<div id="rightcontent">
|
||||
<div id="buttons">
|
||||
<a class="servicebutton" id="gist" onClick="gistie();return false" href='#'>
|
||||
<a class="servicebutton" id="gist" onClick="confirm_gist();return false" href='#'>
|
||||
Gist it
|
||||
</a>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user