-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'bp/commit-p-editor' into maint
* bp/commit-p-editor: run-command: mark run_hook_with_custom_index as deprecated merge hook tests: fix and update tests merge: fix GIT_EDITOR override for commit hook commit: fix patch hunk editing with "commit -p -m" test patch hunk editing with "commit -p -m" merge hook tests: use 'test_must_fail' instead of '!' merge hook tests: fix missing '&&' in test
- Loading branch information
Showing
10 changed files
with
137 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/sh | ||
|
||
test_description='hunk edit with "commit -p -m"' | ||
. ./test-lib.sh | ||
|
||
if ! test_have_prereq PERL | ||
then | ||
skip_all="skipping '$test_description' tests, perl not available" | ||
test_done | ||
fi | ||
|
||
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 |