git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-svn: clone: Fail on missing url argument

From
CLChristopher Layne <clayne@anodized.com>
Date
Jul 3, 2016, 06:49 UTC
Message-ID
<6A207591-312F-4C62-8C69-2742E44146F4@anodized.com>
In-Reply-To
<20160703061553.GA20458@dcvr.yhbt.net>
Show 14 quoted lines
> On Jul 2, 2016, at 2315 PT, Eric Wong <e@80x24.org> wrote:
>> 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.

I basically went with the same logic/error message that cmd_init() was using a couple of lines down in an attempt to stay consistent:

 527 sub cmd_init {
 528         if (defined $_stdlayout) {
 529                 $_trunk = 'trunk' if (!defined $_trunk);
 530                 @_tags = 'tags' if (! @_tags);
 531                 @_branches = 'branches' if (! @_branches);
 532         }
 533         if (defined $_trunk || @_branches || @_tags) {
 534                 return cmd_multi_init(@_);
 535         }
 536         my $url = shift or die "SVN repository location required ",
 537                                "as a command-line argument\n";
 538         $url = canonicalize_url($url);
 539         init_subdir(@_);
 540         do_git_init_db();
 541 
 542         if ($Git::SVN::_minimize_url eq 'unset') {
 543                 $Git::SVN::_minimize_url = 0;
 544         }
 545 
 546         Git::SVN->init($url);
 547 }
-cl
Previous: Eric WongNext: Junio C Hamano
Message 3 of 4 in “git-svn: clone: Fail on missing url argument”
  1. git-svn: clone: Fail on missing url argumentChristopher Layne, Jul 3, 2016
  2. Eric WongJul 3, 2016
  3. Christopher LayneJul 3, 2016
  4. Junio C HamanoJul 6, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.