File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ int repo_sync() {
90
90
91
91
// Git repo handle
92
92
git_repository * repo_handle = NULL ;
93
- unsigned int * status = NULL ;
93
+ unsigned int status = 0 ;
94
94
95
95
// bit of debugging
96
96
dbg (3 ,"SOVIET_REPOS_DIR: %s" ,repo_dir );
@@ -124,14 +124,15 @@ int repo_sync() {
124
124
}
125
125
126
126
// Check if submodule exists
127
- if (git_submodule_status (status , repo_handle , submodule_name , GIT_SUBMODULE_IGNORE_ALL ) != 0 )
127
+ if (git_submodule_status (& status , repo_handle , submodule_name , GIT_SUBMODULE_IGNORE_ALL ) != 0 )
128
128
{
129
129
if (add_repo (submodule_name , repo_url ) != 0 ) {msg (ERROR , "Failed to create the default repository" );}
130
130
}
131
131
132
132
// TODO: add a way to get all submodules and update them
133
133
// But maybe a single system call isn't too bad...
134
134
// Update submodules
135
+ chdir (repo_dir );
135
136
if (system ("git submodule update --depth 1 --remote --init --recursive" ) != 0 )
136
137
{
137
138
printf ("Failed to update submodules in %s\n" , repo_dir );
You can’t perform that action at this time.
0 commit comments