File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 10
10
#import " GTConfiguration+Private.h"
11
11
#import " GTRepository.h"
12
12
#import " GTRemote.h"
13
- #import " NSError+Git.h"
14
13
#import " GTSignature.h"
14
+ #import " NSData+Git.h"
15
+ #import " NSError+Git.h"
15
16
16
17
#import " git2/config.h"
17
18
#import " git2/errors.h"
@@ -62,10 +63,7 @@ - (NSString *)stringForKey:(NSString *)key {
62
63
git_buf buffer = {};
63
64
if (git_config_get_string_buf (&buffer, self.git_config , key.UTF8String ) != 0 ) return nil ;
64
65
65
- NSString *string = [[NSString alloc ] initWithBytes: buffer.ptr length: buffer.size encoding: NSUTF8StringEncoding];
66
- git_buf_free (&buffer);
67
-
68
- return string;
66
+ return [[NSString alloc ] initWithData: [NSData git_dataWithBuffer: &buffer] encoding: NSUTF8StringEncoding];
69
67
}
70
68
71
69
- (void )setBool : (BOOL )b forKey : (NSString *)key {
You can’t perform that action at this time.
0 commit comments