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

List:       git
Subject:    Re: [PATCH] git-svn: clone: Fail on missing url argument
From:       Eric Wong <e () 80x24 ! org>
Date:       2016-07-03 6:15:53
Message-ID: 20160703061553.GA20458 () dcvr ! yhbt ! net
[Download RAW message or body]

Christopher Layne <clayne@anodized.com> wrote:
> * cmd_clone should detect a missing $url arg before using it otherwise
>   an uninitialized value error is emitted in even the simplest case of
>   'git svn clone' without arguments.

Thanks, this patch looks obviously correct.

I've eliminated the '* ' and space prefix from the version I've
applied since it's not the convention around here.

> Signed-off-by: Christopher Layne <clayne@anodized.com>

Signed-off-by: Eric Wong <e@80x24.org>

And pushed to "master" of git://bogomips.org/git-svn
(I'll request for Junio to pull within a few days while
 other changes pile up).

>  sub cmd_clone {
>  	my ($url, $path) = @_;
> -	if (!defined $path &&
> +	if (!$url) {
> +		die "SVN repository location required ",
> +		    "as a command-line argument\n";

"as a command-line argument" seems like an unnecessary phrase,
but I see we use it elsewhere; so it's fine here.

I might be tempted to queue up a separate patch
to eliminate this extra statement from the rest of git-svn,
though.  Not sure if others feel the same way.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

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