<div dir="ltr">I think the git HTTP transport does never allow shallow clones. You can use the git transport protocol (also with GitHub), but note that the git transport protocol is not authenticated (whereas https is, of course).<div><br></div><div>So, I think the solution is to only use --depth=1 for git:// URLs.</div><div><br></div><div>For GitHub, I’d recommend first translating https URLs into git URLs, then (later) use the GitHub API.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 11, 2017 at 6:51 AM, Osamu Aoki <span dir="ltr"><<a href="mailto:osamu@debian.org" target="_blank">osamu@debian.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
On Thu, Aug 10, 2017 at 09:37:33AM +0200, Michael Stapelberg wrote:<br>
> Here’s an example: <a href="https://github.com/Debian/dh-make-golang/" rel="noreferrer" target="_blank">https://github.com/Debian/dh-<wbr>make-golang/</a>. The corresponding<br>
<br>
Tested ...<br>
<br>
$ git clone --depth=1 --bare <a href="https://github.com/Debian/dh-make-golang/" rel="noreferrer" target="_blank">https://github.com/Debian/dh-<wbr>make-golang/</a> boo<br>
Cloning into bare repository 'boo'...<br>
remote: Counting objects: 13, done.<br>
remote: Compressing objects: 100% (12/12), done.<br>
remote: Total 13 (delta 0), reused 6 (delta 0), pack-reused 0<br>
Unpacking objects: 100% (13/13), done.<br>
$ git clone --depth=1 --bare <a href="http://git.ao2.it/tweeper.git" rel="noreferrer" target="_blank">http://git.ao2.it/tweeper.git</a> foo<br>
Cloning into bare repository 'foo'...<br>
fatal: dumb http transport does not support shallow capabilities<br>
$ git clone  --bare <a href="http://git.ao2.it/tweeper.git" rel="noreferrer" target="_blank">http://git.ao2.it/tweeper.git</a> foo<br>
Cloning into bare repository 'foo'...<br>
$<br>
<br>
Interesting.  So not all site can work with shallow checkout.<br>
<br>
This reminds me of problems I had with git-archive, too.<br>
<br>
Before coding further, let me check and test all these sites.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
Osamu<br>
<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Best regards,<br>Michael</div>
</div>