From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Hommey Subject: [PATCH v4 06/11] connect: group CONNECT_DIAG_URL handling code Date: Tue, 3 May 2016 17:50:47 +0900 Message-ID: <1462265452-32360-7-git-send-email-mh@glandium.org> References: <1462082573-17992-1-git-send-email-mh@glandium.org> <1462265452-32360-1-git-send-email-mh@glandium.org> Cc: gitster@pobox.com, tboegi@web.de To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Tue May 03 10:51:12 2016 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1axW2x-0004la-7H for gcvg-git-2@plane.gmane.org; Tue, 03 May 2016 10:51:11 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755811AbcECIvA (ORCPT ); Tue, 3 May 2016 04:51:00 -0400 Received: from ns332406.ip-37-187-123.eu ([37.187.123.207]:51923 "EHLO glandium.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755798AbcECIu6 (ORCPT ); Tue, 3 May 2016 04:50:58 -0400 Received: from glandium by zenigata with local (Exim 4.87) (envelope-from ) id 1axW2e-0008Qz-Fw; Tue, 03 May 2016 17:50:52 +0900 X-Mailer: git-send-email 2.8.1.16.gaa70619.dirty In-Reply-To: <1462265452-32360-1-git-send-email-mh@glandium.org> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Previous changes made both branches handling CONNECT_DIAG_URL identical. We can now remove one of those branches and have CONNECT_DIAG_URL be handled in one place. Signed-off-by: Mike Hommey --- connect.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/connect.c b/connect.c index 3428149..8813f90 100644 --- a/connect.c +++ b/connect.c @@ -691,7 +691,7 @@ struct child_process *git_connect(int fd[2], const char *url, signal(SIGCHLD, SIG_DFL); protocol = parse_connect_url(url, &host, &port, &path); - if ((flags & CONNECT_DIAG_URL) && (protocol != PROTO_SSH)) { + if (flags & CONNECT_DIAG_URL) { printf("Diag: url=%s\n", url ? url : "NULL"); printf("Diag: protocol=%s\n", prot_name(protocol)); printf("Diag: userandhost=%s\n", host ? host : "NULL"); @@ -761,20 +761,6 @@ struct child_process *git_connect(int fd[2], const char *url, int putty = 0, tortoiseplink = 0; transport_check_allowed("ssh"); - if (flags & CONNECT_DIAG_URL) { - printf("Diag: url=%s\n", url ? url : "NULL"); - printf("Diag: protocol=%s\n", prot_name(protocol)); - printf("Diag: userandhost=%s\n", host ? host : "NULL"); - printf("Diag: port=%s\n", port ? port : "NONE"); - printf("Diag: path=%s\n", path ? path : "NULL"); - - free(host); - free(port); - free(path); - free(conn); - return NULL; - } - ssh = getenv("GIT_SSH_COMMAND"); if (!ssh) { const char *base; -- 2.8.1.16.gaa70619.dirty