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

Re: Wishlist for a bundle-only transport mode

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Nov 21, 2007, 17:07 UTC
Message-ID
<Pine.LNX.4.64.0711211702440.27959@racer.site>
In-Reply-To
<1195662180.28318.19.camel@hinata.boston.redhat.com>
Hi,
On Wed, 21 Nov 2007, Kristian H?gsberg wrote:
Show 20 quoted lines
> On Wed, 2007-11-21 at 15:59 +0000, Johannes Schindelin wrote:
> > Hi,
> > 
> > On Wed, 21 Nov 2007, Santi B?jar wrote:
> > 
> > > 1) git-clone does not accept a bundle file, even if git-fetch does. I've 
> > > made a patch to use git-fetch in git-clone for this.
> > 
> > This, along with rewriting git-clone as a very thin wrapper over git-init, 
> > -remote and -fetch, is a really low hanging fruit.
> > 
> > Or maybe go the full nine yards and build it in.  Should be a breeze now, 
> > given parse_options() and run_command().
> 
> I started doing this, which is pretty stupid as I'm pressed to find time 
> to finish up builtin-commit.  Nevertheless, could you elaborate on the 
> plan here?  How would you rewrite it to just use remote and fetch?  I 
> just finished the boilerplate option parsing stuff (patch below) and 
> started reading the core of git-clone.sh, but if most of this can be 
> replaced I'd like to hear about it :)

After handling the options like --reference, and except for special handling of a local clone (not via file:// protocol), it should be as easy as

	git remote add -f origin $url &&
	case "$no_checkout" in
	t)
		;;
	*)
		git checkout -f -b master remotes/origin/HEAD
		;;
	esac
(Of course I'd use run_command() for this.)

I would avoid at all costs to reimplement the different methods for the different protocols.

Ciao, Dscho

Previous: Kristian HøgsbergNext: Jakub Narebski
Message 31 of 33 in “Wishlist for a bundle-only transport mode”
  1. Santi BéjarNov 21, 2007
  2. Jakub NarebskiNov 21, 2007
  3. Santi BéjarNov 21, 2007
  4. Johannes SchindelinNov 21, 2007
  5. Jakub NarebskiNov 21, 2007
  6. Johannes SchindelinNov 21, 2007
  7. Jakub NarebskiNov 21, 2007
  8. Johannes SchindelinNov 21, 2007
  9. Jakub NarebskiNov 21, 2007
  10. Santi BéjarNov 22, 2007
  11. Junio C HamanoNov 22, 2007
  12. Jakub NarebskiNov 23, 2007
  13. Junio C HamanoNov 23, 2007
  14. Jakub NarebskiNov 23, 2007
  15. Santi BéjarNov 23, 2007
  16. Johannes SchindelinNov 23, 2007
  17. Junio C HamanoNov 23, 2007
  18. Santi BéjarNov 23, 2007
  19. Junio C HamanoNov 23, 2007
  20. Santi BéjarNov 23, 2007
  21. Junio C HamanoNov 24, 2007
  22. Jakub NarebskiNov 23, 2007
  23. Johannes SchindelinNov 21, 2007
  24. Santi BéjarNov 21, 2007
  25. Johannes SchindelinNov 21, 2007
  26. Santi BéjarNov 21, 2007
  27. bundle create: keep symbolic refs' names instead of resolving themJohannes Schindelin, Nov 21, 2007
  28. Johannes SchindelinNov 22, 2007
  29. bundle create: keep symbolic refs' names instead of resolving themJohannes Schindelin, Nov 22, 2007
  30. Kristian HøgsbergNov 21, 2007
  31. Johannes SchindelinNov 21, 2007
  32. Jakub NarebskiNov 21, 2007
  33. Johannes SchindelinNov 21, 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.