@@ -1357,74 +1357,6 @@ Repository_init_submodules(Repository* self, PyObject *args, PyObject *kwds)
1357
1357
Py_RETURN_NONE ;
1358
1358
}
1359
1359
1360
- PyDoc_STRVAR (Repository_update_submodules__doc__ ,
1361
- "update_submodules(submodules=None, init=False)\n"
1362
- "\n"
1363
- "Updates the specified submodules, or all if None are specified\n"
1364
- "init: Flag indicating if submodules should be automatically initialized if necessary.\n" );
1365
-
1366
- static int foreach_sub_update_cb (git_submodule * submodule , const char * name , void * payload )
1367
- {
1368
- git_submodule_update_options opts = GIT_SUBMODULE_UPDATE_OPTIONS_INIT ;
1369
- return git_submodule_update (submodule , * (int * )payload , & opts );
1370
- }
1371
-
1372
- PyObject *
1373
- Repository_update_submodules (Repository * self , PyObject * args , PyObject * kwds )
1374
- {
1375
- PyObject * list = Py_None ;
1376
- PyObject * py_init = Py_False ;
1377
- PyObject * iter , * next , * subpath ;
1378
- int init , err ;
1379
- const char * c_subpath ;
1380
- git_submodule * submodule ;
1381
- git_submodule_update_options opts = GIT_SUBMODULE_UPDATE_OPTIONS_INIT ;
1382
-
1383
- char * kwlist [] = {"submodules" , "init" , NULL };
1384
-
1385
- if (!PyArg_ParseTupleAndKeywords (args , kwds , "|OO" , kwlist , & list , & py_init ))
1386
- return NULL ;
1387
-
1388
- init = PyObject_IsTrue (py_init );
1389
-
1390
- if (init != 0 && init != 1 )
1391
- init = 0 ;
1392
-
1393
- if (list == Py_None ) {
1394
- err = git_submodule_foreach (self -> repo , foreach_sub_update_cb , & init );
1395
- if (err != 0 )
1396
- return Error_set (err );
1397
- Py_RETURN_NONE ;
1398
- }
1399
-
1400
- iter = PyObject_GetIter (list );
1401
- if (!iter )
1402
- return NULL ;
1403
-
1404
- while (1 ) {
1405
- next = PyIter_Next (iter );
1406
- if (!next )
1407
- break ;
1408
-
1409
- c_subpath = py_str_borrow_c_str (& subpath , next , NULL );
1410
-
1411
- git_submodule_lookup (& submodule , self -> repo , c_subpath );
1412
- Py_DECREF (subpath );
1413
- if (!submodule ) {
1414
- PyErr_SetString (PyExc_KeyError ,
1415
- "Submodule does not exist" );
1416
- return NULL ;
1417
- }
1418
-
1419
- err = git_submodule_update (submodule , init , & opts );
1420
- if (err != 0 ) {
1421
- return Error_set (err );
1422
- }
1423
- }
1424
-
1425
- Py_RETURN_NONE ;
1426
- }
1427
-
1428
1360
PyDoc_STRVAR (Repository_lookup_reference__doc__ ,
1429
1361
"lookup_reference(name) -> Reference\n"
1430
1362
"\n"
@@ -1879,7 +1811,6 @@ PyMethodDef Repository_methods[] = {
1879
1811
METHOD (Repository , listall_reference_objects , METH_NOARGS ),
1880
1812
METHOD (Repository , listall_submodules , METH_NOARGS ),
1881
1813
METHOD (Repository , init_submodules , METH_VARARGS | METH_KEYWORDS ),
1882
- METHOD (Repository , update_submodules , METH_VARARGS | METH_KEYWORDS ),
1883
1814
METHOD (Repository , lookup_reference , METH_O ),
1884
1815
METHOD (Repository , revparse_single , METH_O ),
1885
1816
METHOD (Repository , status , METH_NOARGS ),
0 commit comments