Skip to content
  • Daniel Barkalow's avatar
    Reduce the number of connects when fetching · ba227857
    Daniel Barkalow authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    This shares the connection between getting the remote ref list and
    getting objects in the first batch. (A second connection is still used
    to follow tags).
    
    When we do not fetch objects (i.e. either ls-remote disconnects after
    getting list of refs, or we decide we are already up-to-date), we
    clean up the connection properly; otherwise the connection is left
    open in need of cleaning up to avoid getting an error message from
    the remote end when ssh is used.
    
    Signed-off-by: default avatarDaniel Barkalow <barkalow@iabervon.org>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    ba227857