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

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-09-13 21:38:24 +0300
committerJunio C Hamano <gitster@pobox.com>2022-09-13 21:38:24 +0300
commite4ffba458fd173949ae04f77b8165c3c061f183e (patch)
tree8c7bbd68bd18121579381545e76c4479134c32f3
parent76ffa818c792cf3508502f78909c3b7eb3c72dbc (diff)
parent64ec8efb836c5def807feb5d86be50f4f53a7b33 (diff)
Merge branch 'js/builtin-add-p-portability-fix'
More fixes to "add -p" * js/builtin-add-p-portability-fix: t6132(NO_PERL): do not run the scripted `add -p` t3701: test the built-in `add -i` regardless of NO_PERL add -p: avoid ambiguous signed/unsigned comparison
-rw-r--r--add-patch.c2
-rwxr-xr-xt/t3701-add-interactive.sh4
-rwxr-xr-xt/t6132-pathspec-exclude.sh6
3 files changed, 8 insertions, 4 deletions
diff --git a/add-patch.c b/add-patch.c
index a659653286..29f9456df3 100644
--- a/add-patch.c
+++ b/add-patch.c
@@ -1560,7 +1560,7 @@ soft_increment:
strbuf_remove(&s->answer, 0, 1);
strbuf_trim(&s->answer);
i = hunk_index - DISPLAY_HUNKS_LINES / 2;
- if (i < file_diff->mode_change)
+ if (i < (int)file_diff->mode_change)
i = file_diff->mode_change;
while (s->answer.len == 0) {
i = display_hunks(s, file_diff, i);
diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh
index 5a7a0ea7e8..5841f280fb 100755
--- a/t/t3701-add-interactive.sh
+++ b/t/t3701-add-interactive.sh
@@ -7,9 +7,9 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-terminal.sh
-if ! test_have_prereq PERL
+if test_have_prereq !ADD_I_USE_BUILTIN,!PERL
then
- skip_all='skipping add -i tests, perl not available'
+ skip_all='skipping add -i (scripted) tests, perl not available'
test_done
fi
diff --git a/t/t6132-pathspec-exclude.sh b/t/t6132-pathspec-exclude.sh
index 9fdafeb1e9..cada952f9a 100755
--- a/t/t6132-pathspec-exclude.sh
+++ b/t/t6132-pathspec-exclude.sh
@@ -293,7 +293,11 @@ test_expect_success 'add with all negative' '
test_cmp expect actual
'
-test_expect_success 'add -p with all negative' '
+test_lazy_prereq ADD_I_USE_BUILTIN_OR_PERL '
+ test_have_prereq ADD_I_USE_BUILTIN || test_have_prereq PERL
+'
+
+test_expect_success ADD_I_USE_BUILTIN_OR_PERL 'add -p with all negative' '
H=$(git rev-parse HEAD) &&
git reset --hard $H &&
git clean -f &&