mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-29 08:11:58 +00:00
rebase::abort: test we can abort rebase by revspec
Test that we can properly abort a rebase when it is initialized by a revspec. This ensures that we do not conflate revspecs and refnames.
This commit is contained in:
parent
cb2dfa46c8
commit
b3ffd8f638
@ -145,6 +145,25 @@ void test_rebase_abort__merge_by_id(void)
|
||||
git_rebase_free(rebase);
|
||||
}
|
||||
|
||||
void test_rebase_abort__merge_by_revspec(void)
|
||||
{
|
||||
git_rebase *rebase;
|
||||
git_annotated_commit *branch_head, *onto_head;
|
||||
|
||||
cl_git_pass(git_annotated_commit_from_revspec(&branch_head, repo, "b146bd7"));
|
||||
cl_git_pass(git_annotated_commit_from_revspec(&onto_head, repo, "efad0b1"));
|
||||
|
||||
cl_git_pass(git_rebase_init(&rebase, repo, branch_head, NULL, onto_head, NULL));
|
||||
cl_assert_equal_i(GIT_REPOSITORY_STATE_REBASE_MERGE, git_repository_state(repo));
|
||||
|
||||
test_abort(branch_head, onto_head);
|
||||
|
||||
git_annotated_commit_free(branch_head);
|
||||
git_annotated_commit_free(onto_head);
|
||||
|
||||
git_rebase_free(rebase);
|
||||
}
|
||||
|
||||
void test_rebase_abort__merge_by_id_immediately_after_init(void)
|
||||
{
|
||||
git_rebase *rebase;
|
||||
|
Loading…
Reference in New Issue
Block a user