{"thread":{"id":"31641","subject":"[PATCH] submodule: configure submodule.<name>.path on add and init","startedAt":"2012-09-24T19:32:30Z","lastAt":"2012-09-24T19:32:30Z","messageCount":1,"participants":["Orgad Shaneh"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"199849","messageId":"1348515150-20284-1-git-send-email-orgads@gmail.com","threadId":"31641","inReplyTo":null,"subject":"[PATCH] submodule: configure submodule.<name>.path on add and init","fromName":"Orgad Shaneh","fromEmail":"orgads@gmail.com","sentAt":"2012-09-24T19:32:30Z","receivedAt":"2012-09-24T19:32:30Z","isPatch":true,"sender":{"key":"orgads@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1246544?v=4"},"body":"In order to read diff options for a submodule, its path must be configured\n\nSigned-off-by: Orgad Shaneh <orgads@gmail.com>\n---\n git-submodule.sh |    2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/git-submodule.sh b/git-submodule.sh\nindex 3e2045e..af9c003 100755\n--- a/git-submodule.sh\n+++ b/git-submodule.sh\n@@ -359,6 +359,7 @@ Use -f if you really want to add it.\" >&2\n \t\t\tesac\n \t\t) || die \"$(eval_gettext \"Unable to checkout submodule '\\$sm_path'\")\"\n \tfi\n+\tgit config submodule.\"$sm_path\".path \"$sm_path\"\n \tgit config submodule.\"$sm_path\".url \"$realrepo\"\n \n \tgit add $force \"$sm_path\" ||\n@@ -476,6 +477,7 @@ cmd_init()\n \t\t\t\turl=$(resolve_relative_url \"$url\") || exit\n \t\t\t\t;;\n \t\t\tesac\n+\t\t\tgit config submodule.\"$name\".path \"$name\" &&\n \t\t\tgit config submodule.\"$name\".url \"$url\" ||\n \t\t\tdie \"$(eval_gettext \"Failed to register url for submodule path '\\$sm_path'\")\"\n \n-- \n1.7.10.4\n"}]}