summaryrefslogtreecommitdiff
path: root/git-svn.perl
diff options
context:
space:
mode:
authorJohan Herland <johan@herland.net>2013-10-11 14:57:06 +0200
committerEric Wong <normalperson@yhbt.net>2013-10-12 22:30:53 +0000
commitf849bb6b3b4ccc7cc1a68f49d6ff1e9c508fdf17 (patch)
treeb5af07d8adadce2c455446ce1bd4e8a3a10e1b73 /git-svn.perl
parent7091a2d0bfdea5a8e1c77027d746e06ae384bffa (diff)
downloadgit-f849bb6b3b4ccc7cc1a68f49d6ff1e9c508fdf17.tar.gz
git-svn: Warn about changing default for --prefix in Git v2.0
In Git v2.0, we will change the default --prefix for init/clone from none/empty to "origin/" (which causes SVN-tracking branches to be placed at refs/remotes/origin/* instead of refs/remotes/*). This patch warns users about the upcoming change, both in the git-svn manual page, and on stderr when running init/clone in the "multi-mode" without providing a --prefix. Cc: Eric Wong <normalperson@yhbt.net> Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl12
1 files changed, 11 insertions, 1 deletions
diff --git a/git-svn.perl b/git-svn.perl
index 1823db135e..7349ffea5a 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -1389,7 +1389,17 @@ sub cmd_multi_init {
usage(1);
}
- $_prefix = '' unless defined $_prefix;
+ unless (defined $_prefix) {
+ $_prefix = '';
+ warn <<EOF
+WARNING: --prefix is not given, defaulting to empty prefix.
+ This is probably not what you want! In order to stay compatible
+ with regular remote-tracking refs, provide a prefix like
+ --prefix=origin/ (remember the trailing slash), which will cause
+ the SVN-tracking refs to be placed at refs/remotes/origin/*.
+NOTE: In Git v2.0, the default prefix will change from empty to 'origin/'.
+EOF
+ }
if (defined $url) {
$url = canonicalize_url($url);
init_subdir(@_);