mirror of
https://github.com/git/git.git
synced 2024-11-16 06:03:44 +01:00
1d905f74fd
Mediawiki introduces a new API for queries w/ more than 500 results in version 1.21. That change triggered an infinite loop while cloning a mediawiki with such a page. The latest API renamed and moved the "continuing" information in the response, necessary to build the next query. The code failed to retrieve that information but still detected that it was in a "continuing query". As a result, it launched the same query over and over again. If a "continuing" information is detected in the response (old or new), the next query is updated accordingly. If not, we quit assuming it's not a continuing query. Reported-by: Benjamin Cathey Signed-off-by: Benoit Person <benoit.person@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
23 lines
472 B
Bash
Executable file
23 lines
472 B
Bash
Executable file
#!/bin/sh
|
|
|
|
test_description='Test the Git Mediawiki remote helper: queries w/ more than 500 results'
|
|
|
|
. ./test-gitmw-lib.sh
|
|
. $TEST_DIRECTORY/test-lib.sh
|
|
|
|
test_check_precond
|
|
|
|
test_expect_success 'creating page w/ >500 revisions' '
|
|
wiki_reset &&
|
|
for i in `test_seq 501`
|
|
do
|
|
echo "creating revision $i" &&
|
|
wiki_editpage foo "revision $i<br/>" true
|
|
done
|
|
'
|
|
|
|
test_expect_success 'cloning page w/ >500 revisions' '
|
|
git clone mediawiki::'"$WIKI_URL"' mw_dir
|
|
'
|
|
|
|
test_done
|