Skip to content

Commit

Permalink
apply: add t4137 for submodule updates
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jens Lehmann authored and Junio C Hamano committed Jul 14, 2014
1 parent d78ecca commit 558643e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions t/t4137-apply-submodule.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/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

0 comments on commit 558643e

Please sign in to comment.