mirror of
https://github.com/git/git
synced 2024-10-30 14:03:28 +00:00
7abc1869e5
The Perl version of the add -i/-p commands has been removed since
20b813d
(add: remove "add.interactive.useBuiltin" & Perl "git
add--interactive", 2023-02-07)
Therefore, Perl prerequisite in the test scripts which use the patch
mode functionality is not neccessary.
Signed-off-by: Ghanshyam Thakkar <shyamthakkar001@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
28 lines
741 B
Bash
Executable file
28 lines
741 B
Bash
Executable file
#!/bin/sh
|
|
|
|
test_description='hunk edit with "commit -p -m"'
|
|
. ./test-lib.sh
|
|
|
|
test_expect_success 'setup (initial)' '
|
|
echo line1 >file &&
|
|
git add file &&
|
|
git commit -m commit1
|
|
'
|
|
|
|
test_expect_success 'edit hunk "commit -p -m message"' '
|
|
test_when_finished "rm -f editor_was_started" &&
|
|
rm -f editor_was_started &&
|
|
echo more >>file &&
|
|
echo e | env GIT_EDITOR=": >editor_was_started" git commit -p -m commit2 file &&
|
|
test -r editor_was_started
|
|
'
|
|
|
|
test_expect_success 'edit hunk "commit --dry-run -p -m message"' '
|
|
test_when_finished "rm -f editor_was_started" &&
|
|
rm -f editor_was_started &&
|
|
echo more >>file &&
|
|
echo e | env GIT_EDITOR=": >editor_was_started" git commit -p -m commit3 file &&
|
|
test -r editor_was_started
|
|
'
|
|
|
|
test_done
|