[PATCH] dim: actually use the remote name asked from the user

Jani Nikula jani.nikula at intel.com
Wed Oct 11 13:16:24 UTC 2017


On Tue, 10 Oct 2017, Daniel Vetter <daniel at ffwll.ch> wrote:
> On Mon, Oct 9, 2017 at 11:06 PM, Jani Nikula <jani.nikula at intel.com> wrote:
>> Broken since introduction in cad37e1910f9 ("dim: auto-add remotes"), the
>> remote asked from the user gets ignored. Get the remote name to the
>> remote variable. Also bail out on non-zero returns from read.
>>
>> Cc: Daniel Vetter <daniel at ffwll.ch>
>> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
>
> I blame it on the bikesheds :-) Thanks for fixing this, Ack.

Pushed, thanks.

BR,
Jani.

> -Daniel
>
>> ---
>>  dim | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/dim b/dim
>> index af22f94ccdd5..449e12e7e936 100755
>> --- a/dim
>> +++ b/dim
>> @@ -269,8 +269,8 @@ function url_to_remote # url [url ...]
>>         url=$1
>>         remote=${url%.git}
>>         remote=${remote##*/}
>> -       read -r -i "$remote" -e -p "Enter a name to auto-add this remote, leave blank to abort: " || true
>> -       if [[ "$REPLY" == "" ]] ; then
>> +       read -r -i "$remote" -e -p "Enter a name to auto-add this remote, leave blank to abort: " remote
>> +       if [[ -z "$remote" ]]; then
>>                 echoerr "Please set it up yourself using:"
>>                 echoerr "    $ git remote add <name> $url"
>>                 echoerr "with a name of your choice."
>> --
>> 2.11.0
>>

-- 
Jani Nikula, Intel Open Source Technology Center


More information about the dim-tools mailing list