mirror of
https://github.com/git/git
synced 2024-08-25 02:35:46 +00:00
![Jens Lehmann](/assets/img/avatar_default.png)
Test that the apply command updates the work tree as expected for the '--index' and the '--3way' options (for submodule changes which don't result in conflicts). Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
21 lines
373 B
Bash
Executable file
21 lines
373 B
Bash
Executable file
#!/bin/sh
|
|
|
|
test_description='git apply handling submodules'
|
|
|
|
. ./test-lib.sh
|
|
. "$TEST_DIRECTORY"/lib-submodule-update.sh
|
|
|
|
apply_index () {
|
|
git diff --ignore-submodules=dirty "..$1" | git apply --index -
|
|
}
|
|
|
|
test_submodule_switch "apply_index"
|
|
|
|
apply_3way () {
|
|
git diff --ignore-submodules=dirty "..$1" | git apply --3way -
|
|
}
|
|
|
|
test_submodule_switch "apply_3way"
|
|
|
|
test_done
|