[gnome-builder] git: add error message when we fail to clone



commit 13449e910f377231b41ed86b4f861f063236dc09
Author: Christian Hergert <chergert redhat com>
Date:   Wed Apr 27 19:55:06 2016 -0700

    git: add error message when we fail to clone
    
    Passing the error on from underlying systems seems to be non-helpful, so
    just set an error message ourselves.

 plugins/git/ide-git-remote-callbacks.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/plugins/git/ide-git-remote-callbacks.c b/plugins/git/ide-git-remote-callbacks.c
index beeb318..62083d3 100644
--- a/plugins/git/ide-git-remote-callbacks.c
+++ b/plugins/git/ide-git-remote-callbacks.c
@@ -169,6 +169,12 @@ ide_git_remote_callbacks_real_credentials (GgitRemoteCallbacks  *callbacks,
       self->tried |= GGIT_CREDTYPE_SSH_INTERACTIVE;
     }
 
+  if (ret == NULL)
+    g_set_error (error,
+                 G_IO_ERROR,
+                 G_IO_ERROR_NOT_SUPPORTED,
+                 _("Builder failed to provide appropriate credentials when cloning repository."));
+
   IDE_RETURN (ret);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]