Questions tagged [objective-git]

An Objective-C framework that provides bindings to libgit2 library.

libgit2 is a portable, pure C implementation of the Git core methods provided as a re-entrant linkable library.

ObjectiveGit wraps libgit2 features, in a developer friendly way, to OS X and iOS platforms.

16 questions
4
votes
1 answer

libgit2: Finding all commits between two tags?

I was wondering how to find all commits between two tags in Git using the C-API? I know this can easily be done with the CLI tool: git log [first commit]..[second commit ] --pretty=oneline However, I can't seem to figure out how to do it with the C…
jaredjones
  • 137
  • 1
  • 2
  • 6
4
votes
0 answers

Where is ObjectiveGit documentation

I am wondering where is ObjectiveGit Documentation. I checked the project on github (https://github.com/libgit2/objective-git) but couldn't find it there. What am I missing? Thanks
2
votes
1 answer

Can I have an in-memory git repository for unit-testing with libgit2 / ObjectiveGit?

I work on an Objective-C, Cocoa project with libgit2 and it's ObjectiveGit bindings. In order to set up fast and clean unit tests, it would be nice to have an in-memory repository. Is this possible?
MartinW
  • 4,966
  • 2
  • 24
  • 60
2
votes
1 answer

Swift with objective-git: Overloads for 'createCommitWithTree' exist with these partially matching parameter lists

I am using objective-git with Swift and cannot compile the GTRepository.createCommitWithTree method. The method can optionally be called without author : GTSignature and committer : GTSignature parameters. I'm new to Swift and overloading functions.…
almccann
  • 389
  • 3
  • 13
1
vote
1 answer

In libgit2, what do the git_index_entry->flags_extended mean (and when are they set)?

I am attempting to manage a repository's index vs. its HEAD tree using libgit2 (via Objective-Git, but I'm increasingly finding myself heading down the vanilla libgit2 rabbit hole), and am wondering what exactly the flags_extended field's bitmasks…
One Crayon
  • 19,119
  • 11
  • 33
  • 40
1
vote
1 answer

XCode Build Failure - aclocal [/share] files missing

I'm trying to build an XCode project, and am getting the following error when trying to build: ... Building for x86_64 i386 armv7 armv7s arm64 Building libssh2 for iphonesimulator7.1 x86_64 Please stand…
Jordan Foreman
  • 3,848
  • 7
  • 40
  • 65
1
vote
1 answer

Objective-Git Merge

I am using Objective-Git. I cannot get the following method to work: - (GTIndex *)merge:(GTTree *)otherTree ancestor:(GTTree *)ancestorTree error:(NSError **)error No error is returned, but the index returned is empty, while it exists, all…
Coxy1989
  • 160
  • 1
  • 6
1
vote
1 answer

Creating Repository with Objective-Git

I am trying to create a Git repository using objective-git. The documentation is somewhat lacking on how the GT classes work together to create a repository so I'm kind of stuck. This is what I have working so far: GTRepository *newRepo =…
Patrick Goley
  • 5,397
  • 22
  • 42
1
vote
1 answer

How to get list of files in repository in libgit/objective-git?

I want to get the list of files in a Git repository using objective-git, or libgit2 What I am doing now is calling the git command-line tool and parsing the output of git ls-files (or git ls-tree --name-only -r HEAD, which gives the same results),…
Yang Meyer
  • 5,409
  • 5
  • 39
  • 51
0
votes
1 answer

How to get file content with Objective-git from some specific commit?

Im using this code to get file content of commit: GTBlob *blob = [repo lookUpObjectBySHA:@"d39a07ef51533a32da4bf0474462a71a40dc59e4" objectType:GTObjectTypeBlob error:NULL]; NSLog(@"Blob: %@",[blob content]); where SHA - some specific…
Alex
  • 36
  • 4
0
votes
0 answers

ObjectiveGit - Resolving file conflicts with -[GTIndex enumerateConflictedFilesWithError:usingBlock:]

In ObjectiveGit (which is an objective c wrapper of libgit2), when I have a file conflict that is not automatically resolved (this usually means that I have a local commit and remote commit that both changed the same line of a file), then I can…
Jeffrey Bergier
  • 229
  • 1
  • 8
0
votes
1 answer

git_revwalk ignores order of pushed refs?

In using git_revwalk (through Objective-Git's GTEnumerator), I'm trying to get more recently updated branches ordered first. I'm calling gt_revwalk_push with refs sorted by commit date, but it has no effect. Sorted, reverse sorted, and unsorted all…
Uncommon
  • 3,323
  • 2
  • 18
  • 36
0
votes
2 answers

How to "unstage" a file with Objective-Git (libgit2)?

I am writing an app that allows performing basic git operations using Objective-Git, but I am having trouble figuring out how to "unstage" a file. More specifically, I have a file with changes that have previously been added to the current GTIndex…
One Crayon
  • 19,119
  • 11
  • 33
  • 40
0
votes
2 answers

Include libgit2 in RubyMotion

I am trying to get objective-git included as ruby motion. I tried my best to translate the requirements on objective gits site into what is needed for an OS X ruby motion app. Here is the Rakefile, objective-git is a submodule located in vendor. #…
Jason Waldrip
  • 5,038
  • 8
  • 36
  • 59
0
votes
1 answer

Un-stage file with libgit2

Using objective-git and libgit2 it has been fairly easy to stage a file ready for commit: GTIndex *repoIndex = [self.repository indexWithError:&error]; [repoIndex removeFile:path error:&error]; if (status != GTFileStatusIgnored && status !=…
Joshua
  • 15,200
  • 21
  • 100
  • 172
1
2