{"thread":{"id":"33132","subject":"[PATCH 13/19] from-submodule: add url to .gittrees","startedAt":"2013-03-09T19:28:31Z","lastAt":"2013-03-09T19:28:31Z","messageCount":1,"participants":["Paul Campbell"],"isPatch":true,"patchVersion":1,"patchTotal":19},"messages":[{"id":"210920","messageId":"CALeLG_kbrP=ZR0T9BjvB6RMsR8vJuu-kSmxp_4AMdB1okGHidg@mail.gmail.com","threadId":"33132","inReplyTo":null,"subject":"[PATCH 13/19] from-submodule: add url to .gittrees","fromName":"Paul Campbell","fromEmail":"pcampbell@kemitix.net","sentAt":"2013-03-09T19:28:31Z","receivedAt":"2013-03-09T19:28:31Z","isPatch":true,"sender":{"key":"pcampbell@kemitix.net","avatar":"https://gravatar.com/avatar/57584e05501b694929004e43fcd7308f4ad64df2eb0474cd8c7e5f93662bb0f1?d=mp&s=160"},"body":">From e1b71e3bf8abaea424972d13ba028b911b07d85a Mon Sep 17 00:00:00 2001\nFrom: Paul Campbell <pcampbell@kemitix.net>\nDate: Sat, 9 Mar 2013 18:34:31 +0000\nSubject: [PATCH 13/19] from-submodule: add url to .gittrees\n\nConflicts:\n\tgit-subtree.sh\n\nOriginal-Author: Herman van Rink <rink@initfour.nl>\nConflicts-resolved-by: Paul Campbell <pcampbell@kemitix.net>\n---\n contrib/subtree/git-subtree.sh | 5 +++++\n 1 file changed, 5 insertions(+)\n\ndiff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh\nindex ae7d1fe..84c90c7 100755\n--- a/contrib/subtree/git-subtree.sh\n+++ b/contrib/subtree/git-subtree.sh\n@@ -806,6 +806,7 @@ cmd_from-submodule()\n \tensure_clean\n\n \tlocal submodule_sha=$(git submodule status $prefix | cut -d ' ' -f 2)\n+\tlocal submodule_orig_repo=$(git config --file .gitmodules\nsubmodule.$prefix.url)\n\n \t# Remove references to submodule.\n \tgit config --remove-section submodule.$prefix\n@@ -824,6 +825,10 @@ cmd_from-submodule()\n \t# subtree add from submodule repo.\n \tcmd_add_repository $tmp_repo HEAD\n\n+\t# Update .gittrees with the original repo url\n+\tgit config --file .gittrees --unset subtree.$prefix.url\n+\tgit config --file .gittrees subtree.$prefix.url $submodule_orig_repo\n+\n \t# Remove submodule repo.\n \trm -rf $tmp_repo\n }\n-- \n1.8.2.rc1\n\n\n-- \nPaul [W] Campbell\n"}]}