git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: "David Kågedal" <davidk@lysator.liu.se>, git@vger.kernel.org
Subject: Re: [PATCH] Make the output of "git svn clone" less confusing.
Date: Thu, 18 Oct 2007 03:33:01 -0700	[thread overview]
Message-ID: <20071018103301.GA21121@soma> (raw)
In-Reply-To: <20071018070617.GA29238@spearce.org>

"Shawn O. Pearce" <spearce@spearce.org> wrote:
> 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:
> 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

  reply	other threads:[~2007-10-18 10:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-15 15:21 [PATCH] Make the output of "git svn clone" less confusing David Kågedal
2007-10-16  9:32 ` Eric Wong
2007-10-16 11:00   ` David Kågedal
2007-10-18  7:06 ` Shawn O. Pearce
2007-10-18 10:33   ` Eric Wong [this message]
     [not found]     ` <87abqgiqsj.fsf@lysator.liu.se>
2007-10-18 17:14       ` Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071018103301.GA21121@soma \
    --to=normalperson@yhbt.net \
    --cc=davidk@lysator.liu.se \
    --cc=git@vger.kernel.org \
    --cc=spearce@spearce.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).