From: Stefan Beller <sbeller@google.com>
To: jacob.keller@gmail.com, daveparrish@gmail.com
Cc: git@vger.kernel.org, Stefan Beller <sbeller@google.com>
Subject: [PATCH] failure with diff --submodule=diff with moved nested submodule HEAD
Date: Fri, 31 Mar 2017 10:59:07 -0700 [thread overview]
Message-ID: <20170331175907.17400-1-sbeller@google.com> (raw)
In-Reply-To: <CA+P7+xoqWCpySc17104zggLgwx1mc0T+JXybrgd8sQxoQFP-PQ@mail.gmail.com>
This fails reliable for me.
Signed-off-by: Stefan Beller <sbeller@google.com>
---
t/t4060-diff-submodule-option-diff-format.sh | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/t/t4060-diff-submodule-option-diff-format.sh b/t/t4060-diff-submodule-option-diff-format.sh
index 7e23b55ea4..89bced3484 100755
--- a/t/t4060-diff-submodule-option-diff-format.sh
+++ b/t/t4060-diff-submodule-option-diff-format.sh
@@ -746,4 +746,20 @@ test_expect_success 'diff --submodule=diff with .git file' '
test_cmp expected actual
'
+test_expect_success 'setup nested submodule' '
+ git submodule add -f ./sm2 &&
+ git commit -a -m "add sm2" &&
+ git -C sm2 submodule add ../sm2 &&
+ git -C sm2 commit -a -m "nested sub"
+'
+
+test_expect_success 'move nested submodule HEAD' '
+ git -C sm2/sm2 commit --allow-empty -m "new HEAD"
+'
+
+test_expect_success 'diff --submodule=diff with moved nested submodule HEAD' '
+ git -C sm2 diff --submodule=diff >actual 2>err &&
+ test_must_be_empty err
+'
+
test_done
--
2.12.2.511.g2abb8caf66
next prev parent reply other threads:[~2017-03-31 18:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-31 15:40 git diff --submodule=diff fails with submodules in a submodule David Parrish
2017-03-31 17:07 ` Stefan Beller
2017-03-31 17:31 ` Jacob Keller
2017-03-31 17:59 ` Stefan Beller [this message]
2017-03-31 19:38 ` [PATCH] failure with diff --submodule=diff with moved nested submodule HEAD Junio C Hamano
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=20170331175907.17400-1-sbeller@google.com \
--to=sbeller@google.com \
--cc=daveparrish@gmail.com \
--cc=git@vger.kernel.org \
--cc=jacob.keller@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).