diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2017-11-17 00:19:07 +0000 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2018-06-29 14:54:28 +0100 |
| commit | b242cdbf1e1dd2cc9e26e0085a20230ff34d156b (patch) | |
| tree | 477b5d83b340080204f7d1f80e1e27c14c229804 /tests/rebase | |
| parent | dc4a18c7455e1696b2056a02f934e1f7ac80d940 (diff) | |
| download | libgit2-b242cdbf1e1dd2cc9e26e0085a20230ff34d156b.tar.gz | |
index: commit the changes to the index properly
Now that the index has a "dirty" state, where it has changes that have
not yet been committed or rolled back, our tests need to be adapted to
actually commit or rollback the changes instead of assuming that the
index can be operated on in its indeterminate state.
Diffstat (limited to 'tests/rebase')
| -rw-r--r-- | tests/rebase/submodule.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/rebase/submodule.c b/tests/rebase/submodule.c index 7e27d7c9d..f71b94f7f 100644 --- a/tests/rebase/submodule.c +++ b/tests/rebase/submodule.c @@ -33,8 +33,9 @@ void test_rebase_submodule__initialize(void) /* We have to commit the rewritten .gitmodules file */ cl_git_pass(git_repository_index(&index, repo)); cl_git_pass(git_index_add_bypath(index, ".gitmodules")); - cl_git_pass(git_index_write_tree(&tree_oid, index)); + cl_git_pass(git_index_write(index)); + cl_git_pass(git_index_write_tree(&tree_oid, index)); cl_git_pass(git_tree_lookup(&tree, repo, &tree_oid)); cl_git_pass(git_repository_head(&master_ref, repo)); |
