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 18, 2007, 10:33 UTC
Message-ID
<20071018103301.GA21121@soma>
In-Reply-To
<20071018070617.GA29238@spearce.org>
"Shawn O. Pearce" <spearce@spearce.org> wrote:
Show 10 quoted lines
> David Kågedal <davidk@lysator.liu.se> wrote:
> > 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.
> 
> Eric, ack/nack?
Nack, here's (hopefully) a better patch.
David: agree/disagree?
From 62648d512a27a546707da160c939d665e6da57b4 Mon Sep 17 00:00:00 2001
From: Eric Wong <normalperson@yhbt.net>
Date: Thu, 18 Oct 2007 03:29:28 -0700
Subject: [PATCH] git-svn: make the output of "git svn clone" less confusing
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Original patch by David Kågedal:
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.

Instead of using a relative path, I'm capturing the output of git-init and adding the absolute path to it.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
 I've actually just noticed that setting GIT_DIR= before running
 git-svn clone is very broken, and I probably won't get a chance
 to fix it for at least 24 hours (if I'm even awake)...
 Johannes/Benoit/all: git-svn submodules will probably have to
 wait till the weekend...
 git-svn.perl |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index 777e436..4873bad 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -3,6 +3,7 @@
 # License: GPL v2 or later
 use warnings;
 use strict;
+use Cwd qw/getcwd/;
 use vars qw/	$AUTHOR $VERSION
 		$sha1 $sha1_short $_revision
 		$_q $_authors %users/;
@@ -272,7 +273,9 @@ sub do_git_init_db {
 				push @init_db, "--shared";
 			}
 		}
-		command_noisy(@init_db);
+		my $init_out = command(@init_db);
+		$init_out =~ s!(\.git)!getcwd .  "/$1"!e;
+		print $init_out, "\n";
 	}
 	my $set;
 	my $pfx = "svn-remote.$Git::SVN::default_repo_id";
-- 
Eric Wong
Previous: Shawn O. PearceNext: Eric Wong
Message 5 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.