Skip to content

Commit

Permalink
Merge branch 'master' of github.com:libgit2/objective-git
Browse files Browse the repository at this point in the history
  • Loading branch information
joshaber committed May 1, 2012
2 parents d79cea5 + d633d70 commit f2bdd0e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Classes/GTIndexEntry.m
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ - (void)dealloc {
@synthesize repository;

+ (id)indexEntryWithEntry:(git_index_entry *)theEntry {
if (theEntry == NULL)
return nil;

return [[self alloc] initWithEntry:theEntry];
}

Expand All @@ -73,8 +76,11 @@ - (id)init {

- (id)initWithEntry:(git_index_entry *)theEntry {
if((self = [self init])) {
git_index_entry *thisEntry = self.git_index_entry;
memcpy(thisEntry, theEntry, sizeof(git_index_entry));
if (theEntry)
{
git_index_entry *thisEntry = self.git_index_entry;
memcpy(thisEntry, theEntry, sizeof(git_index_entry));
}
}
return self;
}
Expand Down

0 comments on commit f2bdd0e

Please sign in to comment.