[anjuta] git: Fix bgo#654559 - Weird pseudo-password dialog shown with half a commit message when I import a
- From: Johannes Schmid <jhs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] git: Fix bgo#654559 - Weird pseudo-password dialog shown with half a commit message when I import a
- Date: Sun, 17 Jul 2011 08:20:32 +0000 (UTC)
commit c5ccceca4e732f42e569d34aaed42d2ee628c7f7
Author: Johannes Schmid <jhs gnome org>
Date: Sun Jul 17 10:09:47 2011 +0200
git: Fix bgo#654559 - Weird pseudo-password dialog shown with half a commit message when I import a project
We only need to check for password prompts in the output of push/pull were ssh (or other) passwords may be required.
Disabled that check for all other commands!
Also replaced git_command_free_string_list with anjuta_util_glist_strings_free()
plugins/git/git-add-command.c | 2 +-
plugins/git/git-add-files-pane.c | 2 +-
plugins/git/git-apply-mailbox-command.c | 2 +-
plugins/git/git-apply-mailbox-pane.c | 2 +-
plugins/git/git-branch-delete-command.c | 2 +-
plugins/git/git-checkout-files-command.c | 2 +-
plugins/git/git-checkout-pane.c | 2 +-
plugins/git/git-command.c | 19 ++++++-------------
plugins/git/git-command.h | 6 +++++-
plugins/git/git-commit-command.c | 2 +-
plugins/git/git-commit-pane.c | 2 +-
plugins/git/git-delete-branches-pane.c | 4 ++--
plugins/git/git-delete-tags-pane.c | 2 +-
plugins/git/git-ignore-command.c | 2 +-
plugins/git/git-pull-command.c | 1 +
plugins/git/git-push-command.c | 3 ++-
plugins/git/git-push-pane.c | 2 +-
plugins/git/git-remove-command.c | 2 +-
plugins/git/git-remove-files-pane.c | 2 +-
plugins/git/git-reset-files-command.c | 2 +-
plugins/git/git-resolve-conflicts-pane.c | 2 +-
plugins/git/git-tag-delete-command.c | 2 +-
plugins/git/git-unstage-pane.c | 2 +-
23 files changed, 34 insertions(+), 35 deletions(-)
---
diff --git a/plugins/git/git-add-command.c b/plugins/git/git-add-command.c
index a4095e3..b2198ae 100644
--- a/plugins/git/git-add-command.c
+++ b/plugins/git/git-add-command.c
@@ -45,7 +45,7 @@ git_add_command_finalize (GObject *object)
self = GIT_ADD_COMMAND (object);
- git_command_free_string_list (self->priv->paths);
+ anjuta_util_glist_strings_free (self->priv->paths);
g_free (self->priv);
G_OBJECT_CLASS (git_add_command_parent_class)->finalize (object);
diff --git a/plugins/git/git-add-files-pane.c b/plugins/git/git-add-files-pane.c
index 35e1469..831e1ae 100644
--- a/plugins/git/git-add-files-pane.c
+++ b/plugins/git/git-add-files-pane.c
@@ -45,7 +45,7 @@ on_ok_button_clicked (GtkButton *button, GitAddFilesPane *self)
paths,
gtk_toggle_button_get_active (force_check));
- git_command_free_string_list (paths);
+ anjuta_util_glist_strings_free (paths);
g_signal_connect (G_OBJECT (add_command), "command-finished",
G_CALLBACK (git_pane_report_errors),
diff --git a/plugins/git/git-apply-mailbox-command.c b/plugins/git/git-apply-mailbox-command.c
index 3a32299..154c9de 100644
--- a/plugins/git/git-apply-mailbox-command.c
+++ b/plugins/git/git-apply-mailbox-command.c
@@ -46,7 +46,7 @@ git_apply_mailbox_command_finalize (GObject *object)
self = GIT_APPLY_MAILBOX_COMMAND (object);
- git_command_free_string_list (self->priv->mailbox_paths);
+ anjuta_util_glist_strings_free (self->priv->mailbox_paths);
g_free (self->priv);
G_OBJECT_CLASS (git_apply_mailbox_command_parent_class)->finalize (object);
diff --git a/plugins/git/git-apply-mailbox-pane.c b/plugins/git/git-apply-mailbox-pane.c
index aed20cf..1d69363 100644
--- a/plugins/git/git-apply-mailbox-pane.c
+++ b/plugins/git/git-apply-mailbox-pane.c
@@ -63,7 +63,7 @@ on_ok_button_clicked (GtkButton *button, GitApplyMailboxPane *self)
anjuta_command_start (ANJUTA_COMMAND (apply_mailbox_command));
- git_command_free_string_list (paths);
+ anjuta_util_glist_strings_free (paths);
git_pane_remove_from_dock (GIT_PANE (self));
}
diff --git a/plugins/git/git-branch-delete-command.c b/plugins/git/git-branch-delete-command.c
index b917c4a..ddb1e11 100644
--- a/plugins/git/git-branch-delete-command.c
+++ b/plugins/git/git-branch-delete-command.c
@@ -46,7 +46,7 @@ git_branch_delete_command_finalize (GObject *object)
self = GIT_BRANCH_DELETE_COMMAND (object);
- git_command_free_string_list (self->priv->branches);
+ anjuta_util_glist_strings_free (self->priv->branches);
g_free (self->priv);
G_OBJECT_CLASS (git_branch_delete_command_parent_class)->finalize (object);
diff --git a/plugins/git/git-checkout-files-command.c b/plugins/git/git-checkout-files-command.c
index 24c705d..7cd65db 100644
--- a/plugins/git/git-checkout-files-command.c
+++ b/plugins/git/git-checkout-files-command.c
@@ -65,7 +65,7 @@ git_checkout_files_command_finalize (GObject *object)
self = GIT_CHECKOUT_FILES_COMMAND (object);
- git_command_free_string_list (self->priv->paths);
+ anjuta_util_glist_strings_free (self->priv->paths);
g_free (self->priv);
G_OBJECT_CLASS (git_checkout_files_command_parent_class)->finalize (object);
diff --git a/plugins/git/git-checkout-pane.c b/plugins/git/git-checkout-pane.c
index 6867aff..ee97deb 100644
--- a/plugins/git/git-checkout-pane.c
+++ b/plugins/git/git-checkout-pane.c
@@ -44,7 +44,7 @@ on_ok_button_clicked (GtkButton *button, GitCheckoutPane *self)
paths,
gtk_toggle_button_get_active (force_check));
- git_command_free_string_list (paths);
+ anjuta_util_glist_strings_free (paths);
g_signal_connect (G_OBJECT (checkout_command), "command-finished",
G_CALLBACK (git_pane_report_errors),
diff --git a/plugins/git/git-command.c b/plugins/git/git-command.c
index 19724f9..e3ee0d1 100644
--- a/plugins/git/git-command.c
+++ b/plugins/git/git-command.c
@@ -347,6 +347,7 @@ git_command_init (GitCommand *self)
self->priv = g_new0 (GitCommandPriv, 1);
self->priv->launcher = anjuta_launcher_new ();
anjuta_launcher_set_encoding (self->priv->launcher, NULL);
+ anjuta_launcher_set_check_passwd_prompt (self->priv->launcher, FALSE);
g_signal_connect (G_OBJECT (self->priv->launcher), "child-exited",
G_CALLBACK (git_command_child_exited),
@@ -558,18 +559,10 @@ git_command_copy_string_list (GList *list)
return new_list;
}
-void
-git_command_free_string_list (GList *list)
+void
+git_command_set_check_passwd_prompt (GitCommand *git_command,
+ gboolean check)
{
- GList *current_path;
-
- current_path = list;
-
- while (current_path)
- {
- g_free (current_path->data);
- current_path = g_list_next (current_path);
- }
-
- g_list_free (list);
+ anjuta_launcher_set_check_passwd_prompt (git_command->priv->launcher, check);
}
+
diff --git a/plugins/git/git-command.h b/plugins/git/git-command.h
index d9464a8..5f2919d 100644
--- a/plugins/git/git-command.h
+++ b/plugins/git/git-command.h
@@ -32,6 +32,7 @@
#include <stdlib.h>
#include <libanjuta/anjuta-sync-command.h>
#include <libanjuta/anjuta-launcher.h>
+#include <libanjuta/anjuta-utils.h>
G_BEGIN_DECLS
@@ -75,7 +76,10 @@ void git_command_send_output_to_info (GitCommand *git_command,
/* Static helper methods */
GList *git_command_copy_string_list (GList *path_list);
-void git_command_free_string_list (GList *path_list);
+
+/* Password handling */
+void git_command_set_check_passwd_prompt (GitCommand *git_command,
+ gboolean check);
G_END_DECLS
diff --git a/plugins/git/git-commit-command.c b/plugins/git/git-commit-command.c
index df2bad9..5722d4b 100644
--- a/plugins/git/git-commit-command.c
+++ b/plugins/git/git-commit-command.c
@@ -82,7 +82,7 @@ git_commit_command_finalize (GObject *object)
self = GIT_COMMIT_COMMAND (object);
- git_command_free_string_list (self->priv->paths);
+ anjuta_util_glist_strings_free (self->priv->paths);
g_free (self->priv->log);
g_free (self->priv->author_name);
g_free (self->priv->author_email);
diff --git a/plugins/git/git-commit-pane.c b/plugins/git/git-commit-pane.c
index 807a184..32f90a7 100644
--- a/plugins/git/git-commit-pane.c
+++ b/plugins/git/git-commit-pane.c
@@ -170,7 +170,7 @@ on_ok_button_clicked (GtkButton *button, GitCommitPane *self)
g_free (log);
g_free (author_name);
g_free (author_email);
- git_command_free_string_list (selected_paths);
+ anjuta_util_glist_strings_free (selected_paths);
git_pane_create_message_view (plugin);
diff --git a/plugins/git/git-delete-branches-pane.c b/plugins/git/git-delete-branches-pane.c
index 1d92e34..5e59448 100644
--- a/plugins/git/git-delete-branches-pane.c
+++ b/plugins/git/git-delete-branches-pane.c
@@ -55,7 +55,7 @@ on_ok_button_clicked (GtkButton *button, GitDeleteBranchesPane *self)
FALSE,
gtk_toggle_button_get_active (require_merged_check));
- git_command_free_string_list (selected_local_branches);
+ anjuta_util_glist_strings_free (selected_local_branches);
g_signal_connect (G_OBJECT (local_delete_command),
"command-finished",
@@ -79,7 +79,7 @@ on_ok_button_clicked (GtkButton *button, GitDeleteBranchesPane *self)
TRUE,
gtk_toggle_button_get_active (require_merged_check));
- git_command_free_string_list (selected_remote_branches);
+ anjuta_util_glist_strings_free (selected_remote_branches);
g_signal_connect (G_OBJECT (remote_delete_command),
"command-finished",
diff --git a/plugins/git/git-delete-tags-pane.c b/plugins/git/git-delete-tags-pane.c
index e10a336..a0c4f8d 100644
--- a/plugins/git/git-delete-tags-pane.c
+++ b/plugins/git/git-delete-tags-pane.c
@@ -32,7 +32,7 @@ on_delete_tags_button_clicked (GtkAction *action, Git *plugin)
delete_command = git_tag_delete_command_new (plugin->project_root_directory,
tags);
- git_command_free_string_list (tags);
+ anjuta_util_glist_strings_free (tags);
g_signal_connect (G_OBJECT (delete_command), "command-finished",
G_CALLBACK (git_pane_report_errors),
diff --git a/plugins/git/git-ignore-command.c b/plugins/git/git-ignore-command.c
index 41be367..00ca5aa 100644
--- a/plugins/git/git-ignore-command.c
+++ b/plugins/git/git-ignore-command.c
@@ -44,7 +44,7 @@ git_ignore_command_finalize (GObject *object)
self = GIT_IGNORE_COMMAND (object);
- git_command_free_string_list (self->priv->paths);
+ anjuta_util_glist_strings_free (self->priv->paths);
g_free (self->priv);
G_OBJECT_CLASS (git_ignore_command_parent_class)->finalize (object);
diff --git a/plugins/git/git-pull-command.c b/plugins/git/git-pull-command.c
index 4d76f06..dfe5ed9 100644
--- a/plugins/git/git-pull-command.c
+++ b/plugins/git/git-pull-command.c
@@ -42,6 +42,7 @@ static void
git_pull_command_init (GitPullCommand *self)
{
self->priv = g_new0 (GitPullCommandPriv, 1);
+ git_command_set_check_passwd_prompt (GIT_COMMAND (self), TRUE);
}
static void
diff --git a/plugins/git/git-push-command.c b/plugins/git/git-push-command.c
index f7894e5..fd60da8 100644
--- a/plugins/git/git-push-command.c
+++ b/plugins/git/git-push-command.c
@@ -39,6 +39,7 @@ static void
git_push_command_init (GitPushCommand *self)
{
self->priv = g_new0 (GitPushCommandPriv, 1);
+ git_command_set_check_passwd_prompt (GIT_COMMAND (self), TRUE);
}
static void
@@ -49,7 +50,7 @@ git_push_command_finalize (GObject *object)
self = GIT_PUSH_COMMAND (object);
g_free (self->priv->url);
- git_command_free_string_list (self->priv->refs);
+ anjuta_util_glist_strings_free (self->priv->refs);
g_free (self->priv);
G_OBJECT_CLASS (git_push_command_parent_class)->finalize (object);
diff --git a/plugins/git/git-push-pane.c b/plugins/git/git-push-pane.c
index 9fb01c0..86242ca 100644
--- a/plugins/git/git-push-pane.c
+++ b/plugins/git/git-push-pane.c
@@ -121,7 +121,7 @@ on_ok_button_clicked (GtkButton *button, GitPushPane *self)
gtk_toggle_button_get_active (force_check));
g_free (repository);
- git_command_free_string_list (selected_items);
+ anjuta_util_glist_strings_free (selected_items);
git_pane_create_message_view (plugin);
diff --git a/plugins/git/git-remove-command.c b/plugins/git/git-remove-command.c
index 87a218f..56db3cf 100644
--- a/plugins/git/git-remove-command.c
+++ b/plugins/git/git-remove-command.c
@@ -45,7 +45,7 @@ git_remove_command_finalize (GObject *object)
self = GIT_REMOVE_COMMAND (object);
- git_command_free_string_list (self->priv->paths);
+ anjuta_util_glist_strings_free (self->priv->paths);
g_free (self->priv);
G_OBJECT_CLASS (git_remove_command_parent_class)->finalize (object);
diff --git a/plugins/git/git-remove-files-pane.c b/plugins/git/git-remove-files-pane.c
index 96324ec..f2b0b8f 100644
--- a/plugins/git/git-remove-files-pane.c
+++ b/plugins/git/git-remove-files-pane.c
@@ -45,7 +45,7 @@ on_ok_button_clicked (GtkButton *button, GitRemoveFilesPane *self)
paths,
gtk_toggle_button_get_active (force_check));
- git_command_free_string_list (paths);
+ anjuta_util_glist_strings_free (paths);
g_signal_connect (G_OBJECT (remove_command), "command-finished",
G_CALLBACK (git_pane_report_errors),
diff --git a/plugins/git/git-reset-files-command.c b/plugins/git/git-reset-files-command.c
index c76377e..6e1ff2e 100644
--- a/plugins/git/git-reset-files-command.c
+++ b/plugins/git/git-reset-files-command.c
@@ -59,7 +59,7 @@ git_reset_files_command_finalize (GObject *object)
self = GIT_RESET_FILES_COMMAND (object);
- git_command_free_string_list (self->priv->paths);
+ anjuta_util_glist_strings_free (self->priv->paths);
g_free (self->priv->revision);
g_free (self->priv);
diff --git a/plugins/git/git-resolve-conflicts-pane.c b/plugins/git/git-resolve-conflicts-pane.c
index 73528c0..95964bc 100644
--- a/plugins/git/git-resolve-conflicts-pane.c
+++ b/plugins/git/git-resolve-conflicts-pane.c
@@ -33,7 +33,7 @@ on_resolve_conflicts_button_clicked (GtkAction *action, Git *plugin)
add_command = git_add_command_new_list (plugin->project_root_directory,
paths, FALSE);
- git_command_free_string_list (paths);
+ anjuta_util_glist_strings_free (paths);
g_signal_connect (G_OBJECT (add_command), "command-finished",
G_CALLBACK (git_pane_report_errors),
diff --git a/plugins/git/git-tag-delete-command.c b/plugins/git/git-tag-delete-command.c
index f2bc522..1c7de7c 100644
--- a/plugins/git/git-tag-delete-command.c
+++ b/plugins/git/git-tag-delete-command.c
@@ -44,7 +44,7 @@ git_tag_delete_command_finalize (GObject *object)
self = GIT_TAG_DELETE_COMMAND (object);
- git_command_free_string_list (self->priv->tags);
+ anjuta_util_glist_strings_free (self->priv->tags);
g_free (self->priv);
G_OBJECT_CLASS (git_tag_delete_command_parent_class)->finalize (object);
diff --git a/plugins/git/git-unstage-pane.c b/plugins/git/git-unstage-pane.c
index a058993..152f91d 100644
--- a/plugins/git/git-unstage-pane.c
+++ b/plugins/git/git-unstage-pane.c
@@ -34,7 +34,7 @@ on_unstage_button_clicked (GtkAction *action, Git *plugin)
GIT_RESET_FILES_HEAD,
paths);
- git_command_free_string_list (paths);
+ anjuta_util_glist_strings_free (paths);
g_signal_connect (G_OBJECT (reset_command), "command-finished",
G_CALLBACK (git_pane_report_errors),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]