File tree 2 files changed +4
-29
lines changed
2 files changed +4
-29
lines changed Original file line number Diff line number Diff line change @@ -86,35 +86,10 @@ MergeResult_fastforward_oid__get__(MergeResult *self)
86
86
else Py_RETURN_NONE ;
87
87
}
88
88
89
- PyDoc_STRVAR (MergeResult_index__doc__ , "Merge repository index" );
90
-
91
- PyObject *
92
- MergeResult_index__get__ (MergeResult * self )
93
- {
94
- git_index * index ;
95
- Index * py_index ;
96
- int err ;
97
-
98
- err = git_repository_index (& index , self -> repo -> repo );
99
- if (err < 0 )
100
- return NULL ;
101
-
102
- py_index = PyObject_GC_New (Index , & IndexType );
103
- if (!py_index ) {
104
- return NULL ;
105
- }
106
-
107
- py_index -> repo = self -> repo ;
108
- py_index -> index = index ;
109
- Py_INCREF (py_index );
110
- return (PyObject * ) py_index ;
111
- }
112
-
113
89
PyGetSetDef MergeResult_getseters [] = {
114
90
GETTER (MergeResult , is_uptodate ),
115
91
GETTER (MergeResult , is_fastforward ),
116
92
GETTER (MergeResult , fastforward_oid ),
117
- GETTER (MergeResult , index ),
118
93
{NULL },
119
94
};
120
95
Original file line number Diff line number Diff line change @@ -339,8 +339,8 @@ def test_merge_no_fastforward_no_conflicts(self):
339
339
self .assertEquals ({'bye.txt' : 1 }, self .repo .status ())
340
340
self .assertEquals ({'bye.txt' : 1 }, self .repo .status ())
341
341
# Checking the index works as expected
342
- merge_result .index .remove ('bye.txt' )
343
- merge_result .index .write ()
342
+ self . repo .index .remove ('bye.txt' )
343
+ self . repo .index .write ()
344
344
self .assertEquals ({'bye.txt' : 128 }, self .repo .status ())
345
345
346
346
def test_merge_no_fastforward_conflicts (self ):
@@ -355,8 +355,8 @@ def test_merge_no_fastforward_conflicts(self):
355
355
self .assertEquals ({'.gitignore' : 132 }, self .repo .status ())
356
356
self .assertEquals ({'.gitignore' : 132 }, self .repo .status ())
357
357
# Checking the index works as expected
358
- merge_result .index .add ('.gitignore' )
359
- merge_result .index .write ()
358
+ self . repo .index .add ('.gitignore' )
359
+ self . repo .index .write ()
360
360
self .assertEquals ({'.gitignore' : 2 }, self .repo .status ())
361
361
362
362
def test_merge_invalid_hex (self ):
You can’t perform that action at this time.
0 commit comments