t9117: use --prefix "" instead of --prefix=""
Versions of Perl's Getopt::Long module before 2.37 do not contain this fix that first appeared in Getopt::Long version 2.37: * Bugfix: With gnu_compat, --foo= will no longer trigger "Option requires an argument" but return the empty string. Instead of using --prefix="" use --prefix "" when testing an explictly empty prefix string in order to work with older versions of Perl's Getopt::Long module. Also add a paragraph on this workaround to the documentation of git-svn itself. Signed-off-by: Kyle J. McKay <mackyle@gmail.com> Acked-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Kyle J. McKay committed
Apr 22, 2014 at 04:16 UTC
7bbc458b44873d0027261562327a20ebd6a97733
2 files changed
+7
-4
Documentation/git-svn.txt
+3
@@ -91,6 +91,9 @@ COMMANDS
91
NOTE: Before Git v2.0, the default prefix was "" (no prefix). This
92
meant that SVN-tracking refs were put at "refs/remotes/*", which is
93
incompatible with how Git's own remote-tracking refs are organized.
94
+If you still want the old default, you can get it by passing
95
+`--prefix ""` on the command line (`--prefix=""` may not work if
96
+your Perl's Getopt::Long is < v2.37).
97
98
--ignore-paths=<regex>;;
99
When passed to 'init' or 'clone' this regular expression will
t/t9117-git-svn-init-clone.sh
+4
-4
@@ -101,18 +101,18 @@ test_expect_success 'clone with -s/-T/-b/-t assumes --prefix=origin/' '
101
rm -f warning
102
'
103
104
-test_expect_success 'init with -s/-T/-b/-t and --prefix="" still works' '
104
+test_expect_success 'init with -s/-T/-b/-t and --prefix "" still works' '
105
test ! -d project &&
106
- git svn init -s "$svnrepo"/project project --prefix="" 2>warning &&
106
+ git svn init -s "$svnrepo"/project project --prefix "" 2>warning &&
107
test_must_fail grep -q prefix warning &&
108
test_svn_configured_prefix "" &&
109
rm -rf project &&
110
rm -f warning
111
'
112
113
-test_expect_success 'clone with -s/-T/-b/-t and --prefix="" still works' '
113
+test_expect_success 'clone with -s/-T/-b/-t and --prefix "" still works' '
114
test ! -d project &&
115
- git svn clone -s "$svnrepo"/project --prefix="" 2>warning &&
115
+ git svn clone -s "$svnrepo"/project --prefix "" 2>warning &&
116
test_must_fail grep -q prefix warning &&
117
test_svn_configured_prefix "" &&
118
rm -rf project &&