aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-07-15 12:06:25 -0700
committerJunio C Hamano <gitster@pobox.com>2010-07-15 12:06:25 -0700
commit849865733fc667789d0e57edd1ac2ee1f38499a3 (patch)
treef2507a5c015a48669914438e6c92e37850a336d9 /t
parentaa57328d60f5d5a5f74d1d336caf06b6bdf4fd03 (diff)
parent31991b0260216d16f2e447e68bcabd9d9cce26ba (diff)
downloadgit-849865733fc667789d0e57edd1ac2ee1f38499a3.tar.gz
git-849865733fc667789d0e57edd1ac2ee1f38499a3.tar.xz
Merge branch 'ab/submodule-add-f'
* ab/submodule-add-f: git submodule: add submodules with git add -f <path>
Diffstat (limited to 't')
-rwxr-xr-xt/t7400-submodule-basic.sh24
1 files changed, 23 insertions, 1 deletions
diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh
index 97ff074da..d9f278599 100755
--- a/t/t7400-submodule-basic.sh
+++ b/t/t7400-submodule-basic.sh
@@ -42,7 +42,8 @@ test_expect_success 'setup - hide init subdirectory' '
'
test_expect_success 'setup - repository to add submodules to' '
- git init addtest
+ git init addtest &&
+ git init addtest-ignore
'
# The 'submodule add' tests need some repository to add as a submodule.
@@ -85,6 +86,27 @@ test_expect_success 'submodule add' '
test_cmp empty untracked
'
+test_expect_success 'submodule add to .gitignored path' '
+ echo "refs/heads/master" >expect &&
+ >empty &&
+
+ (
+ cd addtest-ignore &&
+ # Does not use test_commit due to the ignore
+ echo "*" > .gitignore &&
+ git add --force .gitignore &&
+ git commit -m"Ignore everything" &&
+ git submodule add "$submodurl" submod &&
+ git submodule init
+ ) &&
+
+ rm -f heads head untracked &&
+ inspect addtest/submod ../.. &&
+ test_cmp expect heads &&
+ test_cmp expect head &&
+ test_cmp empty untracked
+'
+
test_expect_success 'submodule add --branch' '
echo "refs/heads/initial" >expect-head &&
cat <<-\EOF >expect-heads &&