[gnome-builder] git: ensure user name is provided to SSH based URIs
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] git: ensure user name is provided to SSH based URIs
- Date: Mon, 9 Jul 2018 14:39:12 +0000 (UTC)
commit de1ce73972b1d3ab541405ac70d37f04446ddea8
Author: Christian Hergert <chergert redhat com>
Date: Mon Jul 9 16:36:45 2018 +0200
git: ensure user name is provided to SSH based URIs
This ensures that we have a username for the SSH+git URI which does not
work in previous implementations via git callbacks. That was too late in
the cycle to get things to work correctly.
Fixes #562
src/plugins/git/ide-git-clone-widget.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/src/plugins/git/ide-git-clone-widget.c b/src/plugins/git/ide-git-clone-widget.c
index 8a00173b5..9a4c2272f 100644
--- a/src/plugins/git/ide-git-clone-widget.c
+++ b/src/plugins/git/ide-git-clone-widget.c
@@ -500,6 +500,12 @@ ide_git_clone_widget_clone_async (IdeGitCloneWidget *self,
return;
}
+ if (g_strcmp0 ("ssh", ide_vcs_uri_get_scheme (uri)) == 0)
+ {
+ if (ide_vcs_uri_get_user (uri) == NULL)
+ ide_vcs_uri_set_user (uri, g_get_user_name ());
+ }
+
if (self->child_name)
{
g_autoptr(GFile) child = g_file_get_child (location, self->child_name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]