list mirror (unofficial, one of many)
 help / color / Atom feed
From: Yaroslav Halchenko <>
To: git <>
Subject: [wishlist] support of cloning recursively from non-bare submodule hierarchies?
Date: Thu, 13 Dec 2018 12:19:17 -0500
Message-ID: <> (raw)

Example - on we have a few hundred datasets
organized into a hierarchy as git submodules.  Each  git submodules carries its
own .git/ directory so they are "self sufficient" and we could readily assess
their sizes, and "cut the tree" at any level without looking for the
supermodule somewhere high up in the tree.

.gitmodules typically has relative paths for the url and path for the
submodules there, the form which I think we chose because it used to work (I
could be utterly wrong! but I think it was done in an informed fashion)
for git clone --recursive:

	$> curl
	[submodule "data"]
		path = data
		url = ./data

and possibly outside:

	$> curl 
	[submodule "scripts/mridefacer"]
		path = scripts/mridefacer
		url =

But unfortunately git doesn't even consider such (valid AFAIK) situation
while cloning where url has to have .git suffix but repository is not bare and
a relative "data" path (or "./data" url) is referring to the worktree.

	$> git clone --recursive 
	Cloning into 'famface'...
	remote: Counting objects: 61, done.
	remote: Compressing objects: 100% (54/54), done.
	remote: Total 61 (delta 14), reused 0 (delta 0)
	Unpacking objects: 100% (61/61), done.
	Submodule 'data' ( registered for path 'data'
	Cloning into '/tmp/famface/data'...
	fatal: repository '' not found
	fatal: clone of '' into submodule path '/tmp/famface/data' failed
	Failed to clone 'data'. Retry scheduled
	Cloning into '/tmp/famface/data'...
	fatal: repository '' not found
	fatal: clone of '' into submodule path '/tmp/famface/data' failed
	Failed to clone 'data' a second time, aborting

on the server I use the "smart HTTP" git backend, but not sure if that is the one to blame, since
I do not see in the logs any attempt to get the /data from not under .git/: - - [13/Dec/2018:12:18:38 -0500] "GET /labs/gobbini/famface/.git/info/refs?service=git-upload-pack HTTP/1.1" 200 681 "-" "git/2.20.0.rc2.403.gdbc3b29805" - - [13/Dec/2018:12:18:38 -0500] "POST /labs/gobbini/famface/.git/git-upload-pack HTTP/1.1" 200 69276 "-" "git/2.20.0.rc2.403.gdbc3b29805"

	==> <==
	[Thu Dec 13 12:18:38.673447 2018] [core:info] [pid 7570:tid 140683541153536] [client] AH00128: File does not exist: /srv/

	==> <== - - [13/Dec/2018:12:18:38 -0500] "GET /labs/gobbini/famface/.git/data/info/refs?service=git-upload-pack HTTP/1.1" 404 485 "-" "git/2.20.0.rc2.403.gdbc3b29805"

	==> <==
	[Thu Dec 13 12:18:38.689277 2018] [core:info] [pid 7572:tid 140683574724352] [client] AH00128: File does not exist: /srv/

	==> <== - - [13/Dec/2018:12:18:38 -0500] "GET /labs/gobbini/famface/.git/data/info/refs?service=git-upload-pack HTTP/1.1" 404 485 "-" "git/2.20.0.rc2.403.gdbc3b29805"

Yaroslav O. Halchenko
Center for Open Neuroscience
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419

             reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-13 17:19 Yaroslav Halchenko [this message]
2018-12-13 21:59 ` Stefan Beller

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link list mirror (unofficial, one of many)

Archives are clonable:
	git clone --mirror
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

Newsgroups are available over NNTP:

 note: .onion URLs require Tor:

AGPL code for this site: git clone public-inbox