Skip to contentSkip to conversation

dim: handle repo URLs ending with forward slash

PATCH New Emil Velikov 1 participant 1 message Oct 23, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dim: handle repo URLs ending with forward slash

From: Emil Velikov <[email protected]>

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.

---
 dim | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
dim +1 -1
index 93e90a4f96d0..71a681278cbc 100755
@@ -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
Signature · 6 lines
2.19.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel