Skip to content

Commit cf9d280

Browse files
authored
Merge pull request #117 from AleksArt000/main
fixed small error
2 parents f7e1bc7 + 0eb8e89 commit cf9d280

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/get.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ int repo_sync() {
9090

9191
// Git repo handle
9292
git_repository* repo_handle = NULL;
93-
unsigned int* status = NULL;
93+
unsigned int status = 0;
9494

9595
// bit of debugging
9696
dbg(3,"SOVIET_REPOS_DIR: %s",repo_dir);
@@ -124,14 +124,15 @@ int repo_sync() {
124124
}
125125

126126
// 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)
128128
{
129129
if (add_repo(submodule_name, repo_url) != 0) {msg(ERROR, "Failed to create the default repository");}
130130
}
131131

132132
// TODO: add a way to get all submodules and update them
133133
// But maybe a single system call isn't too bad...
134134
// Update submodules
135+
chdir(repo_dir);
135136
if (system("git submodule update --depth 1 --remote --init --recursive") != 0)
136137
{
137138
printf("Failed to update submodules in %s\n", repo_dir);

0 commit comments

Comments
 (0)