Comments (3)
I have made a fix for this but not made a pull request yet as I'm not sure whether force should be 1 or 0 yet. on a branch: https://github.com/Asgrim/php-git/tree/fix-git_reference_create_oid-signature-bug
Commit: Asgrim/php-git@9528478a1130b537f51f30b1ae482cecf5a39f78
from php-git.
Hi James, thank you for suggesting me.
when it specified 0, git_reference_create_oid will return some sort of error when specified reference has already registered.
otherwise, force create a reference.
so, we should change that signature like following sample.
ZEND_BEGIN_ARG_INFO_EX(arginfo_git_reference_manager_create, 0, 0, 2)
ZEND_ARG_INFO(0, name)
ZEND_ARG_INFO(0, oid)
ZEND_ARG_INFO(0, force)
ZEND_END_ARG_INFO()
PHP_METHOD(git_reference_manager, create)
{
php_git_reference_manager_t *this = (php_git_reference_manager_t *) zend_object_store_get_object(getThis() TSRMLS_CC);
char *name;
int name_len = 0;
char *oid;
int oid_len = 0;
git_oid id;
int force = 0;
if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
"ssl", &name, &name_len, &oid, &oid_len, &force) == FAILURE){
return;
}
//...
anyway, i'll look for your commit and libgit2 changes when i came back home (AM8 in Japan, right now).
please send pull request me.
thanks,
Shuhei
from php-git.
Pull request made in #12 !
from php-git.
Related Issues (20)
- this project will update? HOT 2
- error on make: make: *** [reference.lo] Error 1 HOT 8
- PHP extension is not loaded HOT 6
- git_tree_lookup - The requested type does not match the type in the ODB HOT 2
- README instructions for compiling HOT 2
- Version bump to 0.3.0 ?
- Getting php-git up to date HOT 8
- Automated make test failed submission HOT 1
- [run-test.php report]
- How can I stage lines and hunks?
- HELP: Cannot run any of the PHP Git related commands! HOT 2
- Cmake File Error
- Undefined function git_branch_name() HOT 1
- Calling git_treebuilder_create causes seg fault
- git_remote_connect returns false
- working on PHP7 version of php-git HOT 2
- Unable to load dynamic library - http_errno_description is Unknown
- Bindings updated to a recent version libgit2?
- git_clone Segmentation fault
- PHP 8 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-git.