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

Re: [PATCH] clone: check if server supports shallow clones

From
Jeff King <peff@peff.net>
Date
Jun 17, 2015, 16:59 UTC
Message-ID
<20150617165909.GB22689@peff.net>
In-Reply-To
<xmqq8ubi47jo.fsf@gitster.dls.corp.google.com>
On Wed, Jun 17, 2015 at 09:35:23AM -0700, Junio C Hamano wrote:
Show 9 quoted lines
> > Of course it's hard to add to the test suite, since we do not have a way
> > of hitting a server that does not understand shallow (I simply fudged
> > server_supports() to return false on the client).
> 
> We've had the "shallow" capability advertised since ed09aef0
> (support fetching into a shallow repository, 2006-10-30), and this
> patch itself may not be that super-important in practice.  Let's not
> worry too much about a test for situations that may not likely
> matter to us [*1*].

I had actually started looking at doing a generic interop testing suite. It would be nice to be able to do something like:

  cd t/interop
  ./run v1.0.0 v2.0.0 ./t0001-clone.sh
and then the test script looks something like:
  test_expect_success 'clone with A from B' '
	git.a clone -u "git.b upload-pack"
  '

The "run" script is similar to the version in t/perf that builds arbitrary revisions for testing, but with the twist that it points the PATH to "git.a" and "git.b", which symlink into the bin-wrappers/ of the built directories (and probably disallows bare "git" to prevent mistakes).

But I agree that this particular bug is not all that exciting to test.
> *1* How behind are re-implementations of upload-pack by other
> people, I have to wonder, though?

JGit advertises "shallow". Libgit2 does not, but it also does not implement upload-pack. :)

I do wonder which server Mike was hitting to come across this in the first place. Maybe the Google Code dulwich-based one?

-Peff
Previous: Junio C Hamano
Message 12 of 12 in “clone: check if server supports shallow clones”
  1. clone: check if server supports shallow clonesMike Edgar, Jun 10, 2015
  2. Jeff KingJun 10, 2015
  3. Michael EdgarJun 10, 2015
  4. Jeff KingJun 10, 2015
  5. Duy NguyenJun 11, 2015
  6. Jeff KingJun 11, 2015
  7. Michael EdgarJun 11, 2015
  8. Junio C HamanoJun 11, 2015
  9. fetch-pack: check for shallow if depth givenMike Edgar, Jun 17, 2015
  10. Jeff KingJun 17, 2015
  11. Junio C HamanoJun 17, 2015
  12. Jeff KingJun 17, 2015

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.