Skip to content

Commit ae7a6ca

Browse files
committed
Remove config refreshing wrapper
See libgit2/libgit2#2638.
1 parent a15cde2 commit ae7a6ca

File tree

3 files changed

+1
-25
lines changed

3 files changed

+1
-25
lines changed

ObjectiveGit/GTConfiguration.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,4 @@
4242

4343
- (BOOL)deleteValueForKey:(NSString *)key error:(NSError **)error;
4444

45-
/// Reloads the configuration from the files on disk if they have changed since
46-
/// it was originally loaded.
47-
///
48-
/// error - The error if one occurred.
49-
///
50-
/// Returns whether the refresh was successful.
51-
- (BOOL)refresh:(NSError **)error;
52-
5345
@end

ObjectiveGit/GTConfiguration.m

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -140,17 +140,4 @@ - (NSArray *)remotes {
140140
return remotes;
141141
}
142142

143-
#pragma mark Refresh
144-
145-
- (BOOL)refresh:(NSError **)error {
146-
int success = git_config_refresh(self.git_config);
147-
if (success != GIT_OK) {
148-
if (error != NULL) *error = [NSError git_errorFor:success description:@"Couldn't reload the configuration from disk."];
149-
150-
return NO;
151-
}
152-
153-
return YES;
154-
}
155-
156143
@end

ObjectiveGitTests/GTSubmoduleSpec.m

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,15 +253,12 @@
253253

254254
NSString *configKey = @"submodule.Test_App2.url";
255255
NSString *newOrigin = @"https://github.com/libgit2/objective-git.git";
256-
[config setString:newOrigin forKey:configKey];
257256

258-
expect(@([config refresh:NULL])).to(beTruthy());
257+
[config setString:newOrigin forKey:configKey];
259258
expect([config stringForKey:configKey]).to(equal(newOrigin));
260259

261260
__block NSError *error = nil;
262261
expect(@([submodule sync:&error])).to(beTruthy());
263-
264-
expect(@([config refresh:NULL])).to(beTruthy());
265262
expect([config stringForKey:configKey]).to(equal(@"../Test_App"));
266263
});
267264
});

0 commit comments

Comments
 (0)