git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Paul Campbell <pcampbell@kemitix.net>
Date
Mar 9, 2013, 19:28 UTC
Message-ID
<CALeLG_kbrP=ZR0T9BjvB6RMsR8vJuu-kSmxp_4AMdB1okGHidg@mail.gmail.com>
>From e1b71e3bf8abaea424972d13ba028b911b07d85a Mon Sep 17 00:00:00 2001
From: Paul Campbell <pcampbell@kemitix.net>
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@initfour.nl>
Conflicts-resolved-by: Paul Campbell <pcampbell@kemitix.net>
---
 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
Message 1 of 1 in “from-submodule: add url to .gittrees”
  1. 13/19 from-submodule: add url to .gittreesPaul Campbell, Mar 9, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.