From: Shourya Shukla <shouryashukla.oo@gmail.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com, christian.couder@gmail.com,
kaartic.sivaraam@gmail.com, Johannes.Schindelin@gmx.de,
liu.denton@gmail.com, Shourya Shukla <shouryashukla.oo@gmail.com>
Subject: [PATCH v2 3/3] t7400: add test to check 'submodule add' for tracked paths
Date: Wed, 7 Oct 2020 13:15:38 +0530 [thread overview]
Message-ID: <20201007074538.25891-4-shouryashukla.oo@gmail.com> (raw)
In-Reply-To: <20201007074538.25891-1-shouryashukla.oo@gmail.com>
Add test to check if 'git submodule add' works on paths which are
tracked by Git.
Helped-by: Christian Couder <christian.couder@gmail.com>
Helped-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Signed-off-by: Shourya Shukla <shouryashukla.oo@gmail.com>
---
t/t7400-submodule-basic.sh | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh
index 4ab8298385..d9317192e0 100755
--- a/t/t7400-submodule-basic.sh
+++ b/t/t7400-submodule-basic.sh
@@ -193,6 +193,17 @@ test_expect_success 'submodule add to .gitignored path with --force' '
)
'
+test_expect_success 'submodule add to path with tracked contents fails' '
+ (
+ cd addtest-ignore &&
+ mkdir track &&
+ git add -f track &&
+ git commit -m "add tracked path" &&
+ ! git submodule add "$submodurl" submod >output 2>&1 &&
+ test_file_not_empty output
+ )
+'
+
test_expect_success 'submodule add to reconfigure existing submodule with --force' '
(
cd addtest-ignore &&
--
2.28.0
next prev parent reply other threads:[~2020-10-07 7:46 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-07 7:45 [PATCH v2 0/3] submodule: port subcommand add from shell to C Shourya Shukla
2020-10-07 7:45 ` [PATCH v2 1/3] dir: change the scope of function 'directory_exists_in_index()' Shourya Shukla
2020-10-07 18:05 ` Junio C Hamano
2020-10-12 10:11 ` Shourya Shukla
2020-11-18 23:25 ` Emily Shaffer
2020-10-07 7:45 ` [PATCH v2 2/3] submodule: port submodule subcommand 'add' from shell to C Shourya Shukla
2020-10-07 18:37 ` Junio C Hamano
2020-10-07 22:19 ` Junio C Hamano
2020-10-08 17:19 ` Junio C Hamano
2020-10-09 5:09 ` Junio C Hamano
2020-11-18 23:13 ` Jonathan Tan
2020-11-19 7:44 ` Ævar Arnfjörð Bjarmason
2020-11-19 12:38 ` Johannes Schindelin
2020-11-19 20:37 ` Junio C Hamano
2020-10-07 7:45 ` Shourya Shukla [this message]
2020-11-19 0:03 ` [PATCH v2 0/3] submodule: port subcommand add " Josh Steadmon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201007074538.25891-4-shouryashukla.oo@gmail.com \
--to=shouryashukla.oo@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=kaartic.sivaraam@gmail.com \
--cc=liu.denton@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).