From: Stefan Beller <sbeller@google.com>
To: gitster@pobox.com, git@vger.kernel.org
Cc: jacob.e.keller@intel.com, Jens.Lehmann@web.de,
Stefan Beller <sbeller@google.com>
Subject: [PATCH 1/2] Check recursive submodule update to have correct path from subdirectory
Date: Fri, 26 Feb 2016 12:51:51 -0800 [thread overview]
Message-ID: <1456519912-10641-2-git-send-email-sbeller@google.com> (raw)
In-Reply-To: <1456519912-10641-1-git-send-email-sbeller@google.com>
A similar test exists for `submodule sync` to behave well when being in
an unrelated subdirectory and performing operations on submodules.
Signed-off-by: Stefan Beller <sbeller@google.com>
---
t/t7406-submodule-update.sh | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh
index 68ea31d..628da7f 100755
--- a/t/t7406-submodule-update.sh
+++ b/t/t7406-submodule-update.sh
@@ -774,4 +774,16 @@ test_expect_success 'submodule update --recursive drops module name before recur
test_i18ngrep "Submodule path .deeper/submodule/subsubmodule.: checked out" actual
)
'
+
+test_expect_success 'submodule update --recursive works from subdirectory' '
+ (cd super2 &&
+ (cd deeper/submodule/subsubmodule &&
+ git checkout HEAD^
+ ) &&
+ mkdir untracked &&
+ cd untracked &&
+ git submodule update --recursive >actual &&
+ test_i18ngrep "Submodule path .../deeper/submodule/subsubmodule.: checked out" actual
+ )
+'
test_done
--
2.7.2.368.g934fe14
next prev parent reply other threads:[~2016-02-26 20:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-26 20:51 [PATCH 0/2] recursive submodules: paths are hard Stefan Beller
2016-02-26 20:51 ` Stefan Beller [this message]
2016-02-26 20:51 ` [PATCH 2/2] submodule sync: Test we can pass individual submodules Stefan Beller
2016-02-27 1:58 ` [PATCH 0/2] recursive submodules: paths are hard Duy Nguyen
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=1456519912-10641-2-git-send-email-sbeller@google.com \
--to=sbeller@google.com \
--cc=Jens.Lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jacob.e.keller@intel.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).