Skip to content

Commit 630737f

Browse files
committed
Merge remote-tracking branch 'origin/master' into xcode6
2 parents d53cf34 + 4f47bdc commit 630737f

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

External/libgit2

Submodule libgit2 updated 181 files

ObjectiveGit/GTRepository+RemoteOperations.m

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,18 @@ - (BOOL)fetchRemote:(GTRemote *)remote withOptions:(NSDictionary *)options error
6767
return NO;
6868
}
6969

70-
gitError = git_remote_fetch(remote.git_remote, self.userSignatureForNow.git_signature, NULL);
70+
__block git_strarray refspecs;
71+
gitError = git_remote_get_fetch_refspecs(&refspecs, remote.git_remote);
72+
if (gitError != GIT_OK) {
73+
if (error != NULL) *error = [NSError git_errorFor:gitError description:@"Failed to get fetch refspecs for remote"];
74+
return NO;
75+
}
76+
77+
@onExit {
78+
git_strarray_free(&refspecs);
79+
};
80+
81+
gitError = git_remote_fetch(remote.git_remote, &refspecs, self.userSignatureForNow.git_signature, NULL);
7182
if (gitError != GIT_OK) {
7283
if (error != NULL) *error = [NSError git_errorFor:gitError description:@"Failed to fetch from remote"];
7384
return NO;

ObjectiveGit/GTRepository+Reset.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ @implementation GTRepository (Reset)
1717
- (BOOL)resetToCommit:(GTCommit *)commit resetType:(GTRepositoryResetType)resetType error:(NSError **)error {
1818
NSParameterAssert(commit != nil);
1919

20-
int gitError = git_reset(self.git_repository, commit.git_object, (git_reset_t)resetType, (git_signature *)[self userSignatureForNow].git_signature, NULL);
20+
git_checkout_options options = GIT_CHECKOUT_OPTIONS_INIT;
21+
int gitError = git_reset(self.git_repository, commit.git_object, (git_reset_t)resetType, &options, (git_signature *)[self userSignatureForNow].git_signature, NULL);
2122
if (gitError != GIT_OK) {
2223
if (error != NULL) {
2324
*error = [NSError git_errorFor:gitError description:@"Failed to reset repository to commit %@.", commit.SHA];

0 commit comments

Comments
 (0)