diff mbox series

[FFmpeg-devel] fate: allow https for git URLs

Message ID 20240424200117.1659-1-timo@rothenpieler.org
State Accepted
Commit 59767636c77fa9014587c3084bbc210f65a5cd2a
Headers show
Series [FFmpeg-devel] fate: allow https for git URLs | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished

Commit Message

Timo Rothenpieler April 24, 2024, 8:01 p.m. UTC
---
 tests/fate.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Alexander Strasser April 24, 2024, 8:12 p.m. UTC | #1
On 2024-04-24 22:01 +0200, Timo Rothenpieler wrote:
> ---
>  tests/fate.sh | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/fate.sh b/tests/fate.sh
> index c5ee18de80..4081e865ae 100755
> --- a/tests/fate.sh
> +++ b/tests/fate.sh
> @@ -30,14 +30,14 @@ lock(){
>  checkout(){
>      case "$repo" in
>          file:*|/*) src="${repo#file:}"      ;;
> -        git:*)     git clone --quiet --branch "$branch" "$repo" "$src" ;;
> +        git:*|https:*) git clone --quiet --branch "$branch" "$repo" "$src" ;;
>      esac
>  }
>
>  update()(
>      cd ${src} || return
>      case "$repo" in
> -        git:*) git fetch --quiet --force && git reset --quiet --hard "origin/$branch" ;;
> +        git:*|https:*) git fetch --quiet --force && git reset --quiet --hard "origin/$branch" ;;
>      esac
>  )

Should be OK if tested to work with both git and https URLs in repo.


  Alexander
Timo Rothenpieler April 24, 2024, 8:26 p.m. UTC | #2
On 24.04.2024 22:12, Alexander Strasser via ffmpeg-devel wrote:
> On 2024-04-24 22:01 +0200, Timo Rothenpieler wrote:
>> ---
>>   tests/fate.sh | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/tests/fate.sh b/tests/fate.sh
>> index c5ee18de80..4081e865ae 100755
>> --- a/tests/fate.sh
>> +++ b/tests/fate.sh
>> @@ -30,14 +30,14 @@ lock(){
>>   checkout(){
>>       case "$repo" in
>>           file:*|/*) src="${repo#file:}"      ;;
>> -        git:*)     git clone --quiet --branch "$branch" "$repo" "$src" ;;
>> +        git:*|https:*) git clone --quiet --branch "$branch" "$repo" "$src" ;;
>>       esac
>>   }
>>
>>   update()(
>>       cd ${src} || return
>>       case "$repo" in
>> -        git:*) git fetch --quiet --force && git reset --quiet --hard "origin/$branch" ;;
>> +        git:*|https:*) git fetch --quiet --force && git reset --quiet --hard "origin/$branch" ;;
>>       esac
>>   )
> 

If you manually clone the repo, you can use whatever you like anyway, 
since it never actually uses the URL for anything after the initial clone.
Alexander Strasser April 24, 2024, 8:53 p.m. UTC | #3
On 2024-04-24 22:26 +0200, Timo Rothenpieler wrote:
> On 24.04.2024 22:12, Alexander Strasser via ffmpeg-devel wrote:
> > On 2024-04-24 22:01 +0200, Timo Rothenpieler wrote:
> > > ---
> > >   tests/fate.sh | 4 ++--
> > >   1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/tests/fate.sh b/tests/fate.sh
> > > index c5ee18de80..4081e865ae 100755
> > > --- a/tests/fate.sh
> > > +++ b/tests/fate.sh
> > > @@ -30,14 +30,14 @@ lock(){
> > >   checkout(){
> > >       case "$repo" in
> > >           file:*|/*) src="${repo#file:}"      ;;
> > > -        git:*)     git clone --quiet --branch "$branch" "$repo" "$src" ;;
> > > +        git:*|https:*) git clone --quiet --branch "$branch" "$repo" "$src" ;;
> > >       esac
> > >   }
> > >
> > >   update()(
> > >       cd ${src} || return
> > >       case "$repo" in
> > > -        git:*) git fetch --quiet --force && git reset --quiet --hard "origin/$branch" ;;
> > > +        git:*|https:*) git fetch --quiet --force && git reset --quiet --hard "origin/$branch" ;;
> > >       esac
> > >   )
> >
>
> If you manually clone the repo, you can use whatever you like anyway, since

Sorry my initial wording was probably ambiguous.

I meant in the repo variable in a fate_config.sh


> it never actually uses the URL for anything after the initial clone.

The URL isn't used per se, but it's used to decide whether to
git fetch or not inside the call to update, isn't it?


  Alexander
Timo Rothenpieler April 24, 2024, 9:28 p.m. UTC | #4
On 24.04.2024 22:53, Alexander Strasser via ffmpeg-devel wrote:
> On 2024-04-24 22:26 +0200, Timo Rothenpieler wrote:
>> On 24.04.2024 22:12, Alexander Strasser via ffmpeg-devel wrote:
>>> On 2024-04-24 22:01 +0200, Timo Rothenpieler wrote:
>>>> ---
>>>>    tests/fate.sh | 4 ++--
>>>>    1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/tests/fate.sh b/tests/fate.sh
>>>> index c5ee18de80..4081e865ae 100755
>>>> --- a/tests/fate.sh
>>>> +++ b/tests/fate.sh
>>>> @@ -30,14 +30,14 @@ lock(){
>>>>    checkout(){
>>>>        case "$repo" in
>>>>            file:*|/*) src="${repo#file:}"      ;;
>>>> -        git:*)     git clone --quiet --branch "$branch" "$repo" "$src" ;;
>>>> +        git:*|https:*) git clone --quiet --branch "$branch" "$repo" "$src" ;;
>>>>        esac
>>>>    }
>>>>
>>>>    update()(
>>>>        cd ${src} || return
>>>>        case "$repo" in
>>>> -        git:*) git fetch --quiet --force && git reset --quiet --hard "origin/$branch" ;;
>>>> +        git:*|https:*) git fetch --quiet --force && git reset --quiet --hard "origin/$branch" ;;
>>>>        esac
>>>>    )
>>>
>>
>> If you manually clone the repo, you can use whatever you like anyway, since
> 
> Sorry my initial wording was probably ambiguous.
> 
> I meant in the repo variable in a fate_config.sh
> 
> 
>> it never actually uses the URL for anything after the initial clone.
> 
> The URL isn't used per se, but it's used to decide whether to
> git fetch or not inside the call to update, isn't it?
> 

Yeah, that's pretty much the only thing it's used for.
I also considered to turn the check around, and always assume it's a 
valid git URL unless the file: thingy is recognized.

That way ssh URLs and cloning from local paths would become possible.

But that runs a higher risk of breaking someones setup.
Timo Rothenpieler April 27, 2024, 9:31 p.m. UTC | #5
On 24.04.2024 22:01, Timo Rothenpieler wrote:
> ---
>   tests/fate.sh | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/fate.sh b/tests/fate.sh
> index c5ee18de80..4081e865ae 100755
> --- a/tests/fate.sh
> +++ b/tests/fate.sh
> @@ -30,14 +30,14 @@ lock(){
>   checkout(){
>       case "$repo" in
>           file:*|/*) src="${repo#file:}"      ;;
> -        git:*)     git clone --quiet --branch "$branch" "$repo" "$src" ;;
> +        git:*|https:*) git clone --quiet --branch "$branch" "$repo" "$src" ;;
>       esac
>   }
>   
>   update()(
>       cd ${src} || return
>       case "$repo" in
> -        git:*) git fetch --quiet --force && git reset --quiet --hard "origin/$branch" ;;
> +        git:*|https:*) git fetch --quiet --force && git reset --quiet --hard "origin/$branch" ;;
>       esac
>   )
>   

applied
diff mbox series

Patch

diff --git a/tests/fate.sh b/tests/fate.sh
index c5ee18de80..4081e865ae 100755
--- a/tests/fate.sh
+++ b/tests/fate.sh
@@ -30,14 +30,14 @@  lock(){
 checkout(){
     case "$repo" in
         file:*|/*) src="${repo#file:}"      ;;
-        git:*)     git clone --quiet --branch "$branch" "$repo" "$src" ;;
+        git:*|https:*) git clone --quiet --branch "$branch" "$repo" "$src" ;;
     esac
 }
 
 update()(
     cd ${src} || return
     case "$repo" in
-        git:*) git fetch --quiet --force && git reset --quiet --hard "origin/$branch" ;;
+        git:*|https:*) git fetch --quiet --force && git reset --quiet --hard "origin/$branch" ;;
     esac
 )