[gitg] Update submodules at clone
- From: Alberto Fanjul <albfan src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gitg] Update submodules at clone
- Date: Thu, 10 Jan 2019 23:05:15 +0000 (UTC)
commit ef067d5101ad86a9e5149c61504c818e934054d9
Author: Alberto Fanjul <albertofanjul gmail com>
Date:   Thu Jan 10 23:58:22 2019 +0100
    Update submodules at clone
 gitg/gitg-dash-view.vala | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/gitg/gitg-dash-view.vala b/gitg/gitg-dash-view.vala
index a5e29238..f6853edf 100644
--- a/gitg/gitg-dash-view.vala
+++ b/gitg/gitg-dash-view.vala
@@ -344,6 +344,15 @@ class DashView : Gtk.Grid, GitgExt.UIElement, GitgExt.Activity, GitgExt.Selectab
                        clone_options.set_fetch_options(fetch_options);
 
                        repository = (Repository)Ggit.Repository.clone(url, location, clone_options);
+
+                       repository.submodule_foreach((submodule, name) => {
+                               try {
+                                       submodule.update(true, null);
+                               } catch (Error e) {
+                                       stderr.printf(@"ERROR: failed to update submodule $(name): 
$(e.message)\n");
+                               }
+                               return 0;
+                       });
                });
 
                return repository;
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]