From: "David Kågedal" <davidk@lysator.liu.se>
To: Eric Wong <normalperson@yhbt.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Make the output of "git svn clone" less confusing.
Date: Tue, 16 Oct 2007 13:00:01 +0200 [thread overview]
Message-ID: <87ejfv1g0e.fsf@lysator.liu.se> (raw)
In-Reply-To: <20071016093228.GA30503@soma> (Eric Wong's message of "Tue\, 16 Oct 2007 02\:32\:28 -0700")
Eric Wong <normalperson@yhbt.net> writes:
>> 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.
You're probably right.
> The other option would be to alter git-init to print the absolute path
> of the repository being initialized...
Absolute paths don't sound like a great idea to me. Ideally, I'd like
to see the path I gave it, or something relative to the working
directory. That is, *my* working directory, and not some internal one
because one of the tools did a chdir.
Can't we make init_subdir in git-svn not chdir, instead? Like this,
highly untested?
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -288,8 +288,7 @@ 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";
- $ENV{GIT_DIR} = '.git';
+ $ENV{GIT_DIR} = '$repo_path/.git';
}
sub cmd_clone {
--
David Kågedal
next prev parent reply other threads:[~2007-10-16 11:00 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 [this message]
2007-10-18 7:06 ` Shawn O. Pearce
2007-10-18 10:33 ` Eric Wong
[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=87ejfv1g0e.fsf@lysator.liu.se \
--to=davidk@lysator.liu.se \
--cc=git@vger.kernel.org \
--cc=normalperson@yhbt.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.