-
Notifications
You must be signed in to change notification settings - Fork 78
Closed
Description
I tried to compile php-git with latest git clone of libgit2, and it worked except for:
/home/james/workspace/php-git/src/reference_manager.c:246: error: too few arguments to function ‘git_reference_create_oid’
I had a quick dig around and it turns out in libgit2 a parameter has been added.
diff --git a/src/reference_manager.c b/src/reference_manager.c
index 2786998..beec6ce 100644
--- a/src/reference_manager.c
+++ b/src/reference_manager.c
@@ -243,7 +243,7 @@ PHP_METHOD(git_reference_manager, create)
}
git_reference *reference;
- int ret = git_reference_create_oid(&reference, this->repository, name, &id);
+ int ret = git_reference_create_oid(&reference, this->repository, name, &id, 0);
if(ret != GIT_SUCCESS){
zend_throw_exception_ex(spl_ce_InvalidArgumentException, 0 TSRMLS_CC,
"can't add reference");
This seemed to work and I got the php-git-sample app working - however I'm not experienced enough to know whether this "force" value should be 1 or 0...
Metadata
Metadata
Assignees
Labels
No labels