[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-dim-tools
Subject:    Re: [PATCH] dim: handle repo URLs ending with forward slash
From:       Emil Velikov <emil.l.velikov () gmail ! com>
Date:       2018-10-24 13:59:33
Message-ID: CACvgo52b7HTM4RQX2bhPJKeQbpnhgQvYnSdy+Zevr0SCcosOmg () mail ! gmail ! com
[Download RAW message or body]

On Wed, 24 Oct 2018 at 09:12, Daniel Vetter <daniel@ffwll.ch> wrote:
>
> On Tue, Oct 23, 2018 at 04:33:21PM +0100, Emil Velikov wrote:
> > From: Emil Velikov <emil.velikov@collabora.com>
> >
> > 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@collabora.com>
> > ---
> >  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)
>
> ? instead of *, or do you have entire piles of trailing slashes? Otherwise
> lgtm, makes sense.

Just one, although it made sense to strip any arbitrary amount. v2
coming shortly, will let you guys decide which one is better.

-Emil
_______________________________________________
dim-tools mailing list
dim-tools@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dim-tools

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic