[PATCH] dim: actually use the remote name asked from the user
Daniel Vetter
daniel at ffwll.ch
Tue Oct 10 08:34:29 UTC 2017
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.
-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
>
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
More information about the dim-tools
mailing list