{"thread":{"id":"44829","subject":"minor bug: git submodule update --init from a subdir shows wrong path","startedAt":"2017-01-06T21:31:31Z","lastAt":"2017-01-06T21:31:31Z","messageCount":1,"participants":["David Turner"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"308899","messageId":"1483738284.31165.6.camel@frank","threadId":"44829","inReplyTo":null,"subject":"minor bug: git submodule update --init from a subdir shows wrong path","fromName":"David Turner","fromEmail":"novalis@novalis.org","sentAt":"2017-01-06T21:31:24Z","receivedAt":"2017-01-06T21:31:31Z","isPatch":false,"sender":{"key":"novalis@novalis.org","avatar":"https://avatars.githubusercontent.com/u/77003?v=4"},"body":"I believe (from bisection) that this was introduced in the transition to\nC at 3604242f080.\n\nI've attached a repro (against master).  At the time the bug was\nintroduced, the output in question went to stdout instead of stderr, so\nthe attached test case will not quite work on the older version.  But if\nyou run under -v, you'll be able to see the bad (\"foo/foo/sub\" instead\nof \"foo/sub\" or just \"sub\") output.\n\n\n\n\ndiff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh\nindex 64f322c..e1deb17 100755\n--- a/t/t7406-submodule-update.sh\n+++ b/t/t7406-submodule-update.sh\n@@ -140,6 +140,23 @@ test_expect_success 'submodule update --init --recursive from subdirectory' '\n \ttest_i18ncmp expect2 actual2\n '\n \n+cat <<EOF >expect2\n+Submodule 'foo/sub' (/home/novalis/twosigma/git/t/trash directory.t7406-submodule-update/withsubs/../rebasing) registered for path 'foo/sub'\n+EOF\n+\n+test_expect_success 'submodule update --init from and of subdirectory' '\n+\tgit init withsubs &&\n+\t(cd withsubs &&\n+\t mkdir foo &&\n+\t git submodule add \"$(pwd)/../rebasing\" foo/sub &&\n+\t (cd foo &&\n+\t  git submodule deinit -f sub &&\n+\t  git submodule update --init sub 2>../../actual2\n+\t )\n+\t) &&\n+\ttest_i18ncmp expect2 actual2\n+'\n+\n apos=\"'\";\n test_expect_success 'submodule update does not fetch already present commits' '\n \t(cd submodule &&\n"}]}