Re: [PATCH 2/2] Clean up connection correctly if object fetch wasn't done

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

 



On Mon, 4 Feb 2008, Johannes Schindelin wrote:

> Hi,
> 
> On Mon, 4 Feb 2008, Daniel Barkalow wrote:
> 
> > Further optimization allowed the fetch_objs call to be skipped if it 
> > isn't necessary. However, this leaves the connection in need of cleaning 
> > up to avoid getting an error message from the remote end when ssh is 
> > used. Fix this.
> 
> I _think_ something similar is necessary for ls-remote, too (at least it 
> showed the same symptoms today, but I have not had time to investigate 
> yet).

Yup, exactly the same change to builtin-ls-remote that builtin-fetch 
needed.

Signed-off-by: Daniel Barkalow <barkalow@xxxxxxxxxxxx>

diff --git a/builtin-ls-remote.c b/builtin-ls-remote.c
index 6dd31d1..0237549 100644
--- a/builtin-ls-remote.c
+++ b/builtin-ls-remote.c
@@ -94,6 +94,7 @@ int cmd_ls_remote(int argc, const char **argv, const 
char *prefix)
                transport_set_option(transport, TRANS_OPT_UPLOADPACK, 
uploadpack);
 
        ref = transport_get_remote_refs(transport);
+       transport_disconnect(transport);
 
        if (!ref)
                return 1;

-
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