From: Alberto Bertogli <albertito@gmail.com>
To: git@vger.kernel.org
Cc: llucax@gmail.com, Alberto Bertogli <albertito@gmail.com>
Subject: [PATCH] Allow git-svnimport to take "" as the trunk directory.
Date: Tue, 14 Aug 2007 01:03:18 -0300 [thread overview]
Message-ID: <11870641981207-git-send-email-albertito@gmail.com> (raw)
Some repositories started with the trunk in "/" and then moved it to the
standard "trunk/" location.
On these repositories, the correct thing would be to call git-svnimport -T "",
but because of the way the options are handled, it uses the default "trunk"
instead of the given empty string. This patch fixes that behaviour.
Reported by Leandro Lucarella <llucax@gmail.com>.
Signed-off-by: Alberto Bertogli <albertito@gmail.com>
---
While the same could be done for tags and branches, I don't think it makes
much sense.
git-svnimport.perl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-svnimport.perl b/git-svnimport.perl
index b73d649..8c17fb5 100755
--- a/git-svnimport.perl
+++ b/git-svnimport.perl
@@ -49,7 +49,7 @@ getopts("A:b:C:dDFhiI:l:mM:o:rs:t:T:SP:R:uv") or usage();
usage if $opt_h;
my $tag_name = $opt_t || "tags";
-my $trunk_name = $opt_T || "trunk";
+my $trunk_name = defined $opt_T ? $opt_T : "trunk";
my $branch_name = $opt_b || "branches";
my $project_name = $opt_P || "";
$project_name = "/" . $project_name if ($project_name);
--
1.5.3.rc4.67.gf9286-dirty
next reply other threads:[~2007-08-14 4:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-14 4:03 Alberto Bertogli [this message]
2007-08-14 5:45 ` [PATCH] Allow git-svnimport to take "" as the trunk directory David Kastrup
2007-08-14 12:36 ` Leandro Lucarella
2007-08-14 13:33 ` David Kastrup
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=11870641981207-git-send-email-albertito@gmail.com \
--to=albertito@gmail.com \
--cc=git@vger.kernel.org \
--cc=llucax@gmail.com \
/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).