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 1010#import " GTConfiguration+Private.h"
1111#import " GTRepository.h"
1212#import " GTRemote.h"
13- #import " NSError+Git.h"
1413#import " GTSignature.h"
14+ #import " NSData+Git.h"
15+ #import " NSError+Git.h"
1516
1617#import " git2/config.h"
1718#import " git2/errors.h"
@@ -62,10 +63,7 @@ - (NSString *)stringForKey:(NSString *)key {
6263 git_buf buffer = {};
6364 if (git_config_get_string_buf (&buffer, self.git_config , key.UTF8String ) != 0 ) return nil ;
6465
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];
6967}
7068
7169- (void )setBool : (BOOL )b forKey : (NSString *)key {
You can’t perform that action at this time.
0 commit comments