Skip to content

Commit b05db5f

Browse files
committed
Remove config_snapshot hack from refresh_references
We needed to perform this hack to get libgit2 to re-read the config on git_remote_list. Now that git_remote_list always reads the config, we don't need to force the config to update via a config_snapshot request
1 parent a5680b6 commit b05db5f

1 file changed

Lines changed: 1 addition & 15 deletions

File tree

generate/templates/manual/repository/refresh_references.cc

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -429,20 +429,6 @@ void GitRepository::RefreshReferencesWorker::Execute()
429429
return;
430430
}
431431

432-
git_config *config;
433-
baton->error_code = git_repository_config_snapshot(&config, repo);
434-
if (baton->error_code != GIT_OK) {
435-
if (giterr_last() != NULL) {
436-
baton->error = git_error_dup(giterr_last());
437-
}
438-
git_odb_free(odb);
439-
delete refreshData;
440-
baton->out = NULL;
441-
return;
442-
}
443-
git_config_free(config);
444-
445-
446432
// START Refresh HEAD
447433
git_reference *headRef = NULL;
448434
baton->error_code = lookupDirectReferenceByShorthand(&headRef, repo, "HEAD");
@@ -544,7 +530,7 @@ void GitRepository::RefreshReferencesWorker::Execute()
544530
if (reference == NULL) {
545531
// lookup found the reference but failed to resolve it directly
546532
continue;
547-
}
533+
}
548534

549535
UpstreamModel *upstreamModel;
550536
if (UpstreamModel::fromReference(&upstreamModel, reference)) {

0 commit comments

Comments
 (0)