mirror of
https://github.com/git/git
synced 2024-08-24 18:26:02 +00:00
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>
This commit is contained in:
parent
779792a5f2
commit
7bbc458b44
|
@ -91,6 +91,9 @@ COMMANDS
|
||||||
NOTE: Before Git v2.0, the default prefix was "" (no prefix). This
|
NOTE: Before Git v2.0, the default prefix was "" (no prefix). This
|
||||||
meant that SVN-tracking refs were put at "refs/remotes/*", which is
|
meant that SVN-tracking refs were put at "refs/remotes/*", which is
|
||||||
incompatible with how Git's own remote-tracking refs are organized.
|
incompatible with how Git's own remote-tracking refs are organized.
|
||||||
|
If you still want the old default, you can get it by passing
|
||||||
|
`--prefix ""` on the command line (`--prefix=""` may not work if
|
||||||
|
your Perl's Getopt::Long is < v2.37).
|
||||||
|
|
||||||
--ignore-paths=<regex>;;
|
--ignore-paths=<regex>;;
|
||||||
When passed to 'init' or 'clone' this regular expression will
|
When passed to 'init' or 'clone' this regular expression will
|
||||||
|
|
|
@ -101,18 +101,18 @@ test_expect_success 'clone with -s/-T/-b/-t assumes --prefix=origin/' '
|
||||||
rm -f warning
|
rm -f warning
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'init with -s/-T/-b/-t and --prefix="" still works' '
|
test_expect_success 'init with -s/-T/-b/-t and --prefix "" still works' '
|
||||||
test ! -d project &&
|
test ! -d project &&
|
||||||
git svn init -s "$svnrepo"/project project --prefix="" 2>warning &&
|
git svn init -s "$svnrepo"/project project --prefix "" 2>warning &&
|
||||||
test_must_fail grep -q prefix warning &&
|
test_must_fail grep -q prefix warning &&
|
||||||
test_svn_configured_prefix "" &&
|
test_svn_configured_prefix "" &&
|
||||||
rm -rf project &&
|
rm -rf project &&
|
||||||
rm -f warning
|
rm -f warning
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'clone with -s/-T/-b/-t and --prefix="" still works' '
|
test_expect_success 'clone with -s/-T/-b/-t and --prefix "" still works' '
|
||||||
test ! -d project &&
|
test ! -d project &&
|
||||||
git svn clone -s "$svnrepo"/project --prefix="" 2>warning &&
|
git svn clone -s "$svnrepo"/project --prefix "" 2>warning &&
|
||||||
test_must_fail grep -q prefix warning &&
|
test_must_fail grep -q prefix warning &&
|
||||||
test_svn_configured_prefix "" &&
|
test_svn_configured_prefix "" &&
|
||||||
rm -rf project &&
|
rm -rf project &&
|
||||||
|
|
Loading…
Reference in a new issue