diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-07-22 07:27:39 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-07-22 07:27:39 -0700 |
| commit | c7a5d9a13c53c91fd012aea7fbfdf05286cbf3d9 (patch) | |
| tree | 70326abe19a3c7df4b81049f9b8910f05030fb9f /t | |
| parent | Sync with 'master' (diff) | |
| download | git-c7a5d9a13c53c91fd012aea7fbfdf05286cbf3d9.tar.gz git-c7a5d9a13c53c91fd012aea7fbfdf05286cbf3d9.zip | |
Revert "Merge branch 'rs/pop-recent-commit-with-prio-queue' into next"
This reverts commit 03dce625bff6598e7f77d9f4a4a25d0288e5e5a8, reversing
changes made to 6ba607880dc2bbf7e13e5734880ce0f9b87d2670.
Diffstat (limited to 't')
| -rw-r--r-- | t/meson.build | 1 | ||||
| -rwxr-xr-x | t/perf/p1501-rev-parse-oneline.sh | 71 | ||||
| -rw-r--r-- | t/unit-tests/u-prio-queue.c | 23 |
3 files changed, 0 insertions, 95 deletions
diff --git a/t/meson.build b/t/meson.build index 660d780dcc..1af289425d 100644 --- a/t/meson.build +++ b/t/meson.build @@ -1116,7 +1116,6 @@ benchmarks = [ 'perf/p1450-fsck.sh', 'perf/p1451-fsck-skip-list.sh', 'perf/p1500-graph-walks.sh', - 'perf/p1501-rev-parse-oneline.sh', 'perf/p2000-sparse-operations.sh', 'perf/p3400-rebase.sh', 'perf/p3404-rebase-interactive.sh', diff --git a/t/perf/p1501-rev-parse-oneline.sh b/t/perf/p1501-rev-parse-oneline.sh deleted file mode 100755 index 538fa9c404..0000000000 --- a/t/perf/p1501-rev-parse-oneline.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/sh - -test_description='Test :/ object name notation' - -. ./perf-lib.sh - -test_perf_fresh_repo - -# -# Creates lots of merges to make history traversal costly. In -# particular it creates 2^($max_level-1)-1 2-way merges on top of -# 2^($max_level-1) root commits. E.g., the commit history looks like -# this for a $max_level of 3: -# -# _1_ -# / \ -# 2 3 -# / \ / \ -# 4 5 6 7 -# -# The numbers are the fast-import marks, which also are the commit -# messages. 1 is the HEAD commit and a merge, 2 and 3 are also merges, -# 4-7 are the root commits. -# -build_history () { - local max_level="$1" && - local level="${2:-1}" && - local mark="${3:-1}" && - if test $level -eq $max_level - then - echo "reset refs/heads/master" && - echo "from $ZERO_OID" && - echo "commit refs/heads/master" && - echo "mark :$mark" && - echo "committer C <c@example.com> 1234567890 +0000" && - echo "data <<EOF" && - echo "$mark" && - echo "EOF" - else - local level1=$((level+1)) && - local mark1=$((2*mark)) && - local mark2=$((2*mark+1)) && - build_history $max_level $level1 $mark1 && - build_history $max_level $level1 $mark2 && - echo "commit refs/heads/master" && - echo "mark :$mark" && - echo "committer C <c@example.com> 1234567890 +0000" && - echo "data <<EOF" && - echo "$mark" && - echo "EOF" && - echo "from :$mark1" && - echo "merge :$mark2" - fi -} - -test_expect_success 'setup' ' - build_history 16 | git fast-import && - git log --format="%H %s" --reverse >commits && - sed -n -e "s/ .*$//p" -e "q" <commits >expect && - sed -n -e "s/^.* //p" -e "q" <commits >needle -' - -test_perf "rev-parse :/$(cat needle)" ' - git rev-parse :/$(cat needle) >actual -' - -test_expect_success 'verify result' ' - test_cmp expect actual -' - -test_done diff --git a/t/unit-tests/u-prio-queue.c b/t/unit-tests/u-prio-queue.c index 63e58114ae..145e689c9c 100644 --- a/t/unit-tests/u-prio-queue.c +++ b/t/unit-tests/u-prio-queue.c @@ -13,7 +13,6 @@ static int intcmp(const void *va, const void *vb, void *data UNUSED) #define STACK -3 #define GET -4 #define REVERSE -5 -#define REPLACE -6 static int show(int *v) { @@ -52,15 +51,6 @@ static void test_prio_queue(int *input, size_t input_size, case REVERSE: prio_queue_reverse(&pq); break; - case REPLACE: - peek = prio_queue_peek(&pq); - cl_assert(i + 1 < input_size); - cl_assert(input[i + 1] >= 0); - cl_assert(j < result_size); - cl_assert_equal_i(result[j], show(peek)); - j++; - prio_queue_replace(&pq, &input[++i]); - break; default: prio_queue_put(&pq, &input[i]); break; @@ -91,13 +81,6 @@ void test_prio_queue__empty(void) ((int []){ 1, 2, MISSING, 1, 2, MISSING })); } -void test_prio_queue__replace(void) -{ - TEST_INPUT(((int []){ REPLACE, 6, 2, 4, REPLACE, 5, 7, GET, - REPLACE, 1, DUMP }), - ((int []){ MISSING, 2, 4, 5, 1, 6, 7 })); -} - void test_prio_queue__stack(void) { TEST_INPUT(((int []){ STACK, 8, 1, 5, 4, 6, 2, 3, DUMP }), @@ -109,9 +92,3 @@ void test_prio_queue__reverse_stack(void) TEST_INPUT(((int []){ STACK, 1, 2, 3, 4, 5, 6, REVERSE, DUMP }), ((int []){ 1, 2, 3, 4, 5, 6 })); } - -void test_prio_queue__replace_stack(void) -{ - TEST_INPUT(((int []){ STACK, 8, 1, 5, REPLACE, 4, 6, 2, 3, DUMP }), - ((int []){ 5, 3, 2, 6, 4, 1, 8 })); -} |
