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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 6, 2016, 18:15 UTC
Message-ID
<xmqqvb0iske6.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20160703061553.GA20458@dcvr.yhbt.net>
Eric Wong <e@80x24.org> writes:
Show 17 quoted lines
> 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).
Thanks.
Show 13 quoted lines
>>  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.

If it _can_ come from somewhere else (perhaps a future enhancement may allow you to configure where to clone from? Not likely for cmd_clone but other places in git-svn may be talking about something that could be configured in the future), then "as a command-line argument" is not just unnecessary but actively waiting to harm the users.

But otherwise I do not think anybody cares either way.
Previous: Christopher Layne
Message 4 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.