Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Germishuys <jacquesg@striata.com>2014-04-07 19:32:23 +0400
committerJacques Germishuys <jacquesg@striata.com>2014-04-07 19:35:28 +0400
commitc031129510a4bfaef9b2563de3a8ae82d04f5b6c (patch)
treee83d34df51e52f225be7357f3f43844aade6f54e /tests/repo
parent6720eef938d7614cd7a9fd2138a27da3667d62cf (diff)
git_repository_state_cleanup() should remove rebase-merge/, rebase-apply/ and BISECT_LOG
Diffstat (limited to 'tests/repo')
-rw-r--r--tests/repo/state.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/repo/state.c b/tests/repo/state.c
index 5e7227205..2d6c780ee 100644
--- a/tests/repo/state.c
+++ b/tests/repo/state.c
@@ -45,52 +45,70 @@ void test_repo_state__merge(void)
{
setup_simple_state(GIT_MERGE_HEAD_FILE);
assert_repo_state(GIT_REPOSITORY_STATE_MERGE);
+ cl_git_pass(git_repository_state_cleanup(_repo));
+ assert_repo_state(GIT_REPOSITORY_STATE_NONE);
}
void test_repo_state__revert(void)
{
setup_simple_state(GIT_REVERT_HEAD_FILE);
assert_repo_state(GIT_REPOSITORY_STATE_REVERT);
+ cl_git_pass(git_repository_state_cleanup(_repo));
+ assert_repo_state(GIT_REPOSITORY_STATE_NONE);
}
void test_repo_state__cherry_pick(void)
{
setup_simple_state(GIT_CHERRY_PICK_HEAD_FILE);
assert_repo_state(GIT_REPOSITORY_STATE_CHERRY_PICK);
+ cl_git_pass(git_repository_state_cleanup(_repo));
+ assert_repo_state(GIT_REPOSITORY_STATE_NONE);
}
void test_repo_state__bisect(void)
{
setup_simple_state(GIT_BISECT_LOG_FILE);
assert_repo_state(GIT_REPOSITORY_STATE_BISECT);
+ cl_git_pass(git_repository_state_cleanup(_repo));
+ assert_repo_state(GIT_REPOSITORY_STATE_NONE);
}
void test_repo_state__rebase_interactive(void)
{
setup_simple_state(GIT_REBASE_MERGE_INTERACTIVE_FILE);
assert_repo_state(GIT_REPOSITORY_STATE_REBASE_INTERACTIVE);
+ cl_git_pass(git_repository_state_cleanup(_repo));
+ assert_repo_state(GIT_REPOSITORY_STATE_NONE);
}
void test_repo_state__rebase_merge(void)
{
setup_simple_state(GIT_REBASE_MERGE_DIR "whatever");
assert_repo_state(GIT_REPOSITORY_STATE_REBASE_MERGE);
+ cl_git_pass(git_repository_state_cleanup(_repo));
+ assert_repo_state(GIT_REPOSITORY_STATE_NONE);
}
void test_repo_state__rebase(void)
{
setup_simple_state(GIT_REBASE_APPLY_REBASING_FILE);
assert_repo_state(GIT_REPOSITORY_STATE_REBASE);
+ cl_git_pass(git_repository_state_cleanup(_repo));
+ assert_repo_state(GIT_REPOSITORY_STATE_NONE);
}
void test_repo_state__apply_mailbox(void)
{
setup_simple_state(GIT_REBASE_APPLY_APPLYING_FILE);
assert_repo_state(GIT_REPOSITORY_STATE_APPLY_MAILBOX);
+ cl_git_pass(git_repository_state_cleanup(_repo));
+ assert_repo_state(GIT_REPOSITORY_STATE_NONE);
}
void test_repo_state__apply_mailbox_or_rebase(void)
{
setup_simple_state(GIT_REBASE_APPLY_DIR "whatever");
assert_repo_state(GIT_REPOSITORY_STATE_APPLY_MAILBOX_OR_REBASE);
+ cl_git_pass(git_repository_state_cleanup(_repo));
+ assert_repo_state(GIT_REPOSITORY_STATE_NONE);
}