mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-21 22:21:37 +00:00
parent
b31b236004
commit
c11c08a552
@ -231,10 +231,13 @@ static int revwalk_next_timesort(git_commit_list_node **object_out, git_revwalk
|
|||||||
{
|
{
|
||||||
git_commit_list_node *next;
|
git_commit_list_node *next;
|
||||||
|
|
||||||
if ((next = git_pqueue_pop(&walk->iterator_time)) != NULL) {
|
while ((next = git_pqueue_pop(&walk->iterator_time)) != NULL) {
|
||||||
|
/* Some commits might become uninteresting after being added to the list */
|
||||||
|
if (!next->uninteresting) {
|
||||||
*object_out = next;
|
*object_out = next;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
giterr_clear();
|
giterr_clear();
|
||||||
return GIT_ITEROVER;
|
return GIT_ITEROVER;
|
||||||
|
@ -345,6 +345,26 @@ void test_revwalk_basic__topo_crash(void)
|
|||||||
git_revwalk_next(&oid, _walk);
|
git_revwalk_next(&oid, _walk);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void test_revwalk_basic__from_new_to_old(void)
|
||||||
|
{
|
||||||
|
git_oid from_oid, to_oid, oid;
|
||||||
|
int i = 0;
|
||||||
|
|
||||||
|
revwalk_basic_setup_walk(NULL);
|
||||||
|
git_revwalk_sorting(_walk, GIT_SORT_TIME);
|
||||||
|
|
||||||
|
cl_git_pass(git_oid_fromstr(&to_oid, "5b5b025afb0b4c913b4c338a42934a3863bf3644"));
|
||||||
|
cl_git_pass(git_oid_fromstr(&from_oid, "a4a7dce85cf63874e984719f4fdd239f5145052f"));
|
||||||
|
|
||||||
|
cl_git_pass(git_revwalk_push(_walk, &to_oid));
|
||||||
|
cl_git_pass(git_revwalk_hide(_walk, &from_oid));
|
||||||
|
|
||||||
|
while (git_revwalk_next(&oid, _walk) == 0)
|
||||||
|
i++;
|
||||||
|
|
||||||
|
cl_assert_equal_i(i, 0);
|
||||||
|
}
|
||||||
|
|
||||||
void test_revwalk_basic__push_range(void)
|
void test_revwalk_basic__push_range(void)
|
||||||
{
|
{
|
||||||
revwalk_basic_setup_walk(NULL);
|
revwalk_basic_setup_walk(NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user