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

Re: [PATCH 2/2] fetch/push: readd rsync support

From
Shawn O. Pearce <spearce@spearce.org>
Date
Sep 28, 2007, 05:20 UTC
Message-ID
<20070928052018.GW3099@spearce.org>
In-Reply-To
<Pine.LNX.4.64.0709280606530.28395@racer.site>
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 19 quoted lines
> +static int disconnect_rsync(struct transport *transport)
> +{
> +	return 0;
> +}
>  
>  /* Generic functions for using commit walkers */
>  
> @@ -402,7 +730,10 @@ struct transport *transport_get(struct remote *remote, const char *url)
>  	ret->url = url;
>  
>  	if (!prefixcmp(url, "rsync://")) {
> -		/* not supported; don't populate any ops */
> +		ret->get_refs_list = get_refs_via_rsync;
> +		ret->fetch = fetch_objs_via_rsync;
> +		ret->push = rsync_transport_push;
> +		ret->disconnect = disconnect_rsync;
>  
>  	} else if (!prefixcmp(url, "http://")
>  	        || !prefixcmp(url, "https://")

For what it's worth disconnect is an optional operation. You did not need to implement it if you don't allocate a data member in the struct transport. So removing disconnect_rsync() could save you 6 lines or so.

I see push is now supported again. Didn't we remove rsync push support a long time ago? Like say in:

  commit c485104741ccdf32dd0c96fcb886c38a0b5badbd
  Author: c.shoemaker@cox.net <c.shoemaker@cox.net>
  Date:   Sat Oct 29 00:16:33 2005 -0400
    Add usage help to git-push.sh
    
    Also clarify failure to push to read-only remote.  Especially,
    state why rsync:// is not used for pushing.
    
    [jc: ideally rsync should not be used for anything]
    
    Signed-off-by: Chris Shoemaker <c.shoemaker at cox.net>
    Signed-off-by: Junio C Hamano <junkio@cox.net>

I guess it is nice to see that you can't kill rsync. Like Windows it always finds it way back into your life.

-- 
Shawn.
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 7 of 19 in “rsync support”
  1. 0/2 rsync supportJohannes Schindelin, Sep 28, 2007
  2. 1/2 Introduce remove_dir_recursively()Johannes Schindelin, Sep 28, 2007
  3. Junio C HamanoSep 28, 2007
  4. Johannes SchindelinSep 28, 2007
  5. David KastrupSep 28, 2007
  6. 2/2 fetch/push: readd rsync supportJohannes Schindelin, Sep 28, 2007
  7. Shawn O. PearceSep 28, 2007
  8. Johannes SchindelinSep 28, 2007
  9. Junio C HamanoSep 28, 2007
  10. Johannes SchindelinSep 28, 2007
  11. 0/2 rsync support, was Re: [PATCH 0/2] rsync supportJohannes Schindelin, Sep 28, 2007
  12. 1/2 Introduce remove_dir_recursively()Johannes Schindelin, Sep 28, 2007
  13. 2/2 fetch/push: readd rsync supportJohannes Schindelin, Sep 28, 2007
  14. Johannes SchindelinSep 28, 2007
  15. Junio C HamanoSep 28, 2007
  16. Johannes SchindelinSep 28, 2007
  17. 2/2 fetch/push: readd rsync supportJohannes Schindelin, Sep 29, 2007
  18. Junio C HamanoSep 30, 2007
  19. Johannes SchindelinSep 30, 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.