@@ -88,7 +88,7 @@ PHP_METHOD(git2_remote, __construct)
8888/* }}} */
8989
9090
91- static int php_git2_rename_packfile (char * packname , git_indexer * idx )
91+ static int php_git2_rename_packfile (char * packname , git_indexer_stream * idx )
9292{
9393 char path [GIT_PATH_MAX ], oid [GIT_OID_HEXSZ + 1 ], * slash ;
9494 int ret ;
@@ -101,7 +101,7 @@ static int php_git2_rename_packfile(char *packname, git_indexer *idx)
101101 }
102102
103103 memset (oid , 0x0 , sizeof (oid ));
104- git_oid_fmt (oid , git_indexer_hash (idx ));
104+ git_oid_fmt (oid , git_indexer_stream_hash (idx ));
105105 ret = sprintf (slash + 1 , "pack-%s.pack" , oid );
106106 if (ret < 0 ) {
107107 return -2 ;
@@ -124,7 +124,7 @@ static int show_ref__cb(git_remote_head *head, void *payload)
124124PHP_METHOD (git2_remote , fetch )
125125{
126126 php_git2_remote * m_remote ;
127- git_indexer * idx = NULL ;
127+ git_indexer_stream * idx = NULL ;
128128 git_transfer_progress stats ;
129129 char * packname = NULL ;
130130 int error = 0 ;
@@ -138,31 +138,31 @@ PHP_METHOD(git2_remote, fetch)
138138 return;
139139 }
140140*/
141- direction = GIT_DIR_FETCH ;
141+ direction = GIT_DIRECTION_FETCH ;
142142
143143 error = git_remote_connect (m_remote -> remote , direction );
144144 error = git_remote_ls (m_remote -> remote , & show_ref__cb , NULL );
145145 //error = git_remote_download(&packname, m_remote->remote);
146146
147- if (packname != NULL ) {
147+ /* if (packname != NULL) {
148148 // Create a new instance indexer
149- error = git_indexer_new (& idx , packname );
149+ error = git_indexer_stream_new (&idx, packname);
150150 PHP_GIT2_EXCEPTION_CHECK(error);
151151
152- error = git_indexer_run (idx , & stats );
152+ error = git_indexer_stream_run (idx, &stats);
153153 PHP_GIT2_EXCEPTION_CHECK(error);
154154
155- error = git_indexer_write (idx );
155+ error = git_indexer_stream_write (idx);
156156 PHP_GIT2_EXCEPTION_CHECK(error);
157157
158158 error = php_git2_rename_packfile(packname, idx);
159159 PHP_GIT2_EXCEPTION_CHECK(error);
160- }
160+ }*/
161161
162162 //error = git_remote_update_tips(m_remote->remote);
163163 PHP_GIT2_EXCEPTION_CHECK (error );
164164
165- free (packname );
165+ // free(packname);
166166 git_indexer_free (idx );
167167}
168168/* }}} */
0 commit comments