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

Re: [PATCH] Make the output of "git svn clone" less confusing.

From
EWEric Wong <normalperson@yhbt.net>
Date
Oct 16, 2007, 09:32 UTC
Message-ID
<20071016093228.GA30503@soma>
In-Reply-To
<87k5poflp5.fsf@lysator.liu.se>
David Kågedal <davidk@lysator.liu.se> wrote:
Show 7 quoted lines
> The problem is that the first thing it prints is
> 
>   Initialized empty Git repository in .git/
> 
> even if actually created a subdirectory and changed into it first. But to the
> user, it looks like it is creating a .git/ dir in the directory he/she is
> started git from.

Thanks for bringing it up I just noticed this the other day myself and thought it might be confusing.

Show 18 quoted lines
> ---
>  git-svn.perl |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> This change makes it more chatty, which might not be a good thing. But
> I think the previous output was worse.
> 
> diff --git a/git-svn.perl b/git-svn.perl
> index 777e436..d4450ca 100755
> --- a/git-svn.perl
> +++ b/git-svn.perl
> @@ -286,6 +286,7 @@ sub do_git_init_db {
>  
>  sub init_subdir {
>  	my $repo_path = shift or return;
> +	print "Creating directory $repo_path\n";
>  	mkpath([$repo_path]) unless -d $repo_path;
>  	chdir $repo_path or die "Couldn't chdir to $repo_path: $!\n";
Since mkpath() isn't guaranteed to get called, maybe putting a
	print "Entering directory $repo_path\n"
right before the chdir is better.

The other option would be to alter git-init to print the absolute path of the repository being initialized...

-- 
Eric Wong
Previous: David KågedalNext: David Kågedal
Message 2 of 6 in “Make the output of "git svn clone" less confusing.”
  1. Make the output of "git svn clone" less confusing.David Kågedal, Oct 15, 2007
  2. Eric WongOct 16, 2007
  3. David KågedalOct 16, 2007
  4. Shawn O. PearceOct 18, 2007
  5. Eric WongOct 18, 2007
  6. Eric WongOct 18, 2007

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.