diff --git a/English.lproj/Preferences.xib b/English.lproj/Preferences.xib
index db97d6f..44d184f 100644
--- a/English.lproj/Preferences.xib
+++ b/English.lproj/Preferences.xib
@@ -10,6 +10,7 @@
YES
+
@@ -718,6 +766,70 @@
96
+
+
+ value: values.PBConfirmPublicGists
+
+
+
+
+
+ value: values.PBConfirmPublicGists
+ value
+ values.PBConfirmPublicGists
+ 2
+
+
+ 104
+
+
+
+ enabled: values.PBEnableGist
+
+
+
+
+
+ enabled: values.PBEnableGist
+ enabled
+ values.PBEnableGist
+ 2
+
+
+ 107
+
+
+
+ enabled: values.PBEnableGist
+
+
+
+
+
+ enabled: values.PBEnableGist
+ enabled
+ values.PBEnableGist
+ 2
+
+
+ 111
+
+
+
+ value: values.PBGistPublic
+
+
+
+
+
+ value: values.PBGistPublic
+ value
+ values.PBGistPublic
+ 2
+
+
+ 113
+
@@ -1000,8 +1112,10 @@
YES
-
+
+
+
Integration
@@ -1034,6 +1148,34 @@
+
+ 97
+
+
+ YES
+
+
+
+
+
+ 98
+
+
+
+
+ 108
+
+
+ YES
+
+
+
+
+
+ 109
+
+
+
@@ -1049,6 +1191,8 @@
1.WindowOrigin
1.editorWindowContentRectSynchronizationRect
10.IBPluginDependency
+ 108.IBPluginDependency
+ 109.IBPluginDependency
11.IBPluginDependency
12.IBPluginDependency
13.IBPluginDependency
@@ -1089,6 +1233,8 @@
9.IBPluginDependency
90.IBPluginDependency
91.IBPluginDependency
+ 97.IBPluginDependency
+ 98.IBPluginDependency
YES
@@ -1112,6 +1258,8 @@
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
{{514, 459}, {106, 71}}
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
@@ -1148,7 +1296,9 @@
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
- {{474, 394}, {239, 54}}
+ {{474, 352}, {403, 116}}
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
com.apple.InterfaceBuilder.CocoaPlugin
@@ -1177,7 +1327,7 @@
- 96
+ 113
diff --git a/GitX.xcodeproj/project.pbxproj b/GitX.xcodeproj/project.pbxproj
index 9c13201..000fb40 100644
--- a/GitX.xcodeproj/project.pbxproj
+++ b/GitX.xcodeproj/project.pbxproj
@@ -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;
diff --git a/PBGitDefaults.h b/PBGitDefaults.h
index 84f7a18..2e2444b 100644
--- a/PBGitDefaults.h
+++ b/PBGitDefaults.h
@@ -14,5 +14,7 @@
+ (int) commitMessageViewVerticalLineLength;
+ (BOOL) isGistEnabled;
+ (BOOL) isGravatarEnabled;
++ (BOOL) confirmPublicGists;
++ (BOOL) isGistPublic;
@end
diff --git a/PBGitDefaults.m b/PBGitDefaults.m
index 6b08695..676fa72 100644
--- a/PBGitDefaults.m
+++ b/PBGitDefaults.m
@@ -12,6 +12,8 @@
#define kCommitMessageViewVerticalLineLength @"PBCommitMessageViewVerticalLineLength"
#define kEnableGist @"PBEnableGist"
#define kEnableGravatar @"PBEnableGravatar"
+#define kConfirmPublicGists @"PBConfirmPublicGists"
+#define kPublicGist @"PBGistPublic"
@implementation PBGitDefaults
@@ -24,6 +26,10 @@
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
diff --git a/PBWebController.m b/PBWebController.m
index b9d472d..d185593 100644
--- a/PBWebController.m
+++ b/PBWebController.m
@@ -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;
}
diff --git a/Site/UserManual/text/03 - Committing.markdown b/Site/UserManual/text/03 - Committing.markdown
index 4ff6fab..67534c3 100644
--- a/Site/UserManual/text/03 - Committing.markdown
+++ b/Site/UserManual/text/03 - Committing.markdown
@@ -30,3 +30,4 @@ If the hunk isn't specific enough, you can decrease the context size by manipula
#### Committing
Once you have staged all your changes, you can commit them. Enter a commit message in the center pane, but remember to use proper commit messages: your first line should be a short description of what you have changed, on which you can elaborate below that. Make sure the subject of your commit is short enough to fit in GitX's history view! Pressing the commit button will hopefully convey to you that the commit was successful, and also give you the commit hash.
+The 'Amend' checkbox does what `git commit --amend` does: It enables you to amend the commit on the tip of the current branch. Checking 'Amend' will give you the commit-message of mentioned commit and also will display all of the changes the commit introduced as staged in the right-hand pane. You may then stage/unstage further changes, change the commit-message and hit 'Commit'.
diff --git a/html/views/history/history.js b/html/views/history/history.js
index 57cee0d..ee94436 100644
--- a/html/views/history/history.js
+++ b/html/views/history/history.js
@@ -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.
";
+ var publicMessage = Controller.isFeatureEnabled_("publicGist") ? "public" : "private";
+ // Insert the verification links into div#notification_message
+ var notification_text = 'This will create a ' + publicMessage + ' paste of your commit to http://gist.github.com/
' +
+ deleteMessage +
+ 'Are you sure you want to continue?
' +
+ 'No. Cancel. | ' +
+ '' + confirmation_message + '';
+
+ 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)
diff --git a/html/views/history/index.html b/html/views/history/index.html
index 29c9122..65117c3 100644
--- a/html/views/history/index.html
+++ b/html/views/history/index.html
@@ -14,7 +14,7 @@