File tree Expand file tree Collapse file tree
generate/templates/manual/repository Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -415,6 +415,17 @@ void GitRepository::RefreshReferencesWorker::Execute()
415415 git_odb *odb;
416416
417417 baton->error_code = git_repository_odb (&odb, repo);
418+ if (baton->error_code != GIT_OK) {
419+ if (giterr_last () != NULL ) {
420+ baton->error = git_error_dup (giterr_last ());
421+ }
422+ delete refreshData;
423+ baton->out = NULL ;
424+ return ;
425+ }
426+
427+ git_config *config;
428+ baton->error_code = git_repository_config_snapshot (&config, repo);
418429 if (baton->error_code != GIT_OK) {
419430 if (giterr_last () != NULL ) {
420431 baton->error = git_error_dup (giterr_last ());
@@ -424,6 +435,8 @@ void GitRepository::RefreshReferencesWorker::Execute()
424435 baton->out = NULL ;
425436 return ;
426437 }
438+ git_config_free (config);
439+
427440
428441 // START Refresh HEAD
429442 git_reference *headRef = NULL ;
You can’t perform that action at this time.
0 commit comments