Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/BuildPR.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: PullRequest

on: [pull_request]

jobs:
build-objective-git:
name: Build objective-git
runs-on: macOS-latest
strategy:
fail-fast: false
matrix:
xcode: [Xcode_11.7, Xcode_12.2, Xcode_12.4]
steps:
- name: Checkout
uses: actions/checkout@v2.3.3
with:
fetch-depth: 0
submodules: true
- name: Set XCode Version
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app
- name: Build project
run: xcodebuild -workspace ObjectiveGitFramework.xcworkspace -scheme "ObjectiveGit Mac" archive | xcpretty

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ External/libssh2-ios

Carthage/Build

External/build
6 changes: 3 additions & 3 deletions Cartfile.private
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
github "jspahrsummers/xcconfigs" "master"
github "Quick/Quick" ~> 1.2.0
github "Quick/Nimble" ~> 7.1.0
github "ZipArchive/ZipArchive" ~> 2.1.2
github "Quick/Quick" ~> 1.3.4
github "Quick/Nimble" ~> 7.3.3
github "ZipArchive/ZipArchive" ~> 2.1.4
8 changes: 4 additions & 4 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
github "Quick/Nimble" "v7.1.0"
github "Quick/Quick" "v1.2.0"
github "ZipArchive/ZipArchive" "v2.1.2"
github "jspahrsummers/xcconfigs" "bb795558a76e5daf3688500055bbcfe243bffa8d"
github "Quick/Nimble" "v7.3.4"
github "Quick/Quick" "v1.3.4"
github "ZipArchive/ZipArchive" "v2.2.2"
github "jspahrsummers/xcconfigs" "81e1c552847883c15d5cbfda2adca6ec78044ead"
2 changes: 1 addition & 1 deletion Carthage/Checkouts/Nimble
Submodule Nimble updated 62 files
+36 −3 .travis.yml
+1 −1 Cartfile.private
+1 −1 Cartfile.resolved
+2 −0 Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/Mach/CwlPreconditionTesting.h
+2 −0 Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/Posix/CwlPreconditionTesting_POSIX.h
+1 −1 Gemfile
+39 −36 Gemfile.lock
+3 −4 Nimble.podspec
+47 −29 Nimble.xcodeproj/project.pbxproj
+1 −1 README.md
+2 −2 Sources/Nimble/Adapters/AssertionRecorder.swift
+3 −3 Sources/Nimble/Adapters/NMBExpectation.swift
+23 −13 Sources/Nimble/Adapters/NMBObjCMatcher.swift
+6 −3 Sources/Nimble/Adapters/NimbleEnvironment.swift
+12 −1 Sources/Nimble/Adapters/NimbleXCTestHandler.swift
+8 −2 Sources/Nimble/DSL+Wait.swift
+14 −21 Sources/Nimble/Expectation.swift
+3 −1 Sources/Nimble/ExpectationMessage.swift
+3 −3 Sources/Nimble/Matchers/AllPass.swift
+25 −82 Sources/Nimble/Matchers/Async.swift
+2 −2 Sources/Nimble/Matchers/BeAKindOf.swift
+2 −2 Sources/Nimble/Matchers/BeAnInstanceOf.swift
+16 −4 Sources/Nimble/Matchers/BeCloseTo.swift
+3 −3 Sources/Nimble/Matchers/BeEmpty.swift
+5 −5 Sources/Nimble/Matchers/BeGreaterThan.swift
+10 −10 Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift
+39 −8 Sources/Nimble/Matchers/BeIdenticalTo.swift
+10 −10 Sources/Nimble/Matchers/BeLessThan.swift
+9 −10 Sources/Nimble/Matchers/BeLessThanOrEqual.swift
+4 −4 Sources/Nimble/Matchers/BeLogical.swift
+1 −1 Sources/Nimble/Matchers/BeNil.swift
+2 −3 Sources/Nimble/Matchers/BeVoid.swift
+4 −5 Sources/Nimble/Matchers/BeginWith.swift
+24 −24 Sources/Nimble/Matchers/Contain.swift
+10 −12 Sources/Nimble/Matchers/ContainElementSatisfying.swift
+17 −21 Sources/Nimble/Matchers/EndWith.swift
+82 −94 Sources/Nimble/Matchers/Equal.swift
+23 −17 Sources/Nimble/Matchers/HaveCount.swift
+7 −8 Sources/Nimble/Matchers/Match.swift
+32 −14 Sources/Nimble/Matchers/MatchError.swift
+2 −2 Sources/Nimble/Matchers/MatcherProtocols.swift
+4 −2 Sources/Nimble/Matchers/PostNotification.swift
+10 −6 Sources/Nimble/Matchers/Predicate.swift
+18 −12 Sources/Nimble/Matchers/RaisesException.swift
+6 −31 Sources/Nimble/Matchers/SatisfyAllOf.swift
+6 −31 Sources/Nimble/Matchers/SatisfyAnyOf.swift
+12 −16 Sources/Nimble/Matchers/ThrowAssertion.swift
+45 −39 Sources/Nimble/Matchers/ThrowError.swift
+4 −0 Sources/Nimble/Utils/Await.swift
+16 −10 Sources/Nimble/Utils/Stringers.swift
+0 −9 Sources/NimbleObjectiveC/CurrentTestCaseTracker.h
+5 −8 Sources/NimbleObjectiveC/DSL.m
+1 −1 Sources/NimbleObjectiveC/NMBExceptionCapture.m
+5 −0 Sources/NimbleObjectiveC/NMBStringify.m
+6 −1 Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m
+6 −6 Tests/NimbleTests/Helpers/utils.swift
+1 −1 Tests/NimbleTests/Matchers/MatchErrorTest.swift
+7 −1 Tests/NimbleTests/Matchers/ThrowAssertionTest.swift
+11 −2 Tests/NimbleTests/Matchers/ThrowErrorTest.swift
+33 −0 Tests/NimbleTests/SynchronousTest.swift
+5 −0 Tests/NimbleTests/objc/ObjCAsyncTest.m
+1 −1 test
2 changes: 1 addition & 1 deletion Carthage/Checkouts/Quick
Submodule Quick updated 56 files
+2 −2 .gitignore
+9 −5 .travis.yml
+1 −0 Documentation/README.md
+2 −2 Documentation/en-us/ConfiguringQuick.md
+14 −14 Documentation/en-us/NimbleAssertions.md
+1 −1 Documentation/en-us/QuickExamplesAndGroups.md
+75 −0 Documentation/en-us/TestingApps.md
+14 −14 Documentation/ja/NimbleAssertions.md
+1 −1 Documentation/ja/QuickExamplesAndGroups.md
+203 −0 Documentation/ko-kr/ArrangeActAssert.md
+80 −0 Documentation/ko-kr/BehavioralTesting.md
+99 −0 Documentation/ko-kr/ConfiguringQuick.md
+25 −0 Documentation/ko-kr/InstallingFileTemplates.md
+141 −0 Documentation/ko-kr/InstallingQuick.md
+25 −0 Documentation/ko-kr/MoreResources.md
+97 −0 Documentation/ko-kr/NimbleAssertions.md
+462 −0 Documentation/ko-kr/QuickExamplesAndGroups.md
+49 −0 Documentation/ko-kr/QuickInObjectiveC.md
+35 −0 Documentation/ko-kr/README.md
+80 −0 Documentation/ko-kr/SettingUpYourXcodeProject.md
+116 −0 Documentation/ko-kr/SharedExamples.md
+129 −0 Documentation/ko-kr/TestUsingTestDoubles.md
+173 −0 Documentation/ko-kr/TestingApps.md
+10 −0 Documentation/ko-kr/Troubleshooting.md
+12 −12 Documentation/zh-cn/NimbleAssertions.md
+1 −1 Documentation/zh-cn/QuickExamplesAndGroups.md
+1 −1 Externals/Nimble
+1 −1 Gemfile
+40 −36 Gemfile.lock
+16 −0 Package.resolved
+1 −1 Package@swift-4.swift
+6 −2 Quick.podspec
+59 −36 Quick.xcodeproj/project.pbxproj
+1 −3 Quick.xcodeproj/xcshareddata/xcschemes/Quick-iOS.xcscheme
+1 −3 Quick.xcodeproj/xcshareddata/xcschemes/Quick-macOS.xcscheme
+1 −3 Quick.xcodeproj/xcshareddata/xcschemes/Quick-tvOS.xcscheme
+8 −0 Quick.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+5 −0 Rakefile
+1 −1 Sources/Quick/Behavior.swift
+3 −3 Sources/Quick/Configuration/QuickConfiguration.swift
+9 −4 Sources/Quick/DSL/World+DSL.swift
+3 −0 Sources/Quick/Example.swift
+19 −3 Sources/Quick/NSString+C99ExtendedIdentifier.swift
+14 −2 Sources/Quick/QuickSpec.swift
+1 −1 Sources/Quick/World.swift
+6 −1 Sources/QuickObjectiveC/Configuration/QuickConfiguration.m
+6 −2 Sources/QuickObjectiveC/DSL/QCKDSL.m
+0 −20 Sources/QuickObjectiveC/DSL/World+DSL.h
+6 −0 Sources/QuickObjectiveC/QuickSpec.h
+11 −3 Sources/QuickObjectiveC/QuickSpec.m
+0 −18 Sources/QuickObjectiveC/World.h
+5 −0 Sources/QuickObjectiveC/XCTestSuite+QuickTestSuiteBuilder.m
+25 −0 Tests/QuickTests/QuickTests/FunctionalTests/CurrentSpecTests.swift
+0 −1 Tests/QuickTests/QuickTests/Helpers/QCKSpecRunner.m
+7 −1 Tests/QuickTests/QuickTests/Helpers/QuickSpec+QuickSpec_MethodList.h
+5 −13 Tests/QuickTests/QuickTests/Helpers/QuickSpec+QuickSpec_MethodList.m
2 changes: 1 addition & 1 deletion Carthage/Checkouts/ZipArchive
Submodule ZipArchive updated 159 files
2 changes: 1 addition & 1 deletion Carthage/Checkouts/xcconfigs
2 changes: 1 addition & 1 deletion External/libgit2
Submodule libgit2 updated 6582 files
2 changes: 1 addition & 1 deletion External/libssh2
138 changes: 70 additions & 68 deletions ObjectiveGit.modulemap
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ framework module ObjectiveGit {
header "git2/tree.h"
header "git2/types.h"
header "git2/version.h"
header "git2/sys/alloc.h"
header "git2/sys/commit.h"
header "git2/sys/config.h"
header "git2/sys/diff.h"
Expand All @@ -59,6 +60,7 @@ framework module ObjectiveGit {
header "git2/sys/mempack.h"
header "git2/sys/merge.h"
header "git2/sys/odb_backend.h"
header "git2/sys/path.h"
header "git2/sys/refdb_backend.h"
header "git2/sys/reflog.h"
header "git2/sys/refs.h"
Expand All @@ -72,74 +74,74 @@ framework module ObjectiveGit {

exclude header "git2/inttypes.h"
exclude header "git2/stdint.h"
exclude header "git2/sys/git2/annotated_commit.h"
exclude header "git2/sys/git2/attr.h"
exclude header "git2/sys/git2/blame.h"
exclude header "git2/sys/git2/blob.h"
exclude header "git2/sys/git2/branch.h"
exclude header "git2/sys/git2/buffer.h"
exclude header "git2/sys/git2/checkout.h"
exclude header "git2/sys/git2/cherrypick.h"
exclude header "git2/sys/git2/clone.h"
exclude header "git2/sys/git2/commit.h"
exclude header "git2/sys/git2/cred_helpers.h"
exclude header "git2/sys/git2/describe.h"
exclude header "git2/sys/git2/errors.h"
exclude header "git2/sys/git2/global.h"
exclude header "git2/sys/git2/graph.h"
exclude header "git2/sys/git2/ignore.h"
exclude header "git2/sys/git2/index.h"
exclude header "git2/sys/git2/indexer.h"
exclude header "git2/sys/git2/inttypes.h"
exclude header "git2/sys/git2/merge.h"
exclude header "git2/sys/git2/message.h"
exclude header "git2/sys/git2/notes.h"
exclude header "git2/sys/git2/object.h"
exclude header "git2/sys/git2/odb_backend.h"
exclude header "git2/sys/git2/oidarray.h"
exclude header "git2/sys/git2/pack.h"
exclude header "git2/sys/git2/patch.h"
exclude header "git2/sys/git2/pathspec.h"
exclude header "git2/sys/git2/rebase.h"
exclude header "git2/sys/git2/refdb.h"
exclude header "git2/sys/git2/reflog.h"
exclude header "git2/sys/git2/refs.h"
exclude header "git2/sys/git2/refspec.h"
exclude header "git2/sys/git2/remote.h"
exclude header "git2/sys/git2/repository.h"
exclude header "git2/sys/git2/reset.h"
exclude header "git2/sys/git2/revert.h"
exclude header "git2/sys/git2/revparse.h"
exclude header "git2/sys/git2/revwalk.h"
exclude header "git2/sys/git2/signature.h"
exclude header "git2/sys/git2/stash.h"
exclude header "git2/sys/git2/stdint.h"
exclude header "git2/sys/git2/strarray.h"
exclude header "git2/sys/git2/submodule.h"
exclude header "git2/sys/git2/tag.h"
exclude header "git2/sys/git2/trace.h"
exclude header "git2/sys/git2/transaction.h"
exclude header "git2/sys/git2/transport.h"
exclude header "git2/sys/git2/tree.h"
exclude header "git2/sys/git2/version.h"
exclude header "git2/sys/git2/sys/commit.h"
exclude header "git2/sys/git2/sys/config.h"
exclude header "git2/sys/git2/sys/diff.h"
exclude header "git2/sys/git2/sys/filter.h"
exclude header "git2/sys/git2/sys/hashsig.h"
exclude header "git2/sys/git2/sys/index.h"
exclude header "git2/sys/git2/sys/mempack.h"
exclude header "git2/sys/git2/sys/merge.h"
exclude header "git2/sys/git2/sys/odb_backend.h"
exclude header "git2/sys/git2/sys/openssl.h"
exclude header "git2/sys/git2/sys/refdb_backend.h"
exclude header "git2/sys/git2/sys/reflog.h"
exclude header "git2/sys/git2/sys/refs.h"
exclude header "git2/sys/git2/sys/repository.h"
exclude header "git2/sys/git2/sys/stream.h"
exclude header "git2/sys/git2/sys/time.h"
exclude header "git2/sys/git2/sys/transport.h"
exclude header "git2/sys/git2/sys/worktree.h"
exclude header "git2/sys/annotated_commit.h"
exclude header "git2/sys/attr.h"
exclude header "git2/sys/blame.h"
exclude header "git2/sys/blob.h"
exclude header "git2/sys/branch.h"
exclude header "git2/sys/buffer.h"
exclude header "git2/sys/checkout.h"
exclude header "git2/sys/cherrypick.h"
exclude header "git2/sys/clone.h"
exclude header "git2/sys/commit.h"
exclude header "git2/sys/cred_helpers.h"
exclude header "git2/sys/describe.h"
exclude header "git2/sys/errors.h"
exclude header "git2/sys/global.h"
exclude header "git2/sys/graph.h"
exclude header "git2/sys/ignore.h"
exclude header "git2/sys/index.h"
exclude header "git2/sys/indexer.h"
exclude header "git2/sys/inttypes.h"
exclude header "git2/sys/merge.h"
exclude header "git2/sys/message.h"
exclude header "git2/sys/notes.h"
exclude header "git2/sys/object.h"
exclude header "git2/sys/odb_backend.h"
exclude header "git2/sys/oidarray.h"
exclude header "git2/sys/pack.h"
exclude header "git2/sys/patch.h"
exclude header "git2/sys/pathspec.h"
exclude header "git2/sys/rebase.h"
exclude header "git2/sys/refdb.h"
exclude header "git2/sys/reflog.h"
exclude header "git2/sys/refs.h"
exclude header "git2/sys/refspec.h"
exclude header "git2/sys/remote.h"
exclude header "git2/sys/repository.h"
exclude header "git2/sys/reset.h"
exclude header "git2/sys/revert.h"
exclude header "git2/sys/revparse.h"
exclude header "git2/sys/revwalk.h"
exclude header "git2/sys/signature.h"
exclude header "git2/sys/stash.h"
exclude header "git2/sys/stdint.h"
exclude header "git2/sys/strarray.h"
exclude header "git2/sys/submodule.h"
exclude header "git2/sys/tag.h"
exclude header "git2/sys/trace.h"
exclude header "git2/sys/transaction.h"
exclude header "git2/sys/transport.h"
exclude header "git2/sys/tree.h"
exclude header "git2/sys/version.h"
exclude header "git2/sys/commit.h"
exclude header "git2/sys/config.h"
exclude header "git2/sys/diff.h"
exclude header "git2/sys/filter.h"
exclude header "git2/sys/hashsig.h"
exclude header "git2/sys/index.h"
exclude header "git2/sys/mempack.h"
exclude header "git2/sys/merge.h"
exclude header "git2/sys/odb_backend.h"
exclude header "git2/sys/openssl.h"
exclude header "git2/sys/refdb_backend.h"
exclude header "git2/sys/reflog.h"
exclude header "git2/sys/refs.h"
exclude header "git2/sys/repository.h"
exclude header "git2/sys/stream.h"
exclude header "git2/sys/time.h"
exclude header "git2/sys/transport.h"
exclude header "git2/sys/worktree.h"

export *
module * { export * }
Expand Down
2 changes: 1 addition & 1 deletion ObjectiveGit/Categories/NSData+Git.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ - (BOOL)git_getOid:(git_oid *)oid error:(NSError **)error {
if ([self length] != sizeof(git_oid)) {
if (error != NULL) {
*error = [NSError errorWithDomain:GTGitErrorDomain
code:GITERR_INVALID
code:GIT_ERROR_INVALID
userInfo:
[NSDictionary dictionaryWithObject:@"can't extract oid from data of incorrect length"
forKey:NSLocalizedDescriptionKey]];
Expand Down
4 changes: 2 additions & 2 deletions ObjectiveGit/Categories/NSError+Git.m
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ + (NSError *)git_errorFor:(int)code {
}

+ (NSString *)git_descriptionForErrorCode:(int)code {
const git_error *gitLastError = giterr_last();
const git_error *gitLastError = git_error_last();
if (gitLastError != NULL) {
return @(gitLastError->message);
} else if (code == GITERR_OS) {
} else if (code == GIT_ERROR_OS) {
return @(strerror(errno));
} else {
return nil;
Expand Down
4 changes: 3 additions & 1 deletion ObjectiveGit/GTBlameHunk.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ - (GTSignature *)finalSignature {
}

- (NSString *)originalPath {
return @(self.git_blame_hunk.orig_path);
NSString *path = @(self.git_blame_hunk.orig_path);
NSAssert(path, @"string was nil");
return path;
}

- (BOOL)isBoundary {
Expand Down
2 changes: 1 addition & 1 deletion ObjectiveGit/GTBlob.m
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ - (instancetype)initWithOid:(const git_oid *)oid inRepository:(GTRepository *)re
NSParameterAssert(repository != nil);

git_object *obj;
int gitError = git_object_lookup(&obj, repository.git_repository, oid, (git_otype) GTObjectTypeBlob);
int gitError = git_object_lookup(&obj, repository.git_repository, oid, (git_object_t) GTObjectTypeBlob);
if (gitError < GIT_OK) {
if (error != NULL) {
*error = [NSError git_errorFor:gitError description:@"Failed to lookup blob"];
Expand Down
5 changes: 4 additions & 1 deletion ObjectiveGit/GTConfiguration.m
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ - (BOOL)deleteValueForKey:(NSString *)key error:(NSError **)error {
static int configCallback(const git_config_entry *entry, void *payload) {
NSMutableArray *configurationKeysArray = (__bridge NSMutableArray *)payload;

[configurationKeysArray addObject:@(entry->name)];
NSString *name = @(entry->name);
NSCAssert(name, @"string was nil");

[configurationKeysArray addObject:name];

return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions ObjectiveGit/GTCredential.m
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ int GTCredentialAcquireCallback(git_cred **git_cred, const char *url, const char
GTCredentialProvider *provider = info->credProvider;

if (provider == nil) {
giterr_set_str(GIT_EUSER, "No GTCredentialProvider set, but authentication was requested.");
git_error_set_str(GIT_EUSER, "No GTCredentialProvider set, but authentication was requested.");
return GIT_ERROR;
}

Expand All @@ -114,7 +114,7 @@ int GTCredentialAcquireCallback(git_cred **git_cred, const char *url, const char

GTCredential *cred = [provider credentialForType:(GTCredentialType)allowed_types URL:URL userName:userName];
if (cred == nil) {
giterr_set_str(GIT_EUSER, "GTCredentialProvider failed to provide credentials.");
git_error_set_str(GIT_EUSER, "GTCredentialProvider failed to provide credentials.");
return GIT_ERROR;
}

Expand Down
5 changes: 3 additions & 2 deletions ObjectiveGit/GTDiffFile.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ - (instancetype)initWithGitDiffFile:(git_diff_file)file {
self = [super init];
if (self == nil) return nil;

_path = @(file.path);
if (_path == nil) return nil;
NSString *path = @(file.path);
if (path == nil) return nil;
_path = path;

_git_diff_file = file;
_size = (NSUInteger)file.size;
Expand Down
2 changes: 1 addition & 1 deletion ObjectiveGit/GTDiffPatch.m
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ - (NSData *)patchData {
git_patch_to_buf(&buf, self.git_patch);

NSData *buffer = [[NSData alloc] initWithBytes:buf.ptr length:buf.size];
git_buf_free(&buf);
git_buf_dispose(&buf);

return buffer;
}
Expand Down
11 changes: 7 additions & 4 deletions ObjectiveGit/GTFilterSource.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,13 @@ - (instancetype)initWithGitFilterSource:(const git_filter_source *)source {
self = [super init];
if (self == nil) return nil;

const char *path = git_repository_workdir(git_filter_source_repo(source));
_repositoryURL = [NSURL fileURLWithPath:@(path)];

_path = @(git_filter_source_path(source));
NSString *path = @(git_repository_workdir(git_filter_source_repo(source)));
NSAssert(path, @"workdir was nil");
_repositoryURL = [NSURL fileURLWithPath:path];

path = @(git_filter_source_path(source));
NSAssert(path, @"path was nil");
_path = path;

const git_oid *gitOid = git_filter_source_id(source);
if (gitOid != NULL) _OID = [[GTOID alloc] initWithGitOid:gitOid];
Expand Down
6 changes: 4 additions & 2 deletions ObjectiveGit/GTIndexEntry.m
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ - (instancetype)initWithGitIndexEntry:(const git_index_entry *)entry {
#pragma mark Properties

- (NSString *)path {
return @(self.git_index_entry->path);
NSString *path = @(self.git_index_entry->path);
NSAssert(path, @"path is nil");
return path;
}

- (int)flags {
Expand Down Expand Up @@ -125,7 +127,7 @@ + (instancetype)objectWithIndexEntry:(GTIndexEntry *)indexEntry error:(NSError *

- (instancetype)initWithIndexEntry:(GTIndexEntry *)indexEntry error:(NSError **)error {
git_object *obj;
int gitError = git_object_lookup(&obj, indexEntry.repository.git_repository, indexEntry.OID.git_oid, (git_otype)GTObjectTypeAny);
int gitError = git_object_lookup(&obj, indexEntry.repository.git_repository, indexEntry.OID.git_oid, (git_object_t)GTObjectTypeAny);

if (gitError < GIT_OK) {
if (error != NULL) {
Expand Down
6 changes: 4 additions & 2 deletions ObjectiveGit/GTNote.m
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ - (git_note *)git_note {
}

- (NSString *)note {
return @(git_note_message(self.git_note));
NSString *message = @(git_note_message(self.git_note));
NSAssert(message, @"message is nil");
return message;
}

- (GTSignature *)author {
Expand Down Expand Up @@ -96,7 +98,7 @@ + (NSString *)defaultReferenceNameForRepository:(GTRepository *)repository error
if (error != NULL) *error = [NSError git_errorFor:GIT_ERROR description:@"Unable to get default git notes reference name"];
}

git_buf_free(&default_ref_name);
git_buf_dispose(&default_ref_name);

return noteRef;
}
Expand Down
2 changes: 1 addition & 1 deletion ObjectiveGit/GTOID.m
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ + (instancetype)OIDByHashingData:(NSData *)data type:(GTObjectType)type error:(N
NSParameterAssert(data != nil);

git_oid oid;
int gitError = git_odb_hash(&oid, data.bytes, data.length, (git_otype)type);
int gitError = git_odb_hash(&oid, data.bytes, data.length, (git_object_t)type);
if (gitError != GIT_OK) {
if (error != NULL) *error = [NSError git_errorFor:gitError description:@"Failed to hash"];
return nil;
Expand Down
Loading