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

[PATCH] Fix adding a submodule with a remote url

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Sep 29, 2007, 23:39 UTC
Message-ID
<Pine.LNX.4.64.0709291937240.5926@iabervon.org>
Without this, a non-path URL gets lost before the clone.
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
---
I'm not sure if the use of $repo in this function is right, but this is 
definitely an improvement.
 git-submodule.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-submodule.sh b/git-submodule.sh
index 727b1d3..4aaaaab 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -138,8 +138,8 @@ module_add()
 		# it is local
 		if base=$(get_repo_base "$repo"); then
 			repo="$base"
-			realrepo=$repo
 		fi
+		realrepo=$repo
 		;;
 	esac
 
-- 
1.5.3.2.1107.ge9eab8-dirty
Message 1 of 1 in “Fix adding a submodule with a remote url”
  1. Fix adding a submodule with a remote urlDaniel Barkalow, Sep 29, 2007

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.