From patchwork Tue Oct 23 15:20:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 10653263 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2304114DE for ; Tue, 23 Oct 2018 15:22:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0101429D22 for ; Tue, 23 Oct 2018 15:22:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F2BEF1FEBD; Tue, 23 Oct 2018 15:22:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B456A29DE6 for ; Tue, 23 Oct 2018 15:22:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7F5038935B; Tue, 23 Oct 2018 15:21:59 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by gabe.freedesktop.org (Postfix) with ESMTPS id B23328935B for ; Tue, 23 Oct 2018 15:21:57 +0000 (UTC) Received: by mail-wr1-x441.google.com with SMTP id d2-v6so2169647wro.7 for ; Tue, 23 Oct 2018 08:21:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=A85HBNW1c9m5rFq0WpIG5YKumBWz1SIQlTNJVG1hCVw=; b=na1HDHghctswgLGUrqlhP7iag5tkClY5mr24ERVvpOtr2B68v4it1kxDtFFvDycbMe xK15CQwM4hm+R1fO5+oHBfxe2uAnoo8k+JzygRl4pomAP1riSxvGnry58mrhQMWloSYC hFOqDdg7wGwPvpJZhsfL69x3NQNa0+2Xjf7AFyShVnd9q7NdiHaeE0PwX9AYPDUPaOdy +Mp3TdZvyRwnms2+ud6OIoYjaT+sbGUqqG3N+MJ6BdDKTlYJqq5RpEm07Du5MQ0+5MC8 UFz2O7aLx9Jhmouxh0stcPXyIOFtOL971q78fnbil5q8OuOUcxTaxbLKis6rEf2TwCjX a8wg== X-Gm-Message-State: AGRZ1gIpijbhJ+C1X1rDziummmTqInuL6awXTDdZg9A8LhcdODblyapb /8gwpVBNwHIGx0opfrvsJPuPGAVW X-Google-Smtp-Source: AJdET5fpovEHyrcQtl22meFoxrxRnj60L3mjU2BBO882nUSiehhkhC6oO5+jwunt3MCiet3oWJII2w== X-Received: by 2002:a05:6000:108d:: with SMTP id y13mr10488881wrw.226.1540308116171; Tue, 23 Oct 2018 08:21:56 -0700 (PDT) Received: from arch-x1c3.cbg.collabora.co.uk ([2a00:5f00:102:0:9665:9cff:feee:aa4d]) by smtp.gmail.com with ESMTPSA id q77-v6sm3012581wmd.33.2018.10.23.08.21.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Oct 2018 08:21:54 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH] dim: handle repo URLs ending with forward slash Date: Tue, 23 Oct 2018 16:20:54 +0100 Message-Id: <20181023152054.10611-1-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emil.l.velikov@gmail.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Emil Velikov Seems like some of my existing URLs had a trailing forward slash. This confused url_to_remote(), resulting in adding the exact same repo again. Signed-off-by: Emil Velikov --- dim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dim b/dim index 93e90a4f96d0..71a681278cbc 100755 --- a/dim +++ b/dim @@ -192,7 +192,7 @@ function url_to_remote # url [url ...] fi for url; do - remote=$(git remote -v | grep -m 1 "$url (" | cut -f 1) + remote=$(git remote -v | grep -m 1 "$url/* (" | cut -f 1) if [[ -n "$remote" ]]; then echo "$remote" return 0