[PATCH 13/19] from-submodule: add url to .gittrees

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From e1b71e3bf8abaea424972d13ba028b911b07d85a Mon Sep 17 00:00:00 2001
From: Paul Campbell <pcampbell@xxxxxxxxxxx>
Date: Sat, 9 Mar 2013 18:34:31 +0000
Subject: [PATCH 13/19] from-submodule: add url to .gittrees

Conflicts:
	git-subtree.sh

Original-Author: Herman van Rink <rink@xxxxxxxxxxx>
Conflicts-resolved-by: Paul Campbell <pcampbell@xxxxxxxxxxx>
---
 contrib/subtree/git-subtree.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh
index ae7d1fe..84c90c7 100755
--- a/contrib/subtree/git-subtree.sh
+++ b/contrib/subtree/git-subtree.sh
@@ -806,6 +806,7 @@ cmd_from-submodule()
 	ensure_clean

 	local submodule_sha=$(git submodule status $prefix | cut -d ' ' -f 2)
+	local submodule_orig_repo=$(git config --file .gitmodules
submodule.$prefix.url)

 	# Remove references to submodule.
 	git config --remove-section submodule.$prefix
@@ -824,6 +825,10 @@ cmd_from-submodule()
 	# subtree add from submodule repo.
 	cmd_add_repository $tmp_repo HEAD

+	# Update .gittrees with the original repo url
+	git config --file .gittrees --unset subtree.$prefix.url
+	git config --file .gittrees subtree.$prefix.url $submodule_orig_repo
+
 	# Remove submodule repo.
 	rm -rf $tmp_repo
 }
-- 
1.8.2.rc1


-- 
Paul [W] Campbell
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]