[PATCH] dim: handle repo URLs ending with forward slash

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

 



From: Emil Velikov <emil.velikov@xxxxxxxxxxxxx>

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 <emil.velikov@xxxxxxxxxxxxx>
---
 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
-- 
2.19.1

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux