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:
authorBrandon Williams <bmwill@google.com>2017-05-09 22:17:59 +0300
committerJunio C Hamano <gitster@pobox.com>2017-05-10 08:47:39 +0300
commitbdab972153a73815e04e9699406433e409ed28ab (patch)
tree0f6210c3fbab3473680f3459cf69d498e0ea6319 /t/t6134-pathspec-in-submodule.sh
parent2c3b40799fcdb9d2dedc90134e4f3841af08bbe7 (diff)
submodule: add die_in_unpopulated_submodule function
Currently 'git add' is the only command which dies when launched from an unpopulated submodule (the place-holder directory for a submodule which hasn't been checked out). This is triggered implicitly by passing the PATHSPEC_STRIP_SUBMODULE_SLASH_EXPENSIVE flag to 'parse_pathspec()'. Instead make this desire more explicit by creating a function 'die_in_unpopulated_submodule()' which dies if the provided 'prefix' has a leading path component which matches a submodule in the the index. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6134-pathspec-in-submodule.sh')
-rwxr-xr-xt/t6134-pathspec-in-submodule.sh6
1 files changed, 1 insertions, 5 deletions
diff --git a/t/t6134-pathspec-in-submodule.sh b/t/t6134-pathspec-in-submodule.sh
index fd401ca605..0f1cb49ced 100755
--- a/t/t6134-pathspec-in-submodule.sh
+++ b/t/t6134-pathspec-in-submodule.sh
@@ -24,13 +24,9 @@ test_expect_success 'error message for path inside submodule' '
test_cmp expect actual
'
-cat <<EOF >expect
-fatal: Pathspec '.' is in submodule 'sub'
-EOF
-
test_expect_success 'error message for path inside submodule from within submodule' '
test_must_fail git -C sub add . 2>actual &&
- test_cmp expect actual
+ test_i18ngrep "in unpopulated submodule" actual
'
test_done