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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Schindelin <Johannes.Schindelin@xxxxxx> wrote:
> +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@xxxxxxx <c.shoemaker@xxxxxxx>
  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@xxxxxxx>

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.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux