@@ -672,12 +672,9 @@ void test_checkout_tree__can_cancel_checkout_from_notify(void)
672672 git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT ;
673673 git_oid oid ;
674674 git_object * obj = NULL ;
675- git_index * index = NULL ;
676675
677676 assert_on_branch (g_repo , "master" );
678677
679- cl_git_pass (git_repository_index (& index , g_repo ));
680-
681678 cl_git_pass (git_reference_name_to_id (& oid , g_repo , "refs/heads/dir" ));
682679 cl_git_pass (git_object_lookup (& obj , g_repo , & oid , GIT_OBJ_ANY ));
683680
@@ -704,8 +701,6 @@ void test_checkout_tree__can_cancel_checkout_from_notify(void)
704701 else
705702 cl_assert_equal_i (4 , ca .count );
706703
707- cl_git_pass (git_index_read (index , 1 ));
708-
709704 /* and again with a different stopping point and return code */
710705 ca .filename = "README" ;
711706 ca .error = 123 ;
@@ -721,7 +716,6 @@ void test_checkout_tree__can_cancel_checkout_from_notify(void)
721716 cl_assert_equal_i (1 , ca .count );
722717
723718 git_object_free (obj );
724- git_index_free (index );
725719}
726720
727721void test_checkout_tree__can_checkout_with_last_workdir_item_missing (void )
@@ -1502,11 +1496,9 @@ void test_checkout_tree__baseline_is_empty_when_no_index(void)
15021496 git_reference * head ;
15031497 git_object * obj ;
15041498 size_t conflicts = 0 ;
1505- git_index * index ;
15061499
15071500 assert_on_branch (g_repo , "master" );
15081501
1509- cl_git_pass (git_repository_index (& index , g_repo ));
15101502 cl_git_pass (git_repository_head (& head , g_repo ));
15111503 cl_git_pass (git_reference_peel (& obj , head , GIT_OBJ_COMMIT ));
15121504
@@ -1525,8 +1517,6 @@ void test_checkout_tree__baseline_is_empty_when_no_index(void)
15251517 cl_git_fail_with (GIT_ECONFLICT , git_checkout_tree (g_repo , obj , & opts ));
15261518 cl_assert_equal_i (4 , conflicts );
15271519
1528- cl_git_pass (git_index_read (index , 1 ));
1529-
15301520 /* but force should succeed and update the index */
15311521 opts .checkout_strategy |= GIT_CHECKOUT_FORCE ;
15321522 cl_git_pass (git_checkout_tree (g_repo , obj , & opts ));
@@ -1535,7 +1525,6 @@ void test_checkout_tree__baseline_is_empty_when_no_index(void)
15351525
15361526 git_object_free (obj );
15371527 git_reference_free (head );
1538- git_index_free (index );
15391528}
15401529
15411530void test_checkout_tree__mode_change_is_force_updated (void )
0 commit comments